Example #1: Push Contact or Account Details With Conditional Logic
In this example we will present the user with a dropdown containing 2 options: Account and Contact. If he chooses "Account" a textbox will appear in which he will have to enter an account name. If he chooses "Contact" a textbox will appear in which he will have to enter a contact's name. Once user submit the this form the data will be created under the relevant object in Salesforce.
Following are step by step instructions to push the data to Salesforce with a condition:
1- | Open the form builder and create a new blank form. |
2- | Drag a Dropdown element. define 2 items in it: Account and Contact. Turn off the "Add Other" option. (in "Properties panel" > "Element" tab > "Settings" option > Basic > Options) |
3- |
Drag a Textbox and change its label to "Account Name" (in "Properties panel" > "Element" tab > "Settings" option > "Basic" > Label) |
4- |
Drag another Textbox and change its label to "Contact last name" (in "Properties panel" > "Element" tab > "Settings" option > "Basic" > Label) |
5- |
Drag a button. |
6- |
Select the Dropdown and add a condition to it (in "Properties panel" > "Element" tab > "Settings" option > "Conditioning" ) Press on the "Configure Conditions" button and set 2 rules: - Set Rule #1: Dropdown Equals Account - Press on the "Configure fields visibility" button - Change "Account Name" status to "Show". - Press "Apply" This means that if user chooses the "Account" value in the dropdown the "Account name" textbox will appear. - Set Rule #2: Dropdown Equals Contact - Press on the "Configure fields visibility" button - Change "Contact last Name" status to "Show". - Press "Apply" This means that if user chooses the "Contact" value in the dropdown the "Contact last Name" textbox will appear. Press on the "Apply" button and save the form. |
7- |
Now that the form is created you will need to set up the "Push" integration: Go to "Properties panel" > "Form" tab > "Settings" option > "Salesforce Integration" category > Push to Salesforce Press on "Set Notification" button - this will open the "Push" window, where you will need to configure the "Push" integration. |
8- |
First authenticate with Salesforce. |
9- |
Press on the "Add Object" button. - Select the "Account" object from the dropdown. - In the "Select an action" radio button: choose "Create" - Press on the "Set conditions" button and set the following rule: Dropdown Equals Account. - Press "Apply" - Now map fields: Account Name > Account Name - Press "Apply" |
10- |
Now you will see a line has been added to your integration window. On the left side you will see its number is "1" and its name is "Account" (based on the object you chose) On the right side you will see 4 icons: Edit, Duplicate, Add and Delete. - Pressing on the "Edit" icon will allow you to change the configuration of the relevant line. - Pressing on the "Add" icon from a specific line will allow you to configure a line under it - in hierarchy. - Pressing on the "Add" icon will enable you to add a child object under the object you connected to in the line. - Pressing on "Delete" icon will remove the line from the integration window. |
11- |
Press on the "Add Object" button. - Select the "Contact" object from the dropdown. - In the "Select an action" radio button: choose "Create" - Press on the "Set conditions" button and set the following rule: Dropdown Equals Contact. - Press "Apply" - Now map fields: Last Name > Contact last name - Press "Apply" |
12- |
Now you will see that you have 2 lines in your "Push" integration window. Press "Finish" and save form |
13- |
Publish the form as "url" to test it Open the dropdown and choose "Contact". You will then see a contact textbox appear. Enter a contact name and press on submit. Now go to your Salesforce account and open the Contacts object - you will see a new contact has been added. Now test the account creation option: Open the dropdown and choose "Account". when an account textbox appears fill in an account name and submit the form. Enter your Salesforce account again and check your accounts object - you will have a new account added there. |