While setting up Application Integration in your Google Cloud project for the first time, Application Integration, by default, creates an unpublished sample integration named ExampleIntegration-EcomOrderProcessing.
To view the sample integtration, do the following:
The sample integration opens in the integration editor similar to the following layout:
You can use this sample integration to get a hands-on experience of the various triggers, tasks, and concepts of Application Integration.
The sample integration illustrates a basic e-commerce back-end scenario implementing the following order processing operation:
{ "order_no": "12345", "buyer_id": "raambo", "line_items": [ { "line": 1, "sku": "tr100", "vendor": "Internal", "quantity": 1, "price_per_unit": 10 }, { "line": 2, "sku": "tbz", "vendor": "External", "quantity": 24.0, "price_per_unit": 1 } ] }
The following table lists all the triggers, tasks, and edge conditions used in ExampleIntegration-EcomOrderProcessing:
(OrderProcessAPITrigger)
api_trigger/ecom-order-processing_API_1
(Find Total Order Price)
order_request JSON input variable and iterates through all the order items using the FOR_EACH mapping function to calculate the total order price value.
The total order price value is calculated by multiplying the item quantity and the price_per_item using the GET_PROPERTY and MULTIPLY mapping functions.
total_order_value output variable.
orders_request.line_items .FOR_EACH(~obj1->~obj1 .GET_PROPERTY("quantity") .TO_DOUBLE() .MULTIPLY(~obj1 .GET_PROPERTY("price_per_unit") .TO_DOUBLE())) .TO_DOUBLE_ARRAY() .SUM()
total_order_value
(Total OrderValue Above Threshold)
$total_order_value$ >= $threshold_order_value$(TotalOrderValue Below Threshold)
$total_order_value$ < $threshold_order_value$
(Approval)
For the purpose of testing this sample integration, you can use your email to confirm the successful completion of the integration.
(Filter External Items)
order_request JSON input variable and filters all the order items with external vendors using the FILTER mapping function.
The filtered values are then stored in the filtered_external_items output variable.
orders_request .GET_PROPERTY("line_items") .FILTER(~obj1->~obj1 .GET_PROPERTY("vendor") .TO_STRING() .EQUALS("External"))
filtered_external_items
(For Each Loop)
filtered_external_items
API Trigger ID: api_trigger/ecom-order-processing_API_2
Integration name: ExampleIntegration-EcomOrderProcessing
filtered_external_items variable and calls the sub-integration for each element in the array. It also collates the response of each run in rest_call_response_status, where each element of the array has the response from one particular run.
(Report ExternalOrders)
api_trigger/ecom-order-processing_API_2
(Call REST Endpoint)
https://mocktarget.apigee.net/echo
HTTP method: POST
Request body: sub_integration_input
To publish the integration click Publish in the integration editor toolbar.
Upon successfully publishing your integration, you can view and inspect the execution logs of the published integration. To view logs, click
View execution logs for this integration. The Execution Logs page appears.
Do the following to test the sample integration:
The Test Integration pane appears.
orders_request input variable. For the purpose of this test, you can update the quantity value to 240. The update orders_request input variable should look similar to the following:
{ "order_no": "12345", "buyer_id": "raambo", "line_items": [ { "line": 1, "sku": "tr100", "vendor": "Internal", "quantity": 1, "price_per_unit": 10 }, { "line": 2, "sku": "tbz", "vendor": "External", "quantity": 240, "price_per_unit": 1 } ] }
Since the updated orders_request quantity is greater than 200, the sample integration sends an approval request email to the email address specified in the Recipients field of the Approval task. The integration order operation will successfully complete once the approval is received.
For more information about testing, see Test and publish integrations.
Do the following to inspect the execution logs and to view the status and payload of the given integration:
curl -X POST -H "Content-Type: application/json" -d '{"trigger_id":"api_trigger/ecom-order-processing_API_1"}' 'https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME:execute' -H "Authorization: Bearer $(gcloud auth print-access-token)"
curl -X POST -H "Content-Type: application/json" -d '{ "triggerId": "api_trigger/ecom-order-processing_API_1", "inputParameters": { "orders_request": { "jsonValue": "{\n \"order_no\": \"12345\",\n \"buyer_id\": \"raambo\",\n \"line_items\": [{\n \"line\": 1.0,\n \"sku\": \"tr100\",\n \"vendor\": \"Internal\",\n \"quantity\": 1.0,\n \"price_per_unit\": 10.0\n }, {\n \"line\": 2.0,\n \"sku\": \"tbz\",\n \"vendor\": \"External\",\n \"quantity\": 24.0,\n \"price_per_unit\": 2.0\n }]\n}" } } }' 'https://integrations.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/integrations/INTEGRATION_NAME:execute' -H "Authorization: Bearer $(gcloud auth print-access-token)"
Replace the following:
The API returns the integration execution response containing all the integration output variable values.
For information about quotas and limits, see Quotas and limits.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-06-09 UTC.