Use Response Data Handling to Store Data Received from a Third-Party System
Response Data Handling enables you to store responses from third-party systems in a ProntoForms Data Destination 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.. This topic describes how Salesforce, ServiceNow, and HTTP Data Destinations can store responses for use in subsequent Data Destinations.
Supported on the Advanced and Enterprise tiers:
Contents
What is Response Data Handling?
The term Response Data Handling refers to how ProntoForms stores Key‑value pairs A key-value pair is a set of two related data elements. The first element identifies the type of data, such as "name". The second element identifies the actual value, such as "Elizabeth". in a Data Destination based on a third-party system response. You can store this response data in Salesforce, ServiceNow, and HTTP Data Destinations.
You can use the stored response output in subsequent Data Destinations to make sequential requests to other systems. For example, you can:
-
Create a Salesforce or ServiceNow record in an initial Data Destination and use the stored ID for that record in a subsequent Data Destination.
-
Create a document with an initial HTTP Data Destination and store a URL based on the third-party system response. A subsequent Email Data Destination can send an email that includes the URL stored by the initial (parent) destination.
How Response Data Handling works
When ProntoForms executes a Data Destination, it “calls” a third-party system. The third-party system returns a structured response that the ProntoForms server converts into key‑value pairs.
For example, if an HTTP server responds with the following JSON body:
{ "id": 12345, "profile": { "firstName": "John", "lastName": "Smith" }, "contact": { "home": { "email": "jsmith@gmail.com", "phone": "613-225-5555" } } }
then the resulting key-value response output is:
Key | Value |
---|---|
body.id |
12345 |
body.profile.firstName |
John |
body.profile.lastName |
Smith |
body.contact.home.email |
jsmith@gmail.com |
body.contact.home.phone |
123-456-7890 |
Tip:For specifics about the key-value pairs in a third-party system response, refer to that system's documentation.
The following table describes the process of storing and using response outputs.
Component | Action |
---|---|
ProntoForms Data Destination 1 | Creates a new record in the third-party system. |
Third-party system | Responds with key-value pair data, such as the record ID. |
ProntoForms Data Destination 1 | Stores the output returned by the third-party system response. |
ProntoForms Data Destination 2 Tip:This is the “child” Data Destination. |
Looks up the values stored by ProntoForms Data Destination 1 and uses these values to identify the “parent” record in the third party-system. |
Note:Only Salesforce, ServiceNow, and HTTP Data Destinations currently store response outputs. Any subsequent Data Destination, however, can use the stored result.
How to reference stored responses
The %o
DREL 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. reference links the initial and subsequent ProntoForms Data Destinations, as described in the following example:
%o[Destination Unique IDA 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.
Info:The topic DREL Complete Reference List provides more detail about DREL syntax.
Examples of Response Data Handling
Create Parent and Child records
The following diagram illustrates how ProntoForms uses stored responses to create linked Salesforce records produced by separate Data Destinations. In this example, a Salesforce Case Data Destination gets the stored AccountId
from the Salesforce Account Data Destination. This creates a “child” Case record for a “parent” Account record.
Note:The lookup field between the parent and child records must already exist in Salesforce.
The following example shows the response output from a Salesforce Account Data Destination:
The topic View Destination Response Outputs in the Web Portal describes how to find out what your Data Destination stores.
The topic Configure Response Data Handling for Salesforce Data Destinations describes how to set up a parent-child relationship.
For more information about Salesforce API responses, refer to the Salesforce API documentation.
Use the Response Outputs to send an Email
HTTP Data Destinations return all headers, status information, and any custom-configured response information. In the following example, response outputs stored in an HTTP Data Destination populate fields in a subsequent Email Data Destination:
Note:ProntoForms can only parse JSON and XML responses for HTTP destinations.
-
To test what your HTTP destination stores, follow the instructions to View Destination Response Outputs in the Web Portal.
-
The topic Configure Response Data Handling for HTTP Data Destinations describes how to set up a parent HTTP destination.