Salesforce Integration
In this article:
- Salesforce integration overview.
- Advantages of the Salesforce integration.
- Best practices when using the Salesforce integration.
Setting up the Salesforce integration:
- Setting up the integration package (required).
- Syncing response data to Salesforce.
- Setting up the response sync.
- Testing and troubleshooting the sync connection.
- Triggering surveys from Salesforce.
- Properties passed when triggering surveys
- Setting up preset survey triggers.
- Setting up custom survey triggers.
- Embedding Delighted CX surveys into Salesforce Marketing Hub emails.
FAQs
- Where can I find the Delighted package in Salesforce?
- Can I integrate multiple Delighted projects with one Salesforce instance?
- What versions of Salesforce are supported?
- How can I tell which project a response came from in Salesforce?
- How can I convert custom triggers set up with Workflow Rules into Flows in Salesforce?
- How can I connect to a Sandbox Salesforce account?
Suggested next article: The Embed Platform: Embedding Surveys in your Emails.
Salesforce integration overview
Delighted’s Salesforce (SFDC) integration offers the ability to:
1 | Trigger Delighted surveys | Automatically send an email survey to a customer, based on activity in Salesforce. These triggers can be one of our presets—like a contact being updated, or custom workflows built directly in your Salesforce instance |
2 | Sync response data to contacts | Automatically sync response data to matching contacts in Salesforce. When syncing feedback, you’ll be able to see a contact’s most recent score, comment, response timestamp, and any properties passed over with the survey request |
3 | Sync response data to the account level | Automatically roll response data synced to contacts up to the account level in Salesforce |
-
Premium integration Salesforce is a premium integration limited to specific plan levels. For more information, see our Pricing page.
Advantages of the Salesforce integration
Delighted’s Salesforce integration can help drive workflows and serve as the foundation for custom reports.
Key benefits of the Delighted Salesforce integration . . . | ||
1 | Consolidate your dashboards | Syncing data from Delighted to Salesforce in real-time ensures that you’ll have both feedback and existing SFDC data in a single location, allowing you all the necessary data right at your fingertips |
2 | Enable workflows and automation | Our integration pushes over all the response data—from scores to timestamps—to your Salesforce instance. As Contact records are updated with new feedback, consider leveraging Workflows and/or Apex Triggers to automate processes based on freshly synced Delighted responses |
3 | Allow for custom reporting | Generate reports that focus on Delighted response data, or draw on a blend of Delighted data and existing SFDC data (ex. tracking NPS over time, highlighting NPS in conjunction with other metrics like MRR) |
4 | Help identify customers prior to churn | Delighted's Salesforce integration syncs scores in real-time to set the foundation for quick follow-up with dissatisfied customers before they call it quits |
5 | Help identify customers for upgrades | Positive feedback can be a strong indicator of customers interested in additional product offerings, upgrades, cross-selling opportunities, and added MRR |
Best practices when using the Salesforce integration
Below are three best practices to make your Delighted integration seamless:
1 | Verify your Salesforce edition | Not all Salesforce editions include use of the API. Check Salesforce’s Trailblazer Community page to confirm that your edition/API is supported |
2 | Install the integration with a generic user | User account changes, security updates, or adjustments to access-related settings in Salesforce can result in expired access and token-based issues. To sidestep this issue completely, consider installing the integration while signed in as a generic user (ex. salesforce@delighted.com vs. tony@delighted.com) |
3 | Be aware of any workflows or restrictions | Clear any workflows or configurations in Salesforce that would restrict updating of Contact records. There is a potential to encounter issues when running the sync if you’re triggering flows off of Delighted objects/fields or have custom configurations that require specific conditions be met before updating a Contact record |
Setting up the integration package (required)
No matter whether you’re syncing responses back to Salesforce, triggering survey sends, or both, you’ll need to start by installing the Delighted integration package in Salesforce.
- 1
- In Delighted, head to the "Integrations" tab → and choose the "Salesforce" tile
- 2
- Click “Connect & turn on”
-
- 3
- You’ll be redirected to Salesforce. If prompted → enter your login credentials.
- 4
-
Authorize the Delighted connection and click “Install” to complete
-
We recommend installing for "All Users." (You can click on “View Components” to see what data we’ll be syncing over)
- 5
- Approve third-party access → and let the install complete
- 1
- In Delighted, head to the Integrations page → and choose Salesforce
- 2
- Check the box to Sync responses to contacts and accounts
- 3
- Save your changes
- 4
- Configure the contact layout → (details below)
- 5
- Configure the account layout → (details below)
- 1
- Go to Salesforce and log in
- 2
-
Head to any available Contact record
- 3
- Click “Edit Layout” → seen on the top right-hand corner of the page
- 4
-
Drag and drop the Last Delighted Response field to your Contact record
- 5
- Drag and drop the Delighted Related List to the Related List section of your Contact record
- 6
-
Optional: Edit your Related List to reorder where the Delighted information appears in your Contacts
- 7
- Save your changes
- 1
- From the main Salesforce page → click the “+” icon in your navigational menu (next to “Subscriptions”).
- 2
- From the All Tabs page → click on the link for “Contacts”
- 3
- On the Contacts page → click “New” (often under the Recent Contacts field)
- 4
- Enter the Contact details, including the email address to send the survey → (choose one that you have access to for testing purposes)
- 5
- Click “Save”
- 6
- Head to Delighted and click “Survey people”
- 7
- Click “Survey people” under the Email platform
- 8
- Enter the test email address
- 9
- Click “Next: Review”
- 10
- Click “Send immediately”
- 11
- Check your email and respond to the survey
- Note: the throttle period will apply to this email survey, so be sure to reach out to get that throttle disabled for testing or use an email that you haven't sent to yet
-
- 12
- Wait approximately 10 minutes for the default delay to pass, then check the Salesforce Contact record to see your test response data synced over!
- 1
- Turning off the SFDC integration in Delighted
- 2
- Removing the integration from Delighted
- 3
- Removing the Delighted package from SFDC
- 4
- Reinstalling the integration again via Delighted
- Account
- Case
- Contact
- Opportunity
- 1
-
Go to Object Manager in Salesforce
- 2
-
On the following page, click on "Account"
- 3
-
Click on "Fields & Relationships"
- 4
-
Click on “New”
- 5
-
Click on “Lookup Relationship”
- 6
-
On the next page, click on “Contact” for the “Related To” drop-down menu
- 7
-
Configure the "New Relationship" fields as shown below:
- Field Label: Delighted Survey Contact
- Field Name: x_DelightedInc_Survey_Contact
- Description: Which contact should be surveyed in Delighted for Account level triggers (e.g. Opportunity, Account)?
- Help Text: Which contact should be surveyed in Delighted for Account level triggers (e.g. Opportunity, Account)?
- Child Relationship Name: Accounts
- Required: Leave unchecked
- What to do if the lookup record is deleted? Leave checked as “Clear the value of this field. You can't choose this option if you make this field required.”
- Lookup Filter: Nothing required
This should look like:
- 8
-
For “Step 4. Establish field-level security for reference field” → configure permissions as needed
- 9
-
For “Step 5. Add reference field to Page Layouts” → and add to all page layouts on an Account level
- 10
-
For “Step 6. Add custom related lists”, add to all Related Lists
- 11
-
Click “Save”
- sfdc_case_id:
- sfdc_case_created_date:
- sfdc_case_status:
- sfdc_case_closed:
- sfdc_case_owner_id:
- sfdc_case_owner_name:
- sfdc_case_origin:
- sfdc_case_priority:
- sfdc_case_subject:
- sfdc_case_number:
- sfdc_case_account_name:
- sfdc_case_account_id:
- sfdc_account_name:
- sfdc_account_owner_id:
- sfdc_account_owner_name:
- sfdc_parent_account_id:
- sfdc_account_industry:
- sfdc_opportunity_id:
- sfdc_opportunity_name:
- sfdc_opportunity_closed:
- sfdc_opportunity_won:
- sfdc_opportunity_stage:
- sfdc_opportunity_amount:
- sfdc_opportunity_expected_revenue:
- sfdc_opportunity_forecast_category:
- sfdc_opportunity_close_date:
- sfdc_opportunity_lead_source:
- sfdc_opportunity_contact_id:
- sfdc_opportunity_account_id:
- sfdc_opportunity_owner_id:
- sfdc_opportunity_owner_name:
- sfdc_opportunity_account_name:
- sfdc_contact_id:
- sfdc_contact_name:
- sfdc_contact_lead_source:
- sfdc_contact_owner_id:
- sfdc_contact_owner_name:
- sfdc_contact_department:
- sfdc_contact_account_id:
- sfdc_contact_account_name:
- Account Created
- Case Created
- Case Closed
- Contact Created
- Opportunity Created
- Opportunity Won
- Opportunity Lost
- 1
- Click on “Trigger surveys from Salesforce activity”
- 2
-
Click on “Use standard triggers” and then “+ Add a new trigger”
- 3
-
Select your preferred trigger and delay
- 4
-
Click on “Save changes” to register the updated settings
- Accounts
- Cases
- Contacts
- Opportunities
- Be sure that the Outbound Message and Flow are both built around the same entity (ex. Case, Account, etc.)
- If you’re testing and need to be able to send a survey to the same contact more than once a week, send us a note and we can help reduce the throttle period while you test
- 1
-
Click on “Configure custom triggers on Salesforce”
- 2
-
Copy the URL shown underneath “Your Salesforce outbound message target URL” by clicking the icon to the far right of the URL
- 3
-
Head to your Salesforce instance
- 4
-
Go to your Outbound Messages section
- 5
-
Create a new Outbound Message
- 6
-
Select the Object associated with your Outbound Message. (Note: This must be either Account; Case; Opportunity; or Contact)
- 7
-
Edit the Outbound Message:
- Name: Name the message whatever you’d like! We recommend “Delighted Outbound Message”
- Unique Name: This will auto-fill after completing the Name field. You can leave as-is
- Description: Include detail to help you recall the intent of this message, something like “Used for calling the Delighted API”
- Endpoint URL: Paste the URL from Step 2 above, or jump back to your Delighted Salesforce page to grab that URL again
- User to Send As: Leave this as the default selection
- Protected Component: Leave this as the default selection (unchecked)
- Send Session ID: Check this box
- Fields to Send: Leave this as the default selection
- 8
-
Click “Save”
- 9
-
Head to your Flows
- 10
-
Click on “New Flow”
- 11
-
Choose “Record-Triggered Flow” and click “Create”
- 12
-
Configure the Start settings:
- Object: This must be either Account; Case; Opportunity; or Contact and must match the Object selected in Step 6
- Trigger the Flow When: Choose what type of event should trigger the flow, like a record being created
- Condition Requirements: This is where you’ll add the custom conditions that will trigger your Delighted survey send, such as a Contact being updated with a “Subscriber” field. This can be configured as you prefer—no requirements on the Delighted side!
- Optimize the Flow for: Choose “Actions and Related Records”
- Leave “Include a Run Asynchronously path...” unchecked
- 13
-
Click “Done”
- 14
-
Click the “+” button below the Start event you just created
- 15
-
Search for the Outbound Message you created in Step 8 (likely named “Delighted Outbound Message”) and select it
- 16
-
Configure the Action settings:
- Label: Name this something you’ll recognize, like “Send Delighted Survey”
- API Name: This will be auto-generated; you can leave it as-is
- Description: Add details about the survey trigger, if you’d like—nothing required here!
- 17
-
Click “Done”
- 18
-
If you’d like, you have the option to add other steps to your Flow. Read more about the Flow Builder in the Salesforce documentation here
- 19
-
Click “Save” and configure your Flow settings:
- Flow Label: Name your Flow, something like “Send Delighted Survey after Contact Created”
- Flow API Name: This will be auto-generated; you can leave it as-is
- Description: Add details about the Flow, if you’d like—nothing required here!
- 20
-
Click "Save"
- 21
-
Click "Activate"
- 1
- Request your survey's HTML code
-
Email us to request your project's HTML. Let us know which project you'll be using by finding the project's name in your dropdown menu.
Important: Make sure you’ve set up the Link platform – which provides us with your survey’s HTML code with all of your specific customizations and properties. - 2
- Add the HTML to Salesforce
-
Add the survey to your email survey by pasting in the HTML we'll share over.
- 3
- Deanonymize feedback using properties
-
By default, your embedded surveys will be anonymous.
However, you can append information like email addresses or purchasing data by appending those details to the end of your survey links within the HTML. See Passing properties with the Link platform.
- 1
- From your main SFDC dashboard, use the Quick Find function and type in Installed.
- 2
- Once you see the InstalledPackages, click through that link.
- 3
- On the Installed Packages page, find the package with the Package Name of Delighted and click through that link.
- 4
- On the following page, click on the View Components button to reveal all components related to the package.
Syncing responses to Salesforce
The Salesforce integration works by syncing response data in three phases:
1 | Response is received in Delighted | After this, we wait 10 minutes so that the respondent has time to add a comment |
2 | We search for a matching Contact record in Salesforce | By default, we will look to match by email address. However, if you include the property salesforce_contact_id, we will sync based on that Contact ID |
3 | Feedback is synced to the matching Contact | Feedback is synced in two ways—the most recent score left by that respondent will flow into a Custom Field, while any other details that you want included (from the response timestamp to the property data you sent with the survey request) will be synced to a Related List |
There are four components required to facilitate the integration between Delighted and Salesforce:
1 | Custom Fields | Each field is designed to show an aspect of the Delighted response within Salesforce. For example, Timestamp will show the exact timestamp the response received within Delighted. Delighted’s Custom Fields are great components to pull in for any custom reporting you’re doing within Salesforce |
2 | Apex Class/Triggers | Apex components are required for Delighted to interact with the Salesforce API because they power the syncing action |
3 | Custom Objects | Custom Objects are like the parent of your Custom Fields. For example, the “Delighted Response” Custom Object contains all related Custom Fields for the package (ex. Comment, Permalink, Properties, etc.). If you’d like to find the API name for each of the Custom Fields for the Delighted package, the Custom Object is a great place to locate them |
4 | API Access | Syncing data from Delighted to Salesforce requires making calls to the Salesforce API. We make about 6 HTTP requests to the Salesforce API for each survey response |
Within each Contact record’s Related List, you’ll see all responses provided by that respondent.
You can also find all Delighted response data under the “All Tabs” section for “Delighted Responses.”
Setting up the response sync
Once the Delighted integration package has been installed, you’re ready to enable the response data sync! To do this:
Configuring the contact layout
Configuring the account level layout
If you'd like to have your Delighted feedback roll up to the account level, follow the steps for the Contact layout, but on the account level! This will display an account-level score based on feedback from the contacts associated with that account.
Testing and troubleshooting the sync connection
Once you set up the sync, you may want to test your connection or may have a need to troubleshoot the connection.
Testing the connection
To test the integration, you’ll want to create a contact in Salesforce with an email address that you have access to and send a Delighted survey to that email. Then, confirm that the response data was synced correctly.
Troubleshooting the connection
If you need to troubleshoot Delighted-SFDC syncing, consider four issues:
1 | Consider the delay | While we delay syncing for 10 minutes, we recommend waiting 30 minutes to sync over as there may be other concurrent activity in your SFDC instance that is slowing API activity |
2 | Confirm the email address | Be sure that the email on the Contact record exactly matches the email listed on the Delighted response |
3 | Confirm the Contact record | We only sync to the Contact records (versus Person Accounts |
4 | Try a hard reset | If all the above looks correct and you’re still not seeing data sync across, try running a hard reset by: |
If you’re still having issues with the integration after reviewing the above, contact our Concierge Team!
Triggering surveys from Salesforce
The Delighted Salesforce integration allows you to automatically trigger surveys based on either standard triggers that are preconfigured in Delighted, or based on custom triggers that you can set up in your Salesforce instance.
Currently, the Salesforce integration supports triggering based on the following Entities:
Read more about triggering surveys from Salesforce below, or skip ahead to learn how to set up preset triggers or custom triggers.
How does Delighted determine which Contacts on an Account are surveyed?
For Account and Opportunity, by default, we’ll trigger a survey only to Accounts with 2 or fewer Contacts. In those instances, we’ll trigger a survey to all Contacts on the account or opportunity. If an Account has 3 or more Contacts, we will not dispatch the survey.
Alternatively, you can use the Custom Field setting to specify the exact contact we should survey. Note that if a Custom Field has been set up to identify the Delighted survey contact, the survey will send to that contact, regardless of how many contacts are on the account.
To set up the survey contact:
The field is now available on your Account layout to select one specific Contact to be surveyed.
Properties passed when triggering surveys
The properties that are automatically passed to Delighted depend on which object in Salesforce is used as the trigger for survey sends. See below for the complete list of properties based on each object—this list applies whether you are using preset or custom triggers.
Triggered by Case
Triggered by Account
Triggered by Opportunity
Triggered by Contact
It is not possible to pass custom properties when triggering your survey from within Salesforce.
Setting up preset triggers
Delighted’s Salesforce integration includes a handful of Standard Triggers (preset triggers), which include the following events:
Important details
1 | For Case and Contact | We’ll dispatch the survey to the Contact associated with those entities |
2 | For Account and Opportunity | By default, we’ll trigger a survey only to Accounts with 3 or less Contacts. If an Account has more than 3 Contacts, we will not dispatch the survey. If you need to trigger a survey to an Account or Opportunity that has more than 3 associated Contacts, please check out Triggering surveys from Salesforce for details on sending based on a Custom Field added to the Account |
3 | For Account Created | You cannot create duplicate triggers → (ex. You can only have one “Account Created” trigger) |
4 | For an Account Created trigger | Be sure to select a delay that is not Immediate, as that will give the system time to look-up any Contacts that are associated with the Account after it is created. The exception here is if you set a Custom Field on the Account when creating it. (More on this in ‘ How does Delighted determine which Contacts on an Account are surveyed? |
How to set up
Setting up custom survey triggers
Custom Triggers allow you to define the exact rules regarding what triggers a Delighted survey. Using a combination of Flows and Outbound Messages, you can define specific conditions for triggering surveys—all directly within your Salesforce instance.
We currently support the creation of Flows and Outbound Messages for:
Important Details
How to set up
You’re all set! Your Custom Trigger is now up and running!
Embedding Delighted CX projects into Salesforce Marketing Hub emails
Skip a step!
Seamlessly embed Delighted surveys in your Salesforce Hub emails and collect valuable customer feedback on the spot. Embedding can improve response rates and streamline the user experience.
Add fully customized Delighted surveys with a few clicks — no coding needed!
Simply:
Note: Learn more by reading the full article: The Embed Platform: Embedding Surveys in your Emails
Where can I find the Delighted package in Salesforce?
If you or your team needs to review the Delighted components further, such as grabbing a custom field name for reporting purposes, follow the steps below:
Can I integrate multiple Delighted projects with one Salesforce instance?
Yes!
Each project is independent, so you’ll need to set up the integration for each desired project.
Keep in mind, however, that when a response syncs from Delighted to Salesforce, we won’t automatically mark which project it has come from. Instead, consider including a property called ‘ProjectName’ in each scheduled survey. The value of this property should match the name of the project as it’s configured in Delighted.
With this configuration, individual contact records in Salesforce will carry information about which project the response is tied to. You’ll be able to easily create downstream reports or workflows on a project-by-project basis.
What versions of Salesforce are supported?
Delighted's Salesforce integration works on both Salesforce Classic and Salesforce Lightning instances.
How can I tell which project a response came from in Salesforce?
Currently, the best way to tell which project a response is tied to is to pass a property called "Project name" when scheduling your survey to send. This property will sync back to Salesforce with the rest of your survey properties!
How can I convert custom triggers set up with Workflow Rules into Flows in Salesforce?
To learn more about migrating your Workflow Rules to Flows, visit the Salesforce help center here.
How can I connect to a Sandbox Salesforce account?
To connect to a Salesforce Sandbox account, navigate to https://app.delighted.com/integrations/salesforce?sandbox=1 instead of using the Salesforce integration link in-product.