Triggering & Emailing Surveys in Salesforce or Updating Contacts in Qualtrics
What's on This Page:
About Triggering & Emailing Surveys in Salesforce or Updating Contacts in Qualtrics
In the Actions tab, you can set up tasks to trigger actions within Qualtrics based on Salesforce Workflow Rules. The criteria for the workflow rule in Salesforce might be an event such as a case being closed or an opportunity being won. Once this workflow rule is met in Salesforce, Qualtrics can take action, such as updating contact information and sending a survey.
In addition, there are other methods of sending surveys as a part of your Salesforce extension. For these additional options, check out our page on Other Salesforce Distribution Methods. Qualtrics can also map survey responses back to Salesforce; for more information, view our Salesforce Response Mapping page.
Setting up a Salesforce Triggered Survey
The Salesforce Workflow Rule Event allows you to trigger and email survey invitations to respondents as soon as their corresponding object meets qualifying criteria in Salesforce. This functionality requires setup in both Qualtrics and Salesforce. You will need to set up a Workflow Rule and Workflow Action in Salesforce in addition to setting up the email invite action in Qualtrics.
- Once the Salesforce extension is enabled on your account, navigate to the Actions tab.
- Click Add Action.
- Click Choose Event.
- Select Salesforce Workflow Rule.
Qtip: If you haven’t already connected your Salesforce and Qualtrics accounts, you’ll be prompted to login to Salesforce account to set up the extension. For more information about setting up the extension, read our Linking Qualtrics & Salesforce page. - Choose the Salesforce account you would like to link to.
- Choose the Salesforce object that is triggering the event. This could be a standard Salesforce Object like Lead or Case, or a custom Object you’ve created. The selected object in the event should match the object the Salesforce Workflow Rule is based off of.
- Review the fields that are included from Salesforce. Click the dropdown arrow to expand the list of fields.
- If desired, use the Add fields option to select fields you want pulled from Salesforce into Qualtrics. These fields can be used to create conditions for your action or update contact information in Qualtrics.
- Click Done.
- If desired, click Add Condition to add conditions to your action. You will be able use the Salesforce fields added in Step 8. For more information on building and troubleshooting logic conditions, see Using Logic.
- Click Add Task.
- Select the XM Directory task.
- Select Distribute survey.
- Complete setting up the XM Directory task with your desired distribution method. You can send an email invitation, an SMS invitation, or a 2-way SMS survey. The XM Directory Task page has more information about how to set up the task.
Qtip: Don’t want to send a survey? Choose Add to XM Directory instead. This will save Salesforce data in a Qualtrics contact list when the Workflow Rule is triggered, but not send a survey to the new contact. See the section in Saving Record Changes in Salesforce as Contact Information for more information on this process - After saving the XM Directory task, navigate back to the Salesforce Workflow Rule event and click Copy URL to copy the outbound message to your clipboard.
- Navigate to login.salesforce.com and login using your Salesforce account.
- Here, create a Workflow rule on the object that you select in the Qualtrics UI. For instance, if you selected “Lead” as the Salesforce Object as in the example in step 6, select “Lead” as the object for your Salesforce Workflow Rule. You can find more information about this in the Setting up A Salesforce Workflow Rule section below.
- Create an Outbound Message and attach that to your workflow rule in Salesforce.
- Paste the Workflow Rule URL from step 15 to the Salesforce Outbound Message URL. You can find more information about this in the Adding the Workflow Action section below.
- After publishing your survey, test your setup by fulfilling the condition of your workflow rule in your Salesforce account. This should carry the Salesforce fields to Qualtrics, save them as a contact in the specified panel, and distribute a survey to the contact’s email. For more tips on how to troubleshoot your workflow, see our Testing and Troubleshooting section.
Saving Record Changes in Salesforce as Contact Information
Let’s say you have an opportunity in Salesforce that is won and you’d like to include this information in the opportunity’s contact entry in Qualtrics. You can use the Salesforce Workflow Rule Event to push changes from Salesforce to Qualtrics. The updated contact information can be saved as Embedded Data or Transactional Data. If this is a new contact, the Salesforce Workflow Rule Event can also be used to create new contacts within Qualtrics.
- Once the Salesforce extension is enabled on your account, navigate to the Actions tab.
- Choose Add Action.
- Click Choose Event.
- Select Salesforce Workflow Rule.
Qtip: If you haven’t already connected your Salesforce and Qualtrics accounts, you’ll be prompted to login to Salesforce account to set up the extension. For more information about setting up the extension, read our Linking Qualtrics & Salesforce page. - Choose the Salesforce account you would like to link to.
- Decide which Salesforce Object you want to trigger the event. This could be a standard Salesforce Object like Lead or Case, or a custom Object you’ve created. The selected object should match the object in the Workflow Rule in Salesforce.
- Review the fields that are included from Salesforce. Click the dropdown arrow to expand the list of fields.
- If desired, use the Add fields option to select fields you want pulled from Salesforce into Qualtrics. These fields can be used to create conditions for your action or update contact information in Qualtrics.
- Click Done.
- If desired, click Add Condition to add conditions to your action. You will be able use the Salesforce fields added in Step 8. For more information on building and troubleshooting logic conditions, see Using Logic.
- Click Add Task.
- Select the XM Directory task.
- Select Add to XM Directory.
- Select how you’d like to save or update the contact information.
- Save or update embedded data: This option will save the contact information as Embedded Data. This is the option that should be selected for creating new contacts.
- Add as a transaction to the contact info: This option will save the contact information as Transactional Data in an existing contact.
- Select the Contact List where you’d like to save the contact information.
- Fill out the contact information to be saved or updated. First Name, Last Name, and Email Address are required.
Qtip: Use the Piped Text icon, {a}, to pull in values from your Salesforce Object and fields selected in steps 7 and 8.
- If there are additional fields you’d like to be saved with the contact entry, click Add or remove embedded data fields.
- 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. Click Close when finished.
Example: Let’s say I have a field called Location that is saved with my contact and does not change much overtime. It would be useful to save this field as contact Embedded Data. Therefore, I can see where this contact is located when viewing the contact. However, let’s say I want to create a new transaction each time a Salesforce case is closed for the contact. I can save a Store field as transaction data in order to see the store that this particular case is associated with in the contact’s Touchpoint Timeline. - Click Save.
- Copy your Salesforce Workflow Rule URL.
- Navigate to login.salesforce.com and login using your Salesforce account.
- Here, create a workflow rule on the object that you select in Qualtrics. For instance, if you selected “Case” as the Salesforce Object in step 6, select “Case” as the object for your Salesforce Workflow Rule. You can find more information about this in the Setting up a Salesforce Workflow Rule section below.
- Create an Outbound Message and attach that to your workflow rule in Salesforce.
- Paste the Workflow Rule URL from step 20 to the Salesforce Outbound Message URL. You can find more information about this in the Adding the Workflow Action section below.
- After publishing your survey, test your setup by fulfilling the condition of your workflow rule in your Salesforce account. This should carry the Salesforce fields to Qualtrics, save them as a contact in the specified panel, and distribute a survey to the contact’s email. For more tips on how to troubleshoot your workflow, see our Testing and Troubleshooting section.
Saving Salesforce Fields as Embedded Data
Information from Salesforce is saved in your contact list, but is not automatically recorded in survey responses. But it is quick and easy to add them if you follow these simple steps:
- Make sure you’ve followed the steps to trigger and email a survey using Salesforce.
Qtip: Make note of the spelling and capitalization you used when setting up your contact Embedded Data in your XM Directory task. Spelling and capitalization matter!
- Go to the Survey tab.
- Select Survey Flow.
- Click Add a New Element Here.
- Select Embedded Data.
- Type in the name of the contact Embedded Data field saved from Salesforce. The name of the Embedded Data field in the Survey Flow must be the same as in your contact (including capitalization, punctuation, spacing, and special characters). You do not need to set its value to anything, as its value will flow from the contact’s Embedded Data field.
- When finished, click Save Flow.
Qtip: Do you want to include Salesforce Fields in your email or your survey? Follow the steps above to save these fields as Embedded Data. Then generate Piped Text for the Embedded Data you want to include.
Setting up a Salesforce Workflow Rule
A Workflow Rule is a set of criteria created in Salesforce. When the criteria have been met, an action can be triggered. For example, the criteria might be that a case is marked as closed, and the action would be to have Qualtrics send a support feedback survey.
TO SET UP A SALESFORCE WORKFLOW RULE (Salesforce Lightning)
- Click Setup in Salesforce.
- Select Workflow Rules – Process Automation from the search results.
- Choose New Rule to create a new Workflow Rule in Salesforce.
- Select the Salesforce Object to which the rule will apply in the Object dropdown. For example, if you want the rule to be triggered when a Case is closed, you would choose Case here.
- Select Next.
- In the Rule Name section, name your rule. You may also provide a brief description if desired.
- Under Evaluation Criteria, choose the desired option for how often your rule should be evaluated. You can find more information on the options in this section on this Salesforce support page.
- Set the criteria for the rule in the Rule Criteria section.
Example: If you want the rule to be triggered when a Case is closed, you would set the Field to Case: Closed and the Value to True. You can add multiple conditions for your Workflow Rule here as well. - Select Save & Next.
Adding the Workflow Action
This action tells Salesforce what to do once the Workflow criteria is met. For example, the action might be for Qualtrics to send a survey invitation.
Setting Up A Workflow Action (Salesforce Lightning)
- For your newly created Workflow Rule, locate the Immediate Workflow Actions section and utilize the Add Workflow Action dropdown.
- Select New Outbound Message.
- Name the Outbound Message and give a brief description, if desired.
- Paste the Outbound Message URL from Qualtrics into the Endpoint URL field in Salesforce.
- Highlight any fields you would like to pass through the Outbound Message into Qualtrics and add them to the Selected Fields section.
- Click Save.
- Select Done on the next page.
- Select Activate to turn on the Workflow Rule.
Testing and Troubleshooting
Once you have set up the Workflow Rule, Workflow Action, and XM Directory Action, your survey is ready to go. Each time that the Workflow Rule is met in Salesforce, the Salesforce data will be passed over into a new Qualtrics contact.
TROUBLESHOOTING IN QUALTRICS
- Actions Reporting: If you set up your Workflow in the Actions tab, you can check the Actions Reporting tab. Here, you can filter your actions by status as well as view the payload for each action to determine what caused it to fail. The Input Payload contains the fields being utilized in the action, and the Task Output contains the error message for the failed action.
- Survey Activation: Qualtrics can’t send a survey until that survey has been activated. Your survey is activated as soon as you publish and select a distribution method for your survey. Make sure your survey has been published and activated before troubleshooting. You can see your project’s status as well as activate it from the Projects page.
- Survey owner linked to Salesforce: When connecting with Salesforce, Qualtrics always checks the Salesforce credentials of the original survey owner. If you are setting up the Salesforce Extension and the survey has been shared with you, make sure the original survey owner also links their Qualtrics account to your Salesforce instance when building the action in Qualtrics.
- Storing participants in a contact list: If you’re successfully saving recipients to a contact list but the distributions aren’t going out, check the Distributions tab, as each distribution to an individual contact will be visible there. Here, you can download the Distribution History to track the distributions status.
- Email sent, but not received: If the distribution was sent, there may be an issue with email deliverability. Visit our page on Custom From Addresses to get some tips on improving email deliverability. If your emails are being marked as spam, you can also visit our page on how to Avoid Being Marked as Spam.
- Email not sent: If the distribution was not sent, has the survey been shared with you?
- If the survey has been shared, check with the original survey owner to ensure that they have given you permission to distribute the survey. To see where the original survey owner can give you this permission, visit our Sharing a Project
- If the survey has not been shared, the issue may be due to an error in Salesforce and the troubleshooting items in the Troubleshooting in Salesforce section should be reviewed.
- Verify that you are using verified or accepted From addresses and Reply To addresses are valid, per our Custom From Addresses
- If your emails are failing or bouncing in the Distributions tab, refer to our Email Distribution Error Messages page for more information on these errors.
TROUBLESHOOTING IN SALESFORCE
- Email: Is Qualtrics looking at the correct field to find the email address? Qualtrics can only send a survey if it can find an email address as specified in the steps above.
- Workflow activation: Just like surveys have to be active to collect responses, a Workflow Rule has to be active before it will send survey requests to Qualtrics. For information about how a Workflow Rule is activated, view the steps above.
- Workflow Rule fires: Set up another simple Workflow Action in the same Workflow Rule and see what happens when the Workflow Rule is met. Does this other action fire properly?
- If the Workflow Action fires, check the Task Output in the Actions Reporting tab and continue troubleshooting below.
- If the Workflow Action doesn’t fire, there is an issue with your Workflow Rule conditions. Check these conditions to ensure they are correct.
- Outbound URL: Ensure that the appropriate Outbound URL has been successfully pasted into the Workflow Action, as shown in the steps above. If this link is missing or is incorrect, Qualtrics won’t know to send surveys when the Workflow Rule is met. Note that you should be using the survey owner’s outbound message URL. If an incorrect Outbound URL is connected to the workflow rule you are triggering, you will not see the action being triggered in Actions Reporting despite meeting the Workflow Rule’s conditions.
- Pending Messages: Go to the “Monitor” section under “Setup” within Salesforce. There is a section to monitor “Outbound Messages.” If you see any pending messages there, then Salesforce is more than likely the issue. However, if you see the outbound message there for an extended period of time (e,g., more than five minutes), contact Qualtrics Support.
- Salesforce Permissions: Your Salesforce account needs permission to trigger Outbound Messages. This permission is available in your Salesforce account by navigating through Profile -> System Permissions -> Send Outbound Messages.