πŸ€cheeky❀️determinedπŸ€ΈπŸ»β€β™‚οΈfortunateβ˜•οΈgiddy✨thrilledπŸƒunstoppable❣️favored☁️blissful🌈forwardπŸ€luckyβ˜•οΈgleefulπŸ’purposefulπŸƒirreverent⚑️happy✨charmed☁️fresh❣️tenaciousπŸ’elatedπŸ€excited❀️joyful πŸ€cheeky❀️determinedπŸ€ΈπŸ»β€β™‚οΈfortunateβ˜•οΈgiddy✨thrilledπŸƒunstoppable❣️favored☁️blissful🌈forwardπŸ€luckyβ˜•οΈgleefulπŸ’purposefulπŸƒirreverent⚑️happy✨charmed☁️fresh❣️tenaciousπŸ’elatedπŸ€excited❀️joyful
← Blog

How to use Salesforce Outbound Messages & Zapier to celebrate a closed won sale in HipChat

June 30, 2018 work

I've always found Zapier to be a cool tool, but never thought of an application to use it at Industry Dive. My colleague had set up a few Zaps between Google Sheets & Salesforce and had showed me the gist of Zapier, which got my wheels turning.

Then, this happened in our sales chat:

Spoiler Alert: This post is not about how I managed to get specific songs to play from Spotify to Sonos. We're still using a human for that part of the equation...

We quickly polled the sales team to get everyone's favorite song. Given that we didn't want complete chaos on the Sonos we decided to limit playing a rep's song to closed won deals over $15,000.

So here is where Zapier comes in: How could we notify the team in our HipChat room the second a deal was closed that met that criteria? A simple Workflow Rule in Salesforce would allow me to email the team, but a HipChat is exponentially more fun.

Assumptions β€” Before following the below instructions, make sure you have the following: A paid subscription to Zapier. Salesforce is a 'premium' application. A System Admin profile or Modify All Data permissions in Salesforce. Ability to administer HipChat (you'll need an Admin Auth Token).

Step 1: Open up Salesforce & Zapier and set up the Outbound Message

In Zapier create a new Zap and select Salesforce then type in 'Outbound' into the Salesforce Trigger search.

The next step will be to get this webhook, which is what allows Salesforce and Zapier to 'talk.' Keep this page open and switch to a new tab to Salesforce.

In Salesforce, create an Outbound Message. The object you'll want to create it on is Opportunity, because that's where closed won sales happen!

Put the URL from the Zapier screen above into the Endpoint URL field in Salesforce.

The 'Opportunity fields to send' section is important because that is the information you are sending back to Zapier. Side note: Account Name and Owner Name aren't available options to pull over. This is why I'm bringing the IDs.

Step 2: Go back to Salesforce and set up a Workflow Rule

The Outbound Message is what sends all the relevant information to Zapier but something needs to kick off the Outbound Message.

Create a new Workflow Rule that has the criteria you want to trigger to the Outbound Message. My criteria is fairly simple: Closed Won & over $15K.

Once you save your Workflow Rule, make sure to add an Immediate Workflow Action (choose: New Outbound Message) which is triggering your Outbound Message.

Before we delve into Step 3, let's briefly cover what we did: Set up an Outbound Message from Salesforce to Zapier. Set up a Workflow Rule to push that information out of Salesforce based on specific criteria.

Next Steps: Use the IDs from the Outbound Message to get the text you want to include in your HipChat.

This really puzzled me initially. In the screenshot above with all the Salesforce IDs you'll note that the only thing that is legible is the amount: 5000.00. Everything else is in Salesforce ID form.

Okay, fine. I should probably figure out a more legible solution. At this point I hadn't thought to read Zapier documentation, so I just turned to Twitter instead.

Brilliant! Instead of creating these fields, I would just create steps in Zapier to search for the information I wanted in Salesforce and then bring it back to Zapier in the format that I wanted.

It does seem a little circular; you just called all this information from Salesforce to Zapier and now you're sending it back to Salesforce just for the purpose of reformatting it.

Step 3: Find Account

In Zapier, create a new step after your Outbound Message. Select Action, then Salesforce, and then 'Find an Account.'

Step 4: Find User

This is pretty much the same as above, but instead of 'Find an Account' you'll choose 'Find a Custom Object.' The User object is not a Custom Object, but that's what Zapier calls anything that they don't have in their system.

Step 5: Format Currency

This is 100% optional but if you're going to do a job you might as well do it well. In your Outbound Message Salesforce gives you the amount in this format: 50000.00. No dollar sign, no comma.

Step 6: String it all together to create your HipChat message!

Back to Zapier: Create a new action, search for HipChat, and select 'Send Message.'

Room, From ('Opportunity Bot'), Message: Here is the what we all came for and the purpose of all those darn searches. You can now craft your message and pull information from each search step.

Before going live, I recommend sending a couple tests to a test HipChat room to make sure your chat is exactly how you want it.

Step 7: Wait for the sales to roll in

End of quarter sales has the Opportunity Bot working overtime.

The best part of the Outbound Message is that it's instantaneous! This is because Salesforce is pushing information to Zapier vs. asking Zapier to search your Salesforce instance.


Did you try this? Or have an idea on how it could be better? Leave a comment below or find me on Twitter.