Signup

Salesforce integration: Mapping and records

This guide covers how to use the Salesforce integration to set up mappings between Typeform questions and Salesforce records and fields. We've also included a list of FAQs related to mapping - click here to jump to them.

Haven't set up your Salesforce integration yet? Check out our guide here for installation and setup instructions. 

Make sure you've updated to our latest Salesforce Integration to ensure you have the smoothest experience. Click here to update to the latest version, then click the Use this integration button.

Click a section name to jump to that section:

Map a typeform to a Salesforce object

We're going to use a lead generation typeform as an example of how you can map them to Salesforce objects.

The heart of the Typeform app resides in the Typeform Forms tab. This is where, once synced, you can access the list of forms from your Typeform account, and start linking them to new Salesforce records.

1. Let’s click on a Form Number to start mapping questions to attributes:

sf15.png

2. If your forms already have mappings into Salesforce, they will appear on this page. You can select one to edit it. In this case, let’s create a new mapping. Click on New Typeform Mapping.

sf16.png

3. Select the object you want to create in Salesforce with this form’s responses. Then click Save & Create Mappings:

sf17.png

4. Select the attributes of a lead that you want to fill with each question, as shown here. You can choose between Create New, which will create a new lead record each time your typeform is submitted, and Check for Existing, which will check for matching existing records and update those, if applicable, before creating a new one:

sf_new1.jpg

Your typeform field mappings will be dynamic, meaning that they can receive different values each time the form is submitted.

You can also map Salesforce fields to a static value by clicking New in the Static Field Mappings section. This way the Salesforce field always receives the same value when the typeform is submitted. This can be useful if your typeform is embedded on a Contact Us page, for example, and you know you'll always have the same value for a certain field for each typeform submission. 

Salesforce_static.png

For example, the Lead Source Salesforce feed can be mapped to the My Landing Page or the Phone Inquiry static field values. 

In your Dynamic Field Mappings, you can use the Make Key checkboxes to select the values the integration checks to see whether a record already exists or not.

In the example below, the integration will only update the rest of the information if the First Name, Last Name and Email values match with an existing record:

sf_new3.jpg

If you're curious about static and dynamic lists in Salesforce, you can also check out this Salesforce help article to learn more.

This table shows compatible mappings between Typeform question types and Salesforce field types:

Typeform question type Salesforce field type
Short Text Text, Text Area
Long Text Text Area (long)
Email Email
Phone Phone
Number Number
Date Date
Multiple Choice (single select), Dropdown Picklist
Multiple Choice (multi-select) Picklist (Multi-Select)
Picture Choice (single select) Text, Picklist
Picture Choice (multi-select) Text, Picklist (Multi=Select)
NPS®, Opinion Scale, Rating Text, Number
Website URL
Ranking Long Text Area, Rich Text
Matrix Long Text Area, Rich Text
Hidden Fields Text
Variables, scores Text, Text Area, Long Text Area, Number, Percent
Response timestamp Date/time

All Text fields in Salesforce have a default character limit of 255 characters. 
To avoid potential errors caused by exceeding this limit, we recommend setting a 255 character limit to the Text questions of your typeform as well.

Yes/No and Legal questions should be changed to Multiple Choice questions with the options “Yes”/“No” or “I accept”/“I don’t accept” respectively. They can then be mapped onto a Picklist field in Salesforce.

The Salesforce integration currently does not support File Upload or Payment questions.

You can also create conditional mappings between Hidden Fields and regular fields. For example, you can map both a Hidden Field and an Email field to a Salesforce Email field. In this case, the field with a non-null value will be mapped to the Salesforce Email field. The default value of a Hidden Field, for example, "xxxxx", is considered a null value.

5. The Typeform app will help filter out any Salesforce fields that are incompatible, based on the question types of the form.

Make sure that the mandatory fields of the object type you are creating are mapped to a typeform question. These fields are indicated with (Required) in the Salesforce field list. The typeform questions you map to these fields should also be required, so that all necessary information is collected and a new Salesforce record can be created for each typeform submission.  

If you try to map a Typeform question that’s not required to a mandatory Salesforce field, you’ll see a warning message, like below:

sf_new2.jpg

HC_BobRoss_ilu_cropped.png
Tips! You can also map the email hidden field of your typeform to the email field in Salesforce.

6. From now on, every time Salesforce runs the scheduled job (as you configured above), any new leads collected with your Typeform will be delivered as new leads to your Salesforce object!

You can also check out this article to find out how to map Typeform responses to custom objects in Salesforce.

Edit Field Mappings

Click a Field Mapping and select Edit to check the Record Creation Behavior of your form submissions. 

In your Dynamic Field Mappings, you can use the Make Key checkboxes to select the values the integration checks to see whether a record already exists or not.

