Configure Response Data Handling for Salesforce Data Destinations

When a Data DestinationClosed A Data Destination specifies where to send data from a submitted form. You can use Data Destinations to automate data sharing and storage, routing data to a specific service (such as email or cloud storage) in several different formats. executes, it creates or updates a record in TrueContext or a third-party system. Response Data Handling enables you to store response outputs, such as record identifiers, after a Data Destination executes. You can reference the output stored in a “parent” destination in subsequent “child” destinations to make sequential requests to a third-party system. This topic demonstrates how you might use response data handling to create parent-child relationships between Salesforce Data DestinationsClosed A Data Destination specifies where to send data from a submitted form. You can use Data Destinations to automate data sharing and storage, routing data to a specific service (such as email or cloud storage) in several different formats..

Available on the Advanced and Enterprise tiers:

Essentials
Advanced
Enterprise

Steps to set up Response Data Handling

  1. Configure your initial Salesforce Data Destination.

  2. On the Destination Basics tab, add a Destination Unique Identifier for the destination. This ID must be unique to each FormSpaceClosed FormSpaces are where forms are stored and organized in the TrueContext Web Portal. A TrueContext Team may have multiple FormSpaces, depending on their needs. Admins can set FormSpace permissions to control which users have access to the forms in that FormSpace..

  3. On the Response Configuration tab, in the Response Data Handling section, select Store all response outputs….

  4. Save the initial Data Destination.

  5. Configure the subsequent Salesforce Data Destination.

  6. On the Field Mapping tab, in the Custom Salesforce Fields section, enter the API Name of the Salesforce Field. Then, enter the following DRELClosed Data Reference Expression Language (DREL) is used to get form data and metadata and add it to a string, such as dates, usernames, or answers to questions in forms. expression:

    %o[Destination Unique IDClosed A Unique ID refers to the specific identifier of a question, form page, form section, or Data Destination. Unique IDs are used as reference points when pulling data for conditional logic, Analytics projects, Data Destinations, and Documents.][key]

    where

    • Destination Unique ID is the unique identifier for the initial Data Destination, and

    • key identifies a specific value in the stored response.

    Custom Salesforce Fields section that shows the Salesforce API Name "AccountId" and a DREL expression "%o[InitialDestination][id]".

  7. Save this Data Destination.

  8. In the Form BuilderClosed The Form Builder is the tool that form designers use to create forms. In the Form Builder, accessed from the TrueContext Web Portal, form designers can add and edit pages, sections, and questions, as well as attach data destinations and configure the form's settings., add both Data Destinations to your form. The initial Data Destination must precede the subsequent Data Destination.

    Tip:You can use the data stored in a preceding destination in any number of subsequent destinations.

How TrueContext stores Salesforce response outputs

When you set up response data handling, TrueContext stores the ID of the last Salesforce object created or updated. The following table contains examples of how TrueContext stores Salesforce IDs.

If the Data Destination... TrueContext stores...
Only creates or updates a record in Salesforce the record ID.
Creates or updates a record and attaches documents or images as files the ID of the last file attached.

Tip:If you need to create a record, store its ID, and also add attachments to it, create separate Data Destinations. The first Data Destination can create the record and store its ID for subsequent use. The second Data Destination can use the stored ID to match on the record and attach files.