Example #2: Get Account Contacts Details
In this example we will continue the flow we showed in Example #1 and we will also populate the contact names under a selected account.
For this task we will need to add a section, containing 2 textboxes: one to capture the contact "Last name" and the other to capture the "First Name".
Following are step by step instructions to populate contacts of a chosen account:
1- | In order for this example to work you will need to make sure you have sample data in your Salesforce "account" object. Simply enter Salesforce, add a few contacts under several accounts and be sure to fill in first name and last name for each one. |
2- | Enter the form builder and open the form we created in example #1. |
3- | Drag a section element. drag 2 textboxes inside the section, and place them one above the other. |
4- |
Change the upper textbox label text to "Contact last name" (in "Properties panel" > "Element" tab > "Settings" option > Label) - we will populate the contact's last name into this label. Change the Lower label text to "Contact first name" (in "Properties panel" > "Element" tab > "Settings" option > Label) - we will populate the contact's first name into this label. |
5- | Save the form |
6- | Now that the fields have been added you will need to update your "Get" integration: Go to "Properties panel" > "Form" tab > "Settings" option > "Salesforce Integration" category > Get From Salesforce Press on "Map fields" button - this will open the "Get" window, where you already configured 2 lines for your integration. |
7- |
Press on the "Add" icon (+) in the second line to create a child under it. Now a window will open and you will be required to configure this "get" line. Under the "Salesforce object settings" category: - In the dropdown - Select an object: Contact Under the "Condition" category: - Please notice that the condition is already set. This is because this is a child item. - in the ""If multiple matches found" radio button - choose "All" You can enter the set condition where you will find the following condition: Account ID Equals #2 Account > Account ID Now Under the "Map fields" category: - press on the "Set mapping" button and map your salesforce fields to the ones in your form. first and last name in the form to the contact fields in SF. Please note that you can use the filter and search box inside the dropdowns to find the items you are looking for. Press on apply when done. |
8- |
You will now see a new line has been added to your integration window, as a child of line 2. |
9- |
Press "apply" and save the form. |
10- |
Publish the form as "url" to test it Open the dropdown element and you will see your accounts from Salesforce. Choose an account and you will see its contacts names in the section (along with the previous details: Phone number and website). |