Skip to main content
Configure Salesforce Flows with Wootric

Configure Salesforce to trigger Wootric surveys using Flows, enabling CSAT, NPS, and custom surveys on various objects.

Daniel Pitrowiski avatar
Written by Daniel Pitrowiski
Updated over a week ago

Introduction

Currently, Salesforce can be configured to trigger Wootric surveys using Flows on all Salesforce standard objects as well as custom objects.

Flows-triggered surveys are usually used, for example, to trigger surveys on:

  • CSAT or NPS surveys on support case closure

  • Contact creation or update

  • 30 days prior to account renewal

  • CES for new Leads or Contacts who just installed your product

  • SMS surveys for a recent upgrade

This is accomplished by setting up a Flow rule and creating an Outbound Message as a new workflow action.

Note: If you wish to trigger a Flow based on a Salesforce Object other than Case, Contact or Account, please contact Wootric support so that we can map your Salesforce fields with Wootric fields.

Pre-requisites

  • Your InMoment account must be enabled for Salesforce Triggers. You should see the following on Wootric Settings page. If you don’t, please contact Wootric

  • You must have admin access to your Salesforce org

Navigate to Settings >> Trigger Surveys >> Salesforce Triggers

Create Outbound Messages

This process involves creating the internal Flow rules that will then trigger an Outgoing message to Wootric, which will fire a survey to the specified user.

In this example, we will create an Outbound Message that will trigger a Wootric email survey when a case is closed. Similar steps will work for other objects as well.

1. Navigate to Settings >> Trigger Surveys >> Salesforce

Press Copy Link for the Survey Channel of your choice.

2. Navigate to Salesforce Home and search for Outbound Messages, click

3a. Click New Outbound Message

3b-c . Select ‘Case’ or the Object that has your desired fields and press Next.

4. Fill out the Message form, paste endpoint from Step 1 and press Save.

  • Enter a Name of your choosing

  • Add a Unique Name

  • Paste Copied Endpoint URL from Step 1

  • Check Session ID. MUST check to validate that a message is coming from your Salesforce org.

  • From Available Fields: Add ContactEmail, or any fields you want to use for property mapping, like, CaseNumber, to Selected Fields. If you plan to send surveys in multiple languages and would like that language auto-detected, you need to include that field here as well (more details below)

Note: You’ll add additional fields that you want to be connected to the Wootric survey and responses to the selected fields column.

You can add fields to customize the email subject and intro with Salesforce fields. Select any of those you wish to send to InMoment, such as Description, CreatedDate, and ContactId. The extra fields will appear as custom properties in your InMoment dashboard and explained in detail below in Steps 5a-d. Each will property and field give you more context for a survey response, such as Case Owner or Case Subject.

4a. Configuring for Surveys in Multiple Languages

If you need your surveys to automatically send in different languages based on information tracked in Salesforce, you’ll need to take the following steps:

  1. Ensure that you’ve setup your survey in Wootric for the languages you want supported. This is done in settings→Customize Survey. Note: Whichever language is shown as the ‘default language’ will be the fallback language if the system encounters a language code that has not been configured or is not recognized.

  2. Create or identify a language parameter that can be sent to us in the Salesforce outbound message configuration. This needs to be a variable holding the language code in ISO 639-1 format. For example: 'es' for Spanish, 'fr' for French, 'en' for English, 'jp' for Japanese and so on.

  3. Include this variable in the “Fields to Send” area of the outbound message, moving it over from Available Fields to Selected Fields (similar to others captured in Step 4 above)

  4. Contact your Wootric/InMoment CSM with the name of this language variable (the salesforce API name for the variable, as it is shown in the Selected Fields area). Please also include your Wootric Account Token (located in Settings→Account Settings→Your Account). If you are unsure who to contact, please reach out with your information to support@wootric.com.

  5. We will do a mapping on our side to ensure this variable is referenced for survey language consideration when the trigger is received. We will contact you when the mapping is complete.

  6. As with any element of the flow setup, your SF admin should test and confirm that surveys are appearing as expected in the desired languages before going live.

Note: If you want this field to also show up as a filtering property in your reporting dashboard, you should also map it as outlined in Steps 5a-d below.

5a-d. Navigate back to InMoment >> Trigger Surveys >> Salesforce Mappings

If you want to receive the selected fields added to the Outbound Message in Step 4 within your InMoment Dashboard, follow the below steps. Take notice of the specific casing and naming conventions.

5a. Map the object used in the trigger.

In this example, ‘Case’ is selected in Step 3b.

5b. Map the field that holds the end user identifier.

If this is an email send, this would be the email address field. If an SMS, a phone number. External ID can be optional but is useful where you may have a different method to identify a user.

From Step 4 Fields to Send - Selected Fields, copy the exact Field Name/API Name of your identifier(s).

5c. Property Mappings (Optional but highly recommended!):

For each Salesforce field you’re sending, you will also need to assign a new field name as you would like it to appear in your dashboard. Reminder: If you want to leverage the date and integer filtering you must end your new field "_amount" (i.e. revenue_amount) or "_date" (i.e. sign_up_date) for dates.

The above field mapping will generate a new property in your Wootric dashboard called “Salesforce Case Number” that can be used for filtering by the values passed in this field.

5d. Custom Email Wording and Sender (Optional)

Each email survey you configure can have a custom subject line and intro, as well as a custom sender. These fields can include dynamic variables pulled in from Salesforce fields.

Note: If your Wootric account is enabled to send in multiple languages, you will instead need to customize these fields directly in your settings→customize survey in each language, using the same conventions below.

For Custom Survey Subject, Intro and Properties follow the below examples:

  • Custom email subject

Example: Feedback for case {{CaseNumber}}

  • Custom email intro

Example: This email survey is for your recent support case {{Subject}} with Acme Bank

  • Salesforce field to Wootric Property Mappings

Example: custom_properties_mappings: {"priority"=>"Case Priority"}

  • Customize Email Sender

Example: {{csm email}}

Create Flow

Once your Outbound Message is configured, now you need to create a Flow in Salesforce.

1. Navigate to your Setup dashboard in Salesforce and search for ‘Flows’, click ‘Flows’

2. Press ‘New Flow’

3. Press ‘Record-Triggered Flow’ and then hit Create

4. Configure the Flow Start module form, like below, and click ‘Done’

Below, in Entry Conditions, we set Case:Closed equals True. When the criteria is met Salesforce will trigger the survey.

5. On your Flow dashboard, add an Action to your Flow, by pressing the ‘+’ button

6. Connect an Action from Outbound Message, like ‘case closed’ created in Outbound Message - Step 4

7. Save your flow, Add a Name and Description to your Flow

8. Activate Your Flow

You must activate your Flow rule to complete the process.

Test Your Trigger

  1. After you complete the steps above, create a new case for a contact record that contains a valid email address.

  2. Change the case to ‘closed’ status or a status set in your Flow criteria.

  3. The case’s contact email should receive an email within the next 2-3 minutes.

  4. If the case contact does not receive an email, check Setup >> Monitor >> Outbound Messages. If there are no records displayed, then no error has occurred. If a record does appear, then there is an error. In this case, please, contact Wootric Support.

  5. Remember to check your ‘Activity Status’ within the InMoment Dashboard in Settings >> Activity Status >> Integration Status table to review your Salesforce Trigger status.


Questions about your Salesforce Flow? Please create an issue here or email support@inmoment.com. 👩‍💻

Did this answer your question?