Create a Record in Salesforce
Introduction
In this tutorial, we will learn how to create a simple contact us form and turn new responses into new contacts in Salesforce.
Create a new form
On your Formcrafts dashboard ↗ click on Add Form → Start from scratch. Enter a Form name and hit enter. This will create a new form.
You can also create a new form by clicking on Add Form → Use a Template and selecting a template. This would allow you to skip this step. We have a large collection of lead generation form templates ↗ that you can use.
Now add some basic fields to your form using the Add field button on the top-left corner of the form editor:
- First name (One line text)
- Last name (One line text)
- Salutation (Multiple choice)
- Email (Email)
Create a workflow
Click on the Workflows button on the top-left corner of the form editor, and then click on the Add workflow button.
Now edit the new workflow, and click on Add action. Under (select action) find Salesforce, and click on Connect to Salesforce.
This will open a popup window where you can connect to your Salesforce organization.
Configure the action
Our action should be Create a Contact.
Next have to use the Field mapping section to map the form fields to Salesforce fields.
Under (Form data) you can use plain text or reference fields using the @ key. We will create the following field mappings:
Note that we created a Salutation field before. This field has pre-defined options in Salesforce but they don’t currently match the options in Formcrafts. We will fix this in the next step.
Autofill field options
Since the Salutation field is a picklist-type field in Salesforce, the options in our form must match the options in Salesforce.
Luckily, Formcrafts can pull the options from Salesforce. Edit this field, and go to Options → Autofill and look for Salutation under Salesforce contact picklists.
Note that this will fetch the options from Salesforce but it won’t update the options if they change in Salesforce. If you want to have real-time options you can use our Salesforce dynamic picklists.
Save and test
Click on the Preview button on the top-right corner of the form editor, and submit the form to test the workflow.
Formcrafts keeps a record of all successful and failed workflows which you can view using the Logs button on the top-left corner of the form editor.
Learn more about Workflow logs.
Notes
Conditional workflows
By default the Salesforce action(s) is triggered on each form submit. We can add conditions to our workflow to trigger the action(s) only when certain conditions are met. Edit your workflow and click on Add condition. Here you can add conditions, or even create condition groups.
Update contacts
This simple tutorial shows how to create a new contact in Salesforce. Next learn how to configure a form to update a record in Salesforce.