Use a Repeatable Destination to Update Existing Child Records in Salesforce
This recipe shows you how to update Calibration Test records associated with a Salesforce Case. You’ll set up a form to include a Repeatable Section A repeatable section is a section type available in the Form Builder that enables the mobile app user to submit multiple answers to the same set of questions. In the mobile app, entries are displayed in a summary table for easy viewing. so that users can enter the calibration details as line items in a table. You’ll also set up two Data Sources Data sources, also known as "Lookups", are external sources of data that you upload or connect to ProntoForms. You can reference this data in a form to populate answers or answer options. Data sources save typing, reduce errors, and make it easy to provide mobile users with only the relevant, most current data. and two Salesforce Data Destinations, one Regular and one Repeatable Destination A Repeatable Destination is a ProntoForms Data Destination that sends data from a Repeatable Section to a field-based, third-party system.. Then, you’ll submit the form to see the results in Salesforce.
Your ProntoForms account must be on the Enterprise or Advanced tier.
You must be a ProntoForms Admin user.
You must meet the requirements to set up a Salesforce Connection.
You must know how to set up Salesforce objects and records with lookups to establish parent-child relationships.
In the field, your service technicians perform equipment calibrations as part of their preventive maintenance tasks. Your back office maintains records of this work in a custom “Calibration List” object linked to a standard Case object.
In this scenario, the Case and Calibration List records and their lookup relationships already exist in Salesforce.
Info:In this recipe, you don’t need to set up the ProntoForms Data Destinations as parent and child.
You can use the ProntoForms Repeatable Sections, Regular Destinations, and Repeatable Destinations to:
Enable technicians to enter multiple line items for the calibration tests.
Update the Calibration List records with data from the Repeatable Section using a Repeatable Data Destination A Data Destination specifices 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..
Update Salesforce Case records with details of the service call, including the calibration tests.
|Salesforce||Create a custom “Calibration List” object.||This object stores the line-item data from the Repeatable Section in the form.|
|Link the Calibration List to the Case object.||This makes the Calibration List details available from the Case view.|
|ProntoForms||Set up two Salesforce Data Sources, one for the Case records and the other for the Calibration List records.||These prepopulate the form with the IDs and other data from the existing Case and Calibration List records.|
|Build a form that includes a question to capture the Case record ID.||When the technician selects the case number from a Dropdown question, the associated Case ID gets pushed to another question in the form.|
|Add a Repeatable Section to the form.||The technician enters the calibration test details as line-item entries.|
|Set up a Salesforce Case Data Destination.||This is the initial Regular Destination that updates the Salesforce Case record.|
|Set up a Salesforce Standard, Custom, or Big Object Data Destination for the Calibration List.||This is the subsequent Repeatable Destination A Repeatable Destination is a ProntoForms Data Destination that sends data from a Repeatable Section to a field-based, third-party system. that updates the Calibration List records.|
|Associate the two Data Destinations with the form, and then deploy the form.||
When the user submits the form, the Data Destinations run sequentially.
The initial destination updates the Case record, and the subsequent destination updates the Calibration List records.
Create a custom “Calibration List” object with a lookup to the parent “Case” object.
Set up a Salesforce Data Source to send the Case data from Salesforce to ProntoForms. This example uses a SOQL query. Name this Data Source “Cases”.
Set up another Salesforce Data Source to send the Calibration List data from Salesforce to ProntoForms. This example also uses a SOQL query. Name this Data Source “Calibration List”.
In your form, add a “Case number” dropdown question that uses the Cases Data Source. Configure this question to push data to the Case ID question.
Add a Repeatable Section to the form:
Add a Section > Repeatable
Tip:Take note of the unique identifier to use in step 7a.
Add an “Equipment Name” dropdown question that uses the Calibration List Data Source. Configure the Equipment question to push data to the Equipment ID and Model questions.
Set up the Salesforce Case Data Destination:
Enter the Destination Basics. Name this destination “Case Updates”.
In the Destination Type section, select the option to make this a Regular Destination. This destination updates the Case record with data from the regular sections in the form.
%aDREL 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 to map the Case Fields to the unique IDs of the questions in the form.
Set up a Salesforce Standard, Custom, or Big Object Data Destination for the “Calibration List” Repeatable Destination.
Enter the Destination Basics, and name this destination “Calibration Tests”.
In the Destination Type section, select the option to make this a Repeatable Destination. Enter the unique identifier of the Repeatable Section that contains the calibration questions.Tip:You can find the section unique identifier here:
Manage Forms > FormName > Pages & Questions
Map the Custom Fields in the destination to the unique IDs of the questions in the form.
In this example, the parent-child records and relationships already exist in Salesforce. This means that you can use the
%aDREL reference to link the Calibration Test records with the parent Case record. You don’t need to create a parent-child relationship between the Regular and Repeatable Destinations.
Associate the Data Destinations with the form.
In your form, go to Destinations, and then select Add a Destination.
Result: You can choose from a list of all destinations, or you can filter the list to display only Regular or Repeatable Destinations.
Select the Regular Destination.
Repeat steps 8a and 8b for the Repeatable Destination.
Note:You can’t attach documents to a Repeatable Destination. This prevents duplication of the same document across multiple records.
After you’ve tested the form, Save and deploy it.
In the ProntoForms app, open the form, enter data, and submit the form.
Result: The Data Destinations update the Salesforce Case and Calibration List records. Go to your Salesforce Org and check the updated records.
Want to know more? The following topics provide detailed information about the features and functionality used in this recipe.