In the example below, the integration will only update the rest of the information if the First Name, Last Name and Email values match with an existing record:

sf_new3.jpg

Mapping FAQs

Read on to find the answers to several common mapping-related questions: 

- What Salesforce fields can I map my Typeform questions to? 

- Can I map more than one Typeform question to the same Salesforce field?

- I edited my typeform questions and published the form to update it, but the Salesforce field mappings don’t reflect how my form looks.

- What kinds of records can I create in Salesforce?

- Can I map to one object and have the integration check for those values in another object before creating a new record?

- Can I update existing records in Salesforce with my Typeform integration?

- How do I map Multiple Choice questions to Salesforce object fields?

- How can I identify a record (like a Lead, Case, or Contact) that has been created from a typeform response?

- My Hidden Fields are showing as hidden1, hidden2, etc., in Salesforce instead of the names I gave them in Typeform. Why?

- Can I map typeform metadata to Salesforce?

- Why am I seeing an “Exception: Attempt to de-reference a null object” error?

- Why am I seeing an error telling me that my field “can not be sorted in a query call”?

- Why am I seeing an 'Error: "DUPLICATES_DETECTED"' error?

- Why am I seeing an 'Error: "Invalid Field for (Lead/Contact/[Etc]): Upsert records"' error?

- Why am I seeing a 'Can't Map Same Salesforce Field to Two Questions: undefined' error?

- Can I set up a mapping to a Record Type field in Salesforce?

- Does the integration import all submissions every time it retrieves responses or just new ones?

Don't see your question in this list? Click here to view a page with general troubleshooting tips for the Salesforce integration. 

What Salesforce fields can I map my typeform questions to?

This table shows compatible mappings between Typeform question types and Salesforce field types:

Typeform question type Salesforce field type
Short Text Text, Text Area
Long Text Text Area (long)
Email Email
Phone Phone
Number Number
Date Date
Multiple Choice (single select), Dropdown Picklist
Multiple Choice (multi-select) Picklist (Multi-Select)
Picture Choice (single select) Text, Picklist
Picture Choice (multi-select) Text, Picklist (Multi=Select)
Opinion Scale, Rating Text, Number
Website URL
Ranking Long Text Area, Rich Text
Matrix Long Text Area, Rich Text
Hidden Fields Text
Variables, scores Text, Text Area, Long Text Area, Number, Percent

Yes/No and Legal questions should be changed to Multiple Choice questions with the options “Yes”/“No” or “I accept”/“I don’t accept” respectively. They can then be mapped onto a Picklist field in Salesforce.

The Salesforce integration currently does not support File Upload or Payment questions.

You can also create conditional mappings between Hidden Fields and regular fields. For example, you can map both a Hidden Field and an Email field to a Salesforce Email field. In this case, the field with a non-null value will be mapped to the Salesforce Email field. The default value of a Hidden Field, for example, "xxxxx", is considered a null value.

Can I map more than one Typeform question to the same Salesforce field?

No, this is currently not possible. When creating mappings for this integration, you can only choose a Typeform question or a Salesforce field once.

Our integration allows you to map one form to multiple objects in Salesforce, provided there are active mapping records for each object. These can either be default objects like Lead, Contact, Account, Case and Opportunity, or custom objects.

So you can map the same form to multiple objects, however, when setting up mappings for each object, you can only map each Typeform question or Salesforce field once.

As a workaround, you can use custom variables and branching logic in Typeform to assign the value of a specific question to a variable, then map that custom variable to the desired Salesforce field.

In the example below, I've created a custom variable called "rating" and added a new condition to replace it with each possible answer given to the Multiple Choice question:

Screenshot_2023-04-21_at_15.42.14.png

You can now take this value from the custom variable in Typeform and match it to a string value in Salesforce.

I edited my typeform questions and published the form to update it, but the Salesforce field mappings don’t reflect how my form looks.

The Salesforce integration refreshes the forms periodically. The exact frequency is specified by you during the setup stage of the integration (see the screenshot below). If you wish to update the forms so your recent changes are available in your mappings, open the Typeform app in Salesforce, go to the Connect page in Typeform Admin, and click Run Now under Retrieve Forms.

salesforce1.png

What objects can I map typeforms to?

You can map typeforms to Lead, Opportunity, Contact, Account and Case objects. Other objects such as Surveys are not supported at the moment. (If you’re a proficient Salesforce user, you can also create records for custom objects - check out our guide here!)

Can I map my typeforms to custom objects in Salesforce?

Yes, you can - here’s a step-by-step guide.

Can I map to one object and have the integration check for those values in another object before creating a new record?

Unfortunately, our integration does not support checking for values from one object, for example, a Lead, in another object, for example, a Contact. It can only "Check for existing" values in the same object type, for example, a Lead mapping can only check for values in existing leads. 

