This is part 5 in a series about integrating Marketo with Slack.
Part 1: Basic Marketo & Slack integration using Incoming Webhooks
Part 2: Posting via Marketo using the Slack API vs Incoming Webhooks
Part 3: Configuring a Slack app for use with Marketo
Part 4: Structuring Marketo webhooks to post via Slack API
Now what if we use interactive components for lead alerts that allow anyone in Slack to take action on a lead?
Data is instantly pushed out of Slack, but where to? Slack let’s you use it’s API but it’s up to your own processes for handling the data to be functional.
Integration workflow explained
The workflow for the example above actually looks like this:
This is made with the help of Integromat with a scenario that uses Webhooks, HTTP, JSON and Router modules in the order of:
- Once the action is taken in Slack, all the data of the original post is sent to a Webhook URL (hooks.integromat…) defined when creating the Slack app
- The data is run through a JSON parser to grab the relevant parameter values
- Integromat runs a request for an access token from Marketo
- In my case I chose to retrieve the lead information through the lead ID
- Based on one of the three choices in the dropdown, a router campaign moves to the correct path (completely optional)
- Integromat does a POST to Marketo using the access token to a custom field with the value of the action + a timestamp value (to ensure it always is updated if for some reason someone would go through something twice).
- The Slack message is updated with the user’s name, the lead’s email and the action that was taken – here I chose to customize the message for fun.
The reason for updating the message manually is that Slack needs an instant response, which Integromat gives (Accepted) – Then I chose to run a chat.update call with the
Workflow on Marketo’s end
When Marketo receives the data from Integromat through the sync lead call, it trigger’s a number of actions:
Point 1 – Marketo triggers on the custom field Slack_Action changing value – since the lead existed the value should update.
Point 2 – Revenue Stage changes based on the action taken – this example only had 3 actions so those were three alternatives. I chose to append a timestamp in Integromat, so the choice steps are based on what the field value starts with.
Point 3 – If someone is disqualified, no “Owner” is assigned to the lead. Otherwise the Owner name is assigned based on the Slack User ID value which is synced to a Marketo custom field.
Point 4 (strictly custom setup based on crm) – Based on the Owner Name field, the correct Owner ID is assigned for the next step.
Point 5 – If the lead is sales qualified/accepted, they are created in CRM using an owner ID for the Slack user who took action. This is done via Integromat by posting a JSON payload with the relevant data from a Marketo webhook. Integromat later comments on the initial Slack message using the
tsvalue with a link straight to CRM for the salesrep.
Points 4 and 5 could probably be done in an easier way with a CRM sync like Salesforce/Dynamics.