---
schema_version: "1"
id: 3589f4070009cfe179dbfb09149a01ea863f8626f2575800a2ca8ce7d134bdc7
title: Build an Integration Procedure
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_build_integration_procedure.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_build_integration_procedure.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e8a4c79422c1b15d5905f355caf3a389d5ea3dfc946ec286d45a8db8b2de3ca5
description: To build an Integration Procedure, define its steps and logic by using a combination of Blocks and Actions.
products:
  - Omnistudio
release: "264"
---
# Build an Integration Procedure

To build an Integration Procedure, define its steps and logic by using a combination of Blocks and Actions.

Actions perform specific tasks such as sending email, reading and writing Salesforce data, and running batch jobs.

Blocks allow you to group and control multiple Actions. For example, use Blocks to cache the output, or provide error handling, for the Actions in the Block. You can nest blocks within other blocks. For example, you can nest a Loop Block within a Try-Catch Block or a Cache Block.

You can control a lot about the Integration Procedure as a whole in the Procedure Configuration under the Properties tab. For example:

- Define which data is returned in the response JSON.
- Set the required permissions to run the procedure.
- Track custom data about the performance of the procedure.
- Split the Integration Procedure across multiple transactions to avoid hitting Salesforce governor limits.
- Improve performance by caching data.
- Configure the procedure as a Test Procedure to validate components such as OmniStudio Data Mappers, Apex classes, and other Integration Procedures.

Like the Integration Procedure itself, Actions and Blocks can be configured by using fields under the Properties tab. Actions and Blocks access objects, lists, and other data by name. For example, to use a Loop Block to process items in a list, you enter the name of the list in the Loop List parameter. All Actions and Blocks include a field called Execution Conditional Formula, which you can use to execute the Action or Block only in specific circumstances. One type of Block, the Conditional Block, provides more sophisticated conditional control over a group of Actions.

In the Required Permission field, define roles, profiles, permission sets, or custom permissions.

To write the results of each action to the root level of the Data JSON, you can select Include All Actions in Response.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_note.png)

Note When you enable the Include All Actions in Response setting, any Loop Block in the Integration Procedure can’t process an array of records. This occurs because the `stepResultFinal` array exceeds a size of 1 and results in an error: `Cannot Write Array to Root`.

At the end of an Integration Procedure, you can use a [Response Action for Integration Procedures](https://help.salesforce.com/s/articleView?id=xcloud.os_response_action_for_integration_procedures_54655.htm&release=264.0.0&type=5 "The Response Action ends an Integration Procedure and returns data to the entity that called it. It can also add data to the data JSON or end conditionally. Response Actions are useful for debugging Integration Procedures.") to trim the data and only return what is needed. For specific trimming strategies, see [Manipulate JSON with the Send/Response Transformations Properties](https://help.salesforce.com/s/articleView?id=xcloud.os_manipulate_json_with_the_send_response_transformations_properties_22367.htm&language=en_US). To allow an Integration Procedure to exit early under appropriate conditions, use multiple Response Actions with different Execution Conditional Formulas.

By default, all the actions in an Integration Procedure run in a single transaction. If the transaction exceeds a Salesforce governor limit, Salesforce ends the transaction and the Integration Procedure fails. You can’t set a limit that exceeds the maximum imposed by Salesforce. For details about governor limits, see the relevant Salesforce topic.

- **[Access Integration Procedure Data JSON with Merge Fields](https://help.salesforce.com/s/articleView?id=xcloud.os_access_integration_procedure_data_json_with_merge_fields_48435.htm&release=264.0.0&type=5)**  
    Enable Integration Procedure elements and element properties to access data JSON using merge fields. A merge field is a variable that references the value of a JSON node. For example, if a JSON node is `"FirstName": "John"`, then the merge field `%FirstName%` returns `John`.
- **[Environment Variables in Omnistudio Data Mappers and Integration Procedures](https://help.salesforce.com/s/articleView?id=xcloud.os_environment_variables_in_dataraptors_and_integration_procedures_47878.htm&release=264.0.0&type=5)**  
    You can use environment variables to define Default Values and Filter Values, and in Formulas.
- **[External Objects in Integration Procedures](https://help.salesforce.com/s/articleView?id=xcloud.os_external_objects_in_integration_procedures_55322.htm&release=264.0.0&type=5)**  
    Integration Procedures support Salesforce External Objects. The external data can come from any source that can be accessed using a REST endpoint. The returned data can be rendered as JSON or XML.
- **[Work with Data and Lists](https://help.salesforce.com/s/articleView?id=xcloud.os_ips_work_with_data_and_lists.htm&release=264.0.0&type=5)**  
    Use Integration Procedures to read, write, and transform complex, hierarchical data from Salesforce objects and other sources. Use actions to work with data, and blocks to process it.
- **[Define Execution Logic](https://help.salesforce.com/s/articleView?id=xcloud.os_define_execution_logic_using_conditional_blocks_48515.htm&release=264.0.0&type=5)**  
    Define conditional flow in Integration Procedures by using the Execution Conditional Formula field on an action or block, or by using a Conditional Block to compose a series of mutually exclusive conditions.
- **[Send Email from an Integration Procedure](https://help.salesforce.com/s/articleView?id=xcloud.os_send_email_from_integration_procedure.htm&release=264.0.0&type=5)**  
    To send email from an Integration Procedure, use an Email Action. You can either specify all the email field values or use a Salesforce email template.
- **[Make an HTTP Call from an Integration Procedure](https://help.salesforce.com/s/articleView?id=xcloud.os_workflow_for_http_action_example_53100.htm&release=264.0.0&type=5)**  
    This Integration Procedure example retrieves the astronomy picture of the day from NASA using NASA's publicly available REST API.
- **[Call an Apex Class or an Invocable Action from an Integration Procedure](https://help.salesforce.com/s/articleView?id=xcloud.os_call_invocable_action_or_apex_from_integration_procedure.htm&release=264.0.0&type=5)**  
    To call an Apex class and method, or an invocable action, use a Remote Action and pass in invocation options and data.
- **[Improve Performance by Using Caching](https://help.salesforce.com/s/articleView?id=xcloud.os_cache_for_dataraptors_and_integration_procedures_54751.htm&release=264.0.0&type=5)**  
    Omnistudio offers multiple caching options to improve performance and minimize unnecessary data processing in Integration Procedures. The two primary user-configurable caching types are Org Cache and Session Cache, which are available in Integration Procedure designer. These caching mechanisms are part of the Salesforce Platform Cache and are implemented through Scale Cache in Omnistudio with standard runtime. Each serves a distinct purpose and comes with specific configuration considerations.
- **[Handle Errors in Integration Procedures](https://help.salesforce.com/s/articleView?id=xcloud.os_error_handling_in_integration_procedures_55179.htm&release=264.0.0&type=5)**  
    You can configure the conditions for success or failure of an Integration Procedure action or group of actions.
- **[Integration Procedure Best Practices](https://help.salesforce.com/s/articleView?id=xcloud.os_integration_procedure_best_practices_54721.htm&release=264.0.0&type=5)**  
    To maximize the benefits of Integration Procedures, follow the best practices whenever possible.

#### See Also

- [Integration Procedure Event Tracking](https://help.salesforce.com/s/articleView?id=xcloud.os_integration_procedure_event_tracking_57801.htm&release=264.0.0&type=5 "For Integration Procedures, the following events are tracked. When one Integration Procedure calls another, and you enable tracking only in the calling Integration Procedure, events in the called Integration Procedure are also tracked.")
- [Syntax of the Required Permission Property](https://help.salesforce.com/s/articleView?id=xcloud.os_syntax_of_the_required_permission_property_56644.htm&release=264.0.0&type=5 "Omnistudio Data Mappers and Integration Procedures have a Required Permission property, which determines who has runtime access. You can specify roles, profiles, permission sets, custom permissions, or any combination. If Required Permission is blank, any user can run the Data Mapper or Integration Procedure unless the DefaultRequiredPermission property is set.")
- [Settings for Long-Running Integration Procedures](https://help.salesforce.com/s/articleView?id=xcloud.os_settings_for_long_running_integration_procedures_56206.htm&release=264.0.0&type=5 "You can use chainable and queueable chainable settings to avoid hitting Salesforce governor limits when invoking long-running Integration Procedures. You can also chain on one or more specific long-running steps.")
- [Improve Performance by Using Caching](https://help.salesforce.com/s/articleView?id=xcloud.os_cache_for_dataraptors_and_integration_procedures_54751.htm&release=264.0.0&type=5 "Omnistudio offers multiple caching options to improve performance and minimize unnecessary data processing in Integration Procedures. The two primary user-configurable caching types are Org Cache and Session Cache, which are available in Integration Procedure designer. These caching mechanisms are part of the Salesforce Platform Cache and are implemented through Scale Cache in Omnistudio with standard runtime. Each serves a distinct purpose and comes with specific configuration considerations.")
- [Integration Procedure Actions](https://help.salesforce.com/s/articleView?id=xcloud.os_integration_procedure_actions_50165.htm&release=264.0.0&type=5 "To compose an Integration Procedure, you add actions that run sequentially. These actions can set data values, perform functions, call Omnistudio Data Mappers, invoke Apex classes, send emails, invoke REST endpoints, run other Integration Procedures, and more.")
- [Integration Procedure Blocks](https://help.salesforce.com/s/articleView?id=xcloud.os_group_integration_procedure_steps_using_blocks_48498.htm&release=264.0.0&type=5 "In an Omnistudio Integration Procedure, you can run a group of related steps as a unit inside a block to execute them conditionally, cache them, repeat them for each item in a list, or return an error if they fail.")