To link any record type to an existing contact in Salesforce you need to use a Lookup field. Our integration doesn’t currently support Lookup fields, so this is not possible.

Can I update existing records in Salesforce with my Typeform integration?

Yes. When editing an object’s field mappings, you can specify that typeform submissions should either create a new record by default or check against existing records first.

Choose Check for Existing for the second option. Then, use the checkboxes under Dynamic Field Mappings to select one or more keys for the integration to check when deciding whether to update a record or create a new one.

salesforce3.png

How do I map Multiple Choice questions to Salesforce object fields?

Map Multiple Choice questions to a picklist or multi-select picklist in Salesforce, depending on whether you have enabled multiple selection in Typeform or not. If you have Typeform’s Other option enabled, make sure that the "Restrict picklist to the values defined in the value set" option is unchecked in the Salesforce field settings.

salesforce4.png

How can I identify a record (like a Lead, Case, or Contact) that has been created from a typeform response?

Records created through the integration should have a field called Typeform Form Mapping that links to the mapping that was used to create the record. You can see the mapping in this screenshot:

sf_new_9.png

If you'd like to use another field besides Typeform Form Mapping to indicate that the record was created from a typeform response, you can add a Static Field Mapping that always maps the same value to your desired field. If the Salesforce field is a picklist, like the one shown in the screenshot, you will need to add the Typeform value beforehand. 

sf_new_10.png

My Hidden Fields are showing as hidden1, hidden2, etc., in Salesforce instead of the names I gave them in Typeform. Why?

This may occur when Hidden Field names are changed in Typeform and the form is republished on Typeform’s side, but Salesforce does not show the refreshed names correctly. To refresh the mapping in Salesforce, go to the Connect page in Typeform Admin and click Run Now under Retrieve Forms.

My records are showing incorrect data!

It is possible within the integration to map more than one typeform to the same object in Salesforce. However, this functionality is not currently supported, and can lead to the records displaying incorrect data (particularly if the typeforms have similar question types but different question wording, or if typeform questions with different data types, like text and number, are mapped to the same field). To address this, make sure that each typeform is mapped to a separate object in Salesforce, as covered in this section of the guide.

Can I map typeform metadata to Salesforce?

No, we currently do not support mapping typeform metadata (Submit Date, Network ID, Typeform ID, Start Date, Lead Record Type, etc.) to Salesforce, only typeform fields.

Why am I seeing an “Exception: Attempt to de-reference a null object” error?

This error is triggered when a required field in Salesforce receives a null value in Typeform (empty Hidden Fields are also treated as null values).

To work around this issue, create a manual record in Salesforce for the response with null values. Delete the corresponding response from the Responses panel in Typeform. Then, run the Retrieve Responses job in Salesforce again.

Why am I seeing an error telling me that my field “can not be sorted in a query call”?

You may see this error if your organization has any sort of platform encryption enabled. Unfortunately, the Typeform package on Salesforce is not verified with a platform encryption feature, and our Support team cannot currently offer solutions for these situations.

Why am I seeing an 'Error: "DUPLICATES_DETECTED"' error?

If you are seeing this error, it's likely that you have active Salesforce duplicate rules that are catching records that already exist and throwing the error message. To fix the error, delete the rule causing the problem and select Check for existing in your mapping settings. This way, records will only be updated based on the selected key values, and duplicates will be avoided.

Why am I seeing an 'Error: "Invalid Field for (Lead/Contact/[Etc]): Upsert records"' error?

Upsert is the method that our integration uses to update records in Salesforce. This error is triggered when there is a problem with a field that Upsert is trying to update. To troubleshoot this error, check if either of the following apply:

  • A key has been matched multiple times - this generates an error and the record is neither created nor updated
  • You are updating related record fields

If you have a master-detail object relationship that could be affecting Upsert's ability to update records, you can also try changing the master object.

If none of the above suggestions solve the issue, please reach out to our Support team using the Contact Support button at the bottom of this page. 

Why am I seeing a 'Can't Map Same Salesforce Field to Two Questions: undefined' error?

This can be solved when you update to our latest Salesforce Integration here. Click the Use this integration button and you'll be prompted to log in to your Salesforce account.

Can I set up a mapping to a Record Type field in Salesforce?

Unfortunately, our integration doesn't support mapping to Record Type fields in Salaesforce.

Does the integration import all submissions every time it retrieves responses or just new ones?

The integration only imports new submissions since the last successful sync. It uses the 'Most recent response' field in the Salesforce form mapping to know when the last sync happened. After each sync, this field updates automatically. So, during the next sync, it only looks for new submissions since the last sync, rather than importing everything again.

Tap into our community knowledge