Skip to main content
Loading...
Skip to article
  • Qualtrics Platform
    Qualtrics Platform
  • Customer Journey Optimizer
    Customer Journey Optimizer
  • XM Discover
    XM Discover
  • Qualtrics Social Connect
    Qualtrics Social Connect

Salesforce Response Mapping


Was this helpful?


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The feedback you submit here is used only to help improve this page.

That’s great! Thank you for your feedback!

Thank you for your feedback!


About Response Mapping

Response Mapping is used to take the answers provided in a Qualtrics survey and map them back to a Salesforce record. For example, when your client takes a support feedback survey, their satisfaction level could be mapped back to Salesforce for the account manager to see.

Insert, Update, Upsert, Delete, and Post to Chatter

When setting up Response Mapping, you will have the option to create, update, and delete records, in addition to posting to chatter for each survey response.

INSERT

The Insert option allows you to have a new record created in Salesforce each time a response is submitted. This allows respondents to complete the survey multiple times without overriding their previous answers. For more details on how we recommend setting up your Salesforce environment to optimize the data you get from an insert mapping, see our Salesforce Best Practices support page.
a contact record page in salesforce with Qualtrics survey responses inserted into the record

In this example, the contact record is not modified, but rather a new Survey Response record is created each time the survey is completed and then tied back to their contact record.

Qtip: The example above requires that a Lookup Field be created in Salesforce. For more information, view the Mapping a Lookup Field section.

UPDATE

The Update option is useful for updating out of date information on an existing contact record. This may be used to track the most recent response to a survey or to keep up to date contact and demographic information.
Demo Contact page

In this example, the existing contact record is modified to include the client’s latest satisfaction score, as well as their most recent comments.

When using Response Mapping to update a Salesforce object, Qualtrics requires that a unique key field be set so that Salesforce can identify which object record to update. For more information on this, check out the section on Setting a Key below.

UPSERT

The Upsert feature searches for an existing record of the specified object in Salesforce to update if a record with the specified ID exists in Salesforce. If this record does not exist in Salesforce at the time the workflow is being executed, the integration will create a new record. This is especially useful if you may be surveying existing contacts and potential new leads. Similar to the update option, upserting requires a unique Key.

DELETE

The Delete option is appropriate when you would like to remove certain Salesforce records from an object. Just like when you’re updating a record, a unique Key is required to identify which record in Salesforce to delete.

POST TO CHATTER

The Post to Chatter option allows you to send a message to a feed in Salesforce. This can be done on a user or object level.

Setting Up Response Mapping

Once you have determined the type of mapping you would like to do, check to make sure the appropriate object and its fields are created in Salesforce. Once this is confirmed, you are ready to begin creating the Response Mapping.

  1. Open your survey and navigate to the Workflows tab.
    choosing create a new workflow and then event based
  2. Click Create a workflow.
  3. Choose Event-based.
  4. For the workflow’s event, choose the survey response event, since Salesforce Response Mapping is triggered by the submission of a survey.
    choosing the survey event, adding conditions, and choosing the task
  5. If desired, click the plus sign ( + ) and then Conditions to add conditions to your workflow.
    Example: If you would like to only map responses marked as Detractors for an NPS question, the condition would look like the below:
    a condition set up to only trigger when a respondent is a detractor for the NPS question
  6. Click the plus sign ( ) and then Task.
  7. Select the Salesforce task.
    choosing the salesforce task
  8. Choose the type of action to take in Salesforce. See Insert, Update, Upsert, Delete, and Post to Chatter for more information about each action.
    choosing the type of response mapping to use
  9. Click Next.
  10. Choose the Salesforce account to use.
    choosing an account to use

    Qtip: Alternatively, click Add a user account to connect a Salesforce account. See Linking Qualtrics and Salesforce for more information.
  11. Click Next.
  12. Choose your Salesforce Object to map to.
    mapping fields to a salesforce object
  13. Add the Salesforce fields to map to and the Qualtrics value to map to each field. If your Action on Record is Update, Upsert, or Delete, specify your key field as well. Use the piped text menu, {a}, to pull in values from your survey.
  14. To add additional fields, click Add new field.
  15. Ensure that the option Apply Salesforce assignment rules is enabled to apply assignment rules set up within Salesforce. This setting is enabled by default.
  16. If you’d like to receive notification emails when this workflow runs, enter your email address.
    adding a notification email

    Qtip: This option will only appear for legacy workflows that already had a notification email configured. If you do not see this option but would like to be notified when this workflow runs, use Workflow Notifications.
  17. When finished, click Save.

Setting a Key

A Key needs to be included in the Response Mapping when a record is being updated, upserted, or deleted. The Key will identify which existing record needs to be changed. In most situations a Key will be an ID. Common examples include a Contact ID or a Case ID. Chances are your participants won’t know this Salesforce ID, so asking for it in a survey question won’t be practical.

