Loading
Ongoing maintenance for Salesforce HelpRead More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Invoke a Chainable Integration Procedure with REST Calls

          Invoke a Chainable Integration Procedure with REST Calls

          A chainable Integration Procedure is split into multiple transactions to avoid hitting Salesforce governor limits. Using a REST API is the easiest way to see the partial responses each transaction returns before the Integration Procedure completes.

          Before You Begin

          Use the Integration Procedure with the REST API:

          1. Open the Integration Procedure example in your org. If you imported the DataPack, it's listed under Documentation/IPTryCatch2 or Documentation/IPTryCatchF2.
          2. In the Preview tab, try different Name input parameter values until you find one that returns more than one record but not many. An ideal Name value returns two names.
          3. In the Procedure Configuration, click Deactivate Version if the Integration Procedure is active so you can edit it. Set the Chainable Query Rows Limit to a value low enough to cause chaining.
            For example, if the Name value in the previous step returns two records, a Chainable Query Rows Limit value of 1 results in two transactions. If the Name value returns three records, a Chainable Query Rows Limit value of 2 results in three transactions.
          4. Go to the DRExtractAction1 component and check its Chain on Step property.
          5. Go back to the Procedure Configuration and click Activate Version.
          6. In a terminal, enter a curl command of this form to call the REST API:
            curl -X POST \
            -H 'Authorization: Bearer session_id' \
            -H 'Content-Type: application/json' \
            -H 'chainable:true' \
            --data-raw '{"Name":"Name"}' \
            https://ap1.salesforce.com/services/apexrest/namespace/v1/integrationprocedure/Type_SubType

            For example, if the Name is Jones, the namespace is omnistudio, the Type is Documentation, and the SubType is IPTryCatchF2, enter this curl command. The session ID, which is a long string of the form 00Dnn000000nnnn!ARUAQLt...QqodNY3, is shown as SessionId for clarity.

            curl -X POST \
            -H 'Authorization: Bearer SessionId' \
            -H 'Content-Type: application/json' \
            -H 'chainable:true' \
            --data-raw '{"Name":"Jones"}' \
            https://MyDomainName.my.salesforce.com/services/apexrest/omnistudio/v1/integrationprocedure/Documentation_IPTryCatchF2
            Tip
            Tip

            You can assemble the curl command in a text editor and copy it into the terminal.

          7. Examine the response, which contains the vlcIPData:
            {
              "vlcUseQueueableApexRemoting": false,
              "vlcMessage": null,
              "vlcIPData": "dc3e1986-2f7c-0871-e968-28eb63e11820",
              "vlcStatus": "InProgress"
            }
            Note
            Note

            Integration Procedure Preview handles chaining automatically, so you never see this type of response in the Preview.

          8. Add a header for the vlcIPData to the curl command and enter it:
            curl -X POST \
            -H 'Authorization: Bearer SessionId' \
            -H 'Content-Type: application/json' \
            -H 'chainable:true' \
            -H 'vlcIPData:dc3e1986-2f7c-0871-e968-28eb63e11820' \
            --data-raw '{"Name":"Jones"}' \
            https://MyDomainName.my.salesforce.com/services/apexrest/omnistudio/v1/integrationprocedure/Documentation_IPTryCatchF2
          9. Examine the response. If it contains another vlcIPData value, repeat the previous step with the new vlcIPData value. Keep repeating with each new vlcIPData value until the response contains no such value.

            This response is an example of what's returned when the Integration Procedure is complete.

            {
              "response": {},
              "ResponseAction1Status": true,
              "Name": "Jones",
              "options": {
                "Accept": "*/*",
                "X-B3-SpanId": "ee09609f22d890e1",
                "CipherSuite": "ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 256-bits",
                "User-Agent": "curl/7.64.1",
                "X-B3-Sampled": "0",
                "Host": "MyDomainName.my.salesforce.com",
                "X-B3-TraceId": "ee09609f22d890e1",
                "chainable": "true",
                "X-Salesforce-SIP": "42.42.42.42",
                "Content-Type": "application/json"
              },
              "DRExtractAction1Status": true,
              "DRExtractAction1": [
                {
                  "ContactName": "John Jones"
                },
                {
                  "ContactName": "June Jones"
                }
              ],
              "TryCatchBlock1Status": true,
              "TryCatchBlock1": null
            }
           
          Loading
          Salesforce Help | Article