- What Information is Stored?
- Configuring Your Data Destinations
- How to View Destination Response Outputs in the Web Portal
- Using Destination Response Outputs
Destination response outputs allow users to make sequential requests to other systems, typically to create parent-child relationships in the data or objects you are creating in those systems. For example, a user might want to create an object in a first destination, and have destination response outputs pass the ID for that object to the next destination to add an appropriate attachment to it. The response output from one destination, such as the headers or HTTP status, from one destination can be fed into the input of a subsequent destination using key:value pairs, using Data Record Expression Language.
Currently, the only destinations that support Destination Response Outputs are:
What Information Can I Use?
When a ProntoForms data destination executes, it is typically making an API call to the third-party system it's connecting to. That third-party system has a standard response for the API call made by ProntoForms; response outputs are a way to store those responses so that details from that response can be used in a future destination. The information you can use depends entirely on what the other system's response to the API call is.
"Response Outputs" are information sent back from the integrated system by the data destination after it executes, such as whether the data was successfully sent, or the IDs of objects created in another system using form submission data. The information stored varies by destination type, and depends on what that other system returns as a response to the API call, but can all be accessed via using Data Record Expression Language's %o syntax:
%o[Destination Unique ID][key]
Salesforce destinations return a limited amount of information. Below is a sample from a Salesforce Account Data Destination:
- ID: The Salesforce ID associated with the Account/Contact/etc.
- Success: True/False
- Errors: Any Salesforce-specific errors.
For more information on what the Salesforce API returns, please read Salesforce's API documentation (external link): Create a Record | REST API Developer Guide
HTTP Destinations return all headers, status information, and any custom-configured response information, and can be referenced using the %o DREL syntax. The standard format displayed on the Form Submission page is:
- Status: status of the http call
- Headers.*: list of headers and their values
- Body.*: list of properties from the body and their values
A sample set of outputs is shown below:
For full details on what the system you are connecting to returns, please look at that system's documentation. The above is not representative of all HTTP Destinations. To test what your HTTP Destination returns, configure the Destination Response Outputs, submit a form, and follow the instructions below.
Note: for HTTP Destinations, ProntoForms can only parse JSON outputs.
Sample Use Case: Salesforce Account/Custom Object
Salesforce supports parent/child relationships between objects. Some users may want to be able to create an Account object in Salesforce, then create a custom object under the Account. Creating the custom object requires the ID of the Account object.
- Destination 1: Salesforce Account
- Unique ID: salesforce-account
- Inputs: DREL account data fields from Submission
- id: Account ID
- Destination 2: Salesforce Custom Object
- Unique ID: salesforce-custom-object
- Custom Object API Name
- DREL Fields from Submission
- Account ID from Destination 1 (
In our example, we'll be using the Salesforce Account and Salesforce Custom Object Data Destinations and modeling the use case above.
- Set up your Data Destination as normal. In this case, we are setting up a Salesforce Account Data Destination.
- On the Destination Basics tab, add a Unique ID for the destination. This Unique ID must be unique per FormSpace.
- In the Response Configuration tab, under Response Data Handling, select Store all response outputs for use in later destinations.
- Save the data destination as normal.
- Set up the Salesforce Custom Object Data Destination as normal.
- In Salesforce, find the correct API Name for the Custom Object.
- In ProntoForms, in the Custom Object Fields tab, under Custom Salesforce Fields, enter the API Name, and then enter the DREL value expression (%o[Destination Unique ID][key]):
- Save the destination as normal.
How to View Destination Response Outputs in the Web Portal
As each destination's response output may vary, it can be helpful to look at the responses to a form submission. After configuring destination response outputs on the destination and submitting a form, you can look at the outputs:
- Navigate to your list of form submissions for the correct form, and select the appropriate form submission.
- Expand the Form Submission Processing and Destinations sections:
- Select Destination Outputs to be shown a list of all responses.
Using Destination Response Outputs
While only supported destinations currently produce outputs, any destination can use the result; for example, if the first destination creates a document and returns the URL to that document, you could create a second destination that, for examples, enters that URL in a table in that second destination.
Or, if you wish to have a second destination that activates when a certain output is returned from the first, you could set up destination filtering using the %o DREL.