How you retrieve the Key will depend on how the survey was distributed.

TO RETRIEVE A KEY USING TRIGGER AND EMAIL SURVEY

If your survey is distributed using Trigger and Email Survey, the appropriate Key can be saved as Embedded Data in a Contact List. This Key will then be available for mapping.

  1. Open your survey and navigate to the Workflows tab.
  2. If this is your first time triggering and emailing a survey, please see the Triggering & Emailing Surveys page. Otherwise, please create or select a workflow with the Event set to a Salesforce Workflow Rule.
  3. Click your new Salesforce Workflow Rule Event.navigating to actions and clicking the salesforce workflow rule
  4. Utilize the Included fields from Salesforce to identify the desired Key field for your object. You can also use Add fields to manually map the field into Qualtrics.
    editing a salesforce workflow rule event to find the Key field for a desired object
  5. When finished, click Done.
  6. Click the plus sign ( + ) and then Task.
    clicking the plus sign and then task
  7. Choose XM Directory.
    selecting xm directory
  8. If you want to send out a survey distribution to your contact automatically, select Distribute Survey. If you simply want to save the contact’s Salesforce data in Qualtrics (and distribute your survey at a later time), click Add to XM Directory.
    setting up the xm directory task by selecting either to distribute a survey or add data to the directory
  9. Under the Contact List dropdown, select a contact list or create a new one where this information will be stored. Fill out the rest of the task as demonstrated on the XM Directory Task page.
    selecting a contact list and adding embedded data to an xm directory task
  10. Choose Add or remove embedded data fields to map the Key field into a contact embedded data field.
  11. A window will appear where you can set embedded data fields. On the left, name the embedded data fields under Embedded Data Field. On the right, populate them with Salesforce field values under Field Values. This will save the data with the contact entry in Qualtrics.the window for adding embedded data and mapping it to salesforce fields
  12. Select Close, then Save on your XM Directory task.
  13. Return to the Survey tab.navigating to survey flow
  14. Select Survey flow.
  15. Select Add a New Element Here.
    the add a new element here button
  16. Select Embedded Data.
    choosing embedded data in the survey flow
  17. Type in the name of the Embedded Data field that your Key field is set to in your contact list from Step 11.
    adding an embedded data field to the embedded data survey flow element
  18. Select Save Flow.
  19. Navigate back to the Workflows tab and go to your Response Mapping task.
  20. Select the Salesforce field for the Key. In most cases, this will be the Record ID from Salesforce.
    mapping the key to record Id
  21. Set the Key as an Embedded Data field.
  22. Use the dropdown to choose the Embedded Data field name that matches the Contact List in Step 11 and from the Survey Flow in Step 17.
  23. Click Save.
Attention: When making edits to your Salesforce workflow, it’s important that the user who initially set up the workflow is the only user who edits the workflow. If a user who did not set up the workflow tries to edit it, the Salesforce integration will stop working. If you are not the Salesforce workflow owner but need to edit the workflow, then copy the workflow and make edits to the copy.

TO RETRIEVE A KEY USING EMAIL SURVEY

If your survey was distributed using the Qualtrics mailer, the appropriate Key can be uploaded as part of the Contact List.

  1. When uploading the Contact List, include a column for the appropriate Key.
    an excel spreedsheet with a column for sfContactId

    Qtip: To retrieve a spreadsheet of IDs for each participant, ask your Salesforce Administrator to perform a data export of the appropriate Salesforce records.
  2. Select Survey Flow.
    navigating to survey flow
  3. Select Add a New Element Here.
    the add a new element here button in the survey flow
  4. Select Embedded Data.
    selecting an embedded data element
  5. Paste the Embedded Data field name from step 1. Keep in mind that the field names must match in capitalization and spacing.
    adding an embedded data field to the embedded data survey flow element
  6. Select Save Flow.
  7. Navigate to your Response Mapping workflow.
  8. Select the Salesforce field for the Key. In most cases, this will be the Record ID from Salesforce.
    retrieving the record id for the key
  9. Set the Key as an Embedded Data field.
  10. Use the Embedded Data field name from the Contact List.
  11. Select Save.
Attention: When making edits to your Salesforce workflow, it’s important that the user who initially set up the workflow is the only user who edits the workflow. If a user who did not set up the workflow tries to edit it, the Salesforce integration will stop working. If you are not the Salesforce workflow owner but need to edit the workflow, then copy the workflow and make edits to the copy.

 

Mapping a Lookup Field

When creating custom fields for your object in Salesforce, one optional field type is a Lookup Field. A Lookup Field is used to connect two objects in Salesforce in a parent-child relationship. When using Response Mapping, a Lookup Field can be used to insert a new record in one object and then connect that newly inserted record to another object, the parent object. For more information, view Create Custom Fields on the Salesforce support site. Once set up in Salesforce, Lookup Fields can be used in Response Mapping.

Example: For example, imagine an object Contact (the parent) and a custom object called Survey Response (the child). The object Survey Response would have a custom Lookup Field connecting the two objects in Salesforce. In Salesforce, you can create a Flow that will send a survey to a Contact when a condition is met (see Trigger and Email Survey). At completion of the survey, the contact’s responses can be mapped back to a new record in the Survey Response object. If the Lookup Field is used in the Response Mapping, the Survey Response will appear in a related list on any parent records. To map to a Lookup Field, follow the instructions in Setting a Key, but instead of setting a Key field, simply select the Lookup Fields and map the ID for the appropriate object you’d like your survey response to be related to.
mapping fields for contact and account lookupIn this example, the Survey Response will be related to the Contact that triggered the survey, as well as the Contact’s parent Account.

Mapping to Common Salesforce Fields

Each type of Salesforce field can only accept data in a specific format. It’s important to know what these types of data are as you set up your Response Mapping. If your mapping is working for the most part, but one or more fields aren’t updating, it’s likely that you’re passing the wrong type of data.

This guide also contains suggestions for which question types to pair with each type of field in Salesforce. It’s a good idea to first think about how you want your data to be stored in Salesforce, then to design your survey to match that data. For example, if you want to use a checkbox in Salesforce, consider using a Yes/No multiple choice question in Qualtrics.

LOOKUP FIELD

Lookup Fields can only accept the unique Salesforce Record ID of the record you want to reference. This record ID will usually be stored as Embedded Data, either from a Contact List or from a query string if you’ve set up a custom link in Salesforce.

  • If you are distributing through a link generated in Salesforce, make sure the Embedded Data names specified in your mapping match the names you set in your query strings when creating the link.
  • If you are distributing to a Contact List in Qualtrics, make sure the Embedded Data names used in the mapping match the Embedded Data column headers from the file you used to create your contact list.
  • If you are distributing through the Salesforce App, the Salesforce contact ID and account ID should be labeled as sfSurveyId and sfContactId. For more information on pulling data from into Qualtrics using the Salesforce app, visit our page on The New Salesforce App Experience.

TEXT

Text fields are extremely flexible in what they will accept. In general, they are best when used with a regular text entry question. When setting up the mapping, map information from your text entry question and select the bottom option from the final dropdown menu.
Select text response from Question dropdown

Qtip: : When setting up a custom text field in Salesforce, you have the option to set a character limit on the field. Remember to add enough characters in order to cover the length of the string being passed into the field.

CHECKBOX

A checkbox can only be in one of two states – checked or unchecked. To map these respective states, you can use the values below:

  • true for Checked or false for Unchecked
  • 1 for Checked or 0 for Unchecked

If you’re using a Yes/No multiple choice question, consider using Selected Choices – Recode Values when creating your mapping and then recoding the values of the answer choices to match the checkbox state you’re looking for. If you’re using a Multiple Choice – Multiple Answer type question, you’ll likely want to use Branch Logic for each possible answer choice in the question, then setting an Embedded Data value equal to one when an answer is selected. From there, select Embedded Data and the name of your Embedded Data field when creating the mapping for each respective checkbox.

PICKLIST

To map to a picklist, simply map the text of the option you want to select, sent over as a string. For example, if I have a picklist with “Red,” “Green,” and “Blue” in Salesforce, I would map “Red” if I wanted to select Red in the picklist.

The best question type to use for a picklist is a Single Answer multiple choice question. For a multi-select picklist in Salesforce, consider using the Multiple Choice – Multiple Answer question type in Qualtrics. To make the setup easier, make sure to match the text of the multiple choice question and the picklist options. When creating the mapping, select Selected Choices when mapping to your picklist.

DATE

The Date field type will accept a wide range of possible date formats. These include (but aren’t necessarily limited to):

  • M/D/YYYY
  • YYYY-M-D
  • MM/DD/YYYY
  • YYYY/DD/MM
  • [Full month name] D, YYYY

The most common use case for mapping a date is recording the last time a participant completed a survey. To record this, consider adding a DateCompleted Embedded Data field to the end of your Survey Flow and use our Piped Text menu to insert one of the date formats listed above. When setting up the Response Mapping, select your date field followed by Embedded Data equal to DateCompleted.

If you want to capture the date that a survey was sent, consider adding a Flow action that updates a field on the object with the date the Flow was triggered.

Response Mapping involves saving survey responses to fields of a Salesforce record. While having each question saved to Salesforce opens up dashboarding and reporting possibilities, in some situations it may be preferable to keep the response data in Qualtrics and simply map a link to the response into Salesforce.
Link to survey response in Salesforce contact

In this example, a link to the survey response is mapped to Salesforce and the link is clickable.

TO MAP A RESPONSE REPORT LINK

Attention: There are some instances in which Response Reports may be disabled for a brand. Please see the Allow Response Reports page for more information.
  1. Go to Response Mapping.
  2. Select a Salesforce field to map the response link. Consider mapping to a text or URL field in Salesforce.
    mapping a response report link
  3. Select Specified Value.
  4. Paste in one of the following links. The first link has embedded data, while the second does not. Neither of these report links expire.
    ${srr://SingleResponseReportLink?ttl=0}
    ${srr://SingleResponseReportLink?ttl=0&edata=false}
  5. Select Save and preview your survey to test your workflow.
Attention: The character limit for a URL in Salesforce is 255 characters. When mapping a response report, the link may exceed this resulting in an error.

Chaining Response Mapping Tasks

After setting up a response mapping task, the ID of the newly created or modified object can be referenced in subsequent tasks. This allows you to set up a series of consecutive mappings of Salesforce objects.

Example: Let’s say you have a workflow that creates an account in Salesforce based on a new survey response and you want to create a contact that is linked to that account.
  1. Follow the linked instructions to set up your first response mapping task.
  2. Click Add a task and add another response mapping task.clicking add a task after setting up response mapping
  3. Choose Contact as the Salesforce Object.
    mapping the object id from the first task to the account id of the second task
  4. Click Add new field and select AccountId as the Salesforce field.
  5. Choose T-ID 1 Salesforce > objectId from the {a} piped text menu.

The Salesforce task can also be chained to any other task which supports chaining. See Passing Information from One Task to Another for more details.

Example: You can use the Salesforce task to create a Salesforce Case from a survey response and then create a Qualtrics ticket that is linked to that case by adding a tickets task that passes objectId from the Salesforce task.

Incomplete Survey Responses & Response Mapping

When a Response in Progress is closed (either manually by a user, or automatically by Incomplete survey response settings), the data moves into Recorded Responses. Whether this response triggers a Response Mapping or not depends on whether there is a condition applied to the mapping.

  • If the mapping is set up with a condition, incomplete responses that meet those conditions will trigger a Response Mapping.
  • If the mapping is set up without a condition, incomplete responses will never trigger a Response Mapping.

For more information on using logic to set up conditions, check out the page on using conditional logic.

Testing and Troubleshooting

To quickly ascertain and troubleshoot the field that is causing a mapping to fail, check the Workflows Reporting tab for that survey. This feature offers in-platform error logs that display the values being passed into each Salesforce field as well as the reason for the failure. Alternatively, you can set a Debug Email in your Response Mapping settings in Qualtrics. After Response Mapping runs, a Debug Email will send that confirms the mapping was successful, or explains why the attempt failed. You can also view individual fields and what Qualtrics is passing in the Debug Email, which may explain why the mapping isn’t behaving as expected.

THE MAPPING IS FAILING ENTIRELY

There are several possible causes for why a mapping will fail entirely (i.e., no fields are updated or no record is created, to name a few). Below are a few things to check when nothing is mapping:

  • Make sure your account is properly linked. Note that the survey owner needs to be the one linked to the correct Salesforce instance. Try relinking your account.
  • Check with your Salesforce Administrator to make sure there are no IP address login restrictions for your profile and that you have the necessary permissions (API enabled in Salesforce and read/write permissions on the necessary object).
  • Make sure you have the proper Salesforce IDs if you are performing any mapping that requires a Key. This includes confirming the ID exists in your environment and that you are correctly mapping it over. For example, if you are mapping Embedded Data, check to make sure the field name given in the Survey Flow matches the field name given in the Response Mapping (spacing and capitalization does matter).
  • Make sure that you are mapping over to any required fields in Salesforce. Some objects have required fields and will not let you save records that are missing those fields. For example, a lead may require an organization.

THE MAPPING IS SUCCESSFUL, BUT SOME FIELDS ARE MISSING

Some Salesforce objects require specific formats for certain fields. For example, a “Satisfaction Level” field may only accept a number 1 through 10. If you map the words “Extremely Satisfied” instead of a number 1 through 10, this field would not update correctly. See Mapping to Common Salesforce Fields for help in what you should be mapping.
Demo contact page in Salesforce

Qtip: For the above example, when setting up Response Mapping, map Selected Choice Recode instead of Selected Choice. This will map the recode value of the answer choice (“10”) instead of the text (“Extremely Satisfied”).

It’s also possible that you don’t have permission to edit the fields you’re trying to map to. Check with your Salesforce Administrator to ensure you the necessary field-level permissions.