Note that there’s a now a much cleaner way to do this! My article below describes how to use email as the method to get data from Gainsight to Slack, but you can use the APIs instead.
Step 1. Create an External API Action that has the right fields to accept the data that you want to show in your Slack post: Step-by-step tutorial
Step 2. Set up your JO Program to use that Action, and populate it with data from the survey response: Call API Action Type in Programs
-------
I'm very pleased to say that I was able to set up an Advanced Outreach to push our NPS responses to Slack!
Preview in Slack
Click to Expand in Slack
My setup takes the NPS answer, and the answers to two open-ended questions, and pushes them to Slack each morning, for the survey responses submitted the previous day. Partially-submitted responses are still pushed to Slack, and if the participant further edits their response in the future, they will be pushed again. It took me about a week to figure it out my own, and it should be considerably faster for you, with this path to follow!
Part 1: Set up your Slack Email Address
- Add the "Email" app to your Slack instance
- Add a configuration called "Gainsight"
- I started by having the integration post to me in a direct message, and now I have it set to post to a channel called #customer-feedback (so that I can also push other things there besides NPS, like Zendesk Satisfaction responses)
- Customize its icon. I used the Gainsight logo
- Grab the email address that Slack has created for you
Part 2: Populate the Slack email address onto every Account
- Create a custom field on Customer (in Salesforce Setup > Create > Objects > Customer Info > Custom Fields > New). Here's my setup for that field: https://cl.ly/1b410W0y3X40
- I have a nightly Rule that updates every Account. I added an Action that populates that field when it's null. Setup shown here: https://cl.ly/3J2y201U033Z
Part 3: Set up your Survey Data Space
You need a Data Space set up on the "Survey User Answer" object. Do not use the "NPSSurvey Response" object, since that's only populated once the survey is "Submitted", which, if they didn't finish the survey, would be days after the user actually submitted their NPS score, from their perspective. Make sure that you include at least these fields:
- From Survey User Answer: Answer Title (this is the text of a chosen answer, like a radio button, including the NPS score itself), Answer Text (this is open-ended responses, for any such questions in your survey)
- FromSurvey User Answer > Question: Title (this is the text of the question), Question Number (so you can filter for certain questions)
- From Survey User Answer > Survey Master: Title (this is the name of the survey)
- From Survey User Answer > Participant: Last Response Record Time (this is when the participant last edited the survey response, even if the response is only partially submitted)
- From Survey User Answer > Participant > Contact: Email, Full Name
- From Survey User Answer > Participant > Account: Id, Account Name, Slack Email Destination
Part 4: Create an Advanced Outreach, using the "Email" model, and add Participants via a Bionic Query
A simple setup:
The Bionic Query:
- Fetch Task: Get your NPS responses from your Survey Answers Data Space. Include all the fields listed above for the Data Space. Filter for only responses from yesterday, and for the right Question Numbers for your NPS question(s). (We technically have two NPS questions in Gainsight, since different surveys go to different customer segments.) My setup: https://cl.ly/2a24010O0X3m
- Fetch Task: Get your open-ended responses from your Survey Answers Data Space. We have multiple open-ended questions per survey, and I wanted them all pushed into Slack. I use a Formula Field (in this screenshot, called "Response for Why") to use the "concat" function to combine a super-short version of the question (in this case, "-- Why? -- ") with the answer text itself. My setup: https://cl.ly/1x1y0W1m2p2m I have two Tasks like this, each one filtering for a different question.
- Transform Task: You want the "From" line of the email that goes to Slack to describe who submitted the response. I use the format "FullName @ AccountName". Use this Transform Task to assemble that text using a Formula Field that uses a "concat" function. My setup: https://cl.ly/3m163S2k2523 (I'm sorry I can't show the setup of the "concat" Formula Field; publishing an Advanced Outreach apparently locks you out out of viewing Formula fields in its Bionic Query.)
- Merge Task: Combine your NPS responses with the text from an open-ended question. My setup: https://cl.ly/0l0O0l2R2x13
- Merge Task: Combine the results of the first merge with the answers to the other open-ended question. My setup: https://cl.ly/1i3z3C0i273u
- Merge Task: Combine the results of the previous merge with that "FullName @ AccountName" info. My setup: https://cl.ly/0p1V2b0h3w1z
- Don't forget to Schedule it! My setup: https://cl.ly/1K0W2D0k2O2u
Part 5: Configure the rest of the Sources setup
Back in the "Sources" area:
- You want the same participant to be able to enter the Advanced Outreach an unlimited amount of times. My setup: https://cl.ly/1G3P3E3g3v32
- Some of the standard fields can be useful, but you'll also create custom fields for question responses and so on. My setup: https://cl.ly/3p0N020e2i3Z
Part 6: Set up your email template
- The template should be SUPER SIMPLE. Slack does not even respect line breaks. The hardest part here is making sure that there are not an awkward number of spaces (or lack of spaces) between different info. I was careful about adding spaces to the "concat" actions in the Bionic Query. Include default values for all the tokens; I used periods for the comment questions, which a participant may leave empty, especially if they've only partially filled out the survey. My setup: https://cl.ly/3x0j2T1z2x19 If someone doesn't submit any comments in my setup, their response comes through like this:
- In the Advanced Outreach, configure the email template and your mappings. Keep in mind that you'll see here that "Recipient Email Address" is selected as the "To", but, in my Sources setup above, I set it to be populated by the "Customer Slack Email Destination" field. My setup: https://cl.ly/0O14421y3l25
Now publish that sucker!
Encourage your team to use threaded comments to say, "hey, can't we do such-and-such about this situation?"