Kustomer is an omnichannel customer experience and support platform that enables brands to respond in the places their customers want to connect—email, phone, chat, social, and messaging apps.
This integration lets Kustomer send user attributes and events to Iterable, where they can be used to trigger and personalize campaigns. Additionally, it allows Iterable to send user profiles and attributes to Kustomer, where they can be used to provide context during support conversations.
Table of contents
Sending Kustomer data to Iterable
Follow these steps to start sending Kustomer data to Iterable, so you can use it in your marketing campaigns:
-
In Iterable, create a JavaScript API key.
When creating this key, do not check Require JWT authentication. When you're done creating the key, safe it somewhere safe—you won't be able to see it again.
-
In Kustomer, import a new Workflow, using this JSON:
{ "description": "sending data from Kustomer to Iterable as custom event", "name": "kustomer-to-iterable", "steps": [ { "transitions": [ { "target": "XXXXXXXXX", "condition": { "op": "true", "values": [ true ] } } ], "errorCases": [], "id": "XXXXXXXXX", "action": "kustomer.customer.find", "appVersion": "kustomer-^1.8.18", "params": { "identifier": "/#steps.1.customer" } }, { "transitions": [], "errorCases": [], "id": "XXXXXXXXX", "action": "kustomer.rest-api.json", "meta": { "displayName": "Call Iterable trackEvent API", "description": "send data from Conversation to Iterable as Custom Event" }, "appVersion": "kustomer-^1.8.18", "params": { "headers": { "api-key": "<YOUR_ITERABLE_API_KEY>" }, "uri": "https://api.iterable.com/api/events/track", "method": "POST", "data": { "email": "/#steps.MDbSXPsnb.emails[0].email", "eventName": "New Kustomer Conversation Created", "dataFields": { "conversationId": "/#steps.1.id", "conversationName": "/#steps.1.name", "conversationPriority": "/#steps.1.priority", "conversationStatus": "/#steps.1.status" } }, "json": "/#steps.XXXXXXXXX.emails[0].email" } } ], "trigger": { "transitions": [ { "target": "XXXXXXXXX", "condition": { "op": "true", "values": [ true ] } } ], "eventName": "kustomer.conversation.create", "id": "1", "appVersion": "kustomer-^1.8.18" } }
-
In your Kustomer Workflow, create a Workflow Variable. From the options menu, select Workflow Variables from the menu.
For your new workflow variable, use these values:
-
Name —
Iterable_Key
- Value — The Iterable API key you created above
Then, save the Workflow.
-
Name —
Open up the third step of your Workflow, which (by default) calls
POST /api/events/track
. In the Headers section, setapi_key
to your Iterable API key.While you have this step open, add and remove fields sent to Iterable, as needed.
Finally, add any additional workflow steps you need.
Save the Workflow and toggle it on.
Iterable API endpoints to call from your Kustomer Workflow
Your Kustomer Workflow should call one of the following Iterable API endpoints, depending on what you're trying to accomplish (update your Workflow's request URL as needed).
POST /api/events/track
— Tracks an event in Iterable (for example, when you create a conversation). The pre-configured workflow above uses this endpoint. The URL for this endpoint is:https://api.iterable.com/api/events/track
.POST /api/users/update
— Updates a user's profile in Iterable. If you update your workflow to use this endpoint, you'll need to reformat the JSON in the Data section of the Workflow interface to match the endpoint's requirements. The URL for this endpoint is:https://api.iterable.com/api/users/update
.
Sending Iterable data to Kustomer
As part of an Iterable Journey, you can send Iterable data to Kustomer, where it can be used to provide additional context for account managers and support team members in subsequent tickets. Follow the steps below.
-
In a Kustomer, create a new Inbound Webhook.
- For Type, select Web.
- After you create the webhook, copy its URL (you'll need this later).
-
In Kustomer, create a new API key:
- For Roles, enter
org.hooks
. - For Expires, select No Expiration.
- After you create this API key save it somewhere safe. You won't be able to see it again.
- For Roles, enter
-
In Kustomer, import a new Workflow, using this JSON:
{ "description": "Iterable Webhook triggers Kustomer Customer update", "name": "iterable-to-kustomer", "steps": [ { "transitions": [ { "target": "XXXXXXXXX", "condition": { "op": "true", "values": [true] } } ], "errorCases": [], "id": "XXXXXXXXX", "action": "kustomer.customer.find-by-email", "meta": { "displayName": "Find User", "description": "Find user based on Iterable Email" }, "appVersion": "kustomer-^1.9.0", "params": { "email": "/#steps.1.attributes.data.email" } }, { "transitions": [], "errorCases": [], "id": "XXXXXXXXX", "action": "kustomer.customer.update", "meta": { "displayName": "Kustomer Update" }, "appVersion": "kustomer-^1.9.0", "params": { "id": "/#steps.XXXXXXXXX.id", "name": "/#steps.1.attributes.data.firstName /#steps.1.attributes.data.lastName", "email": "/#steps.1.attributes.data.email", "phone": "/#steps.1.attributes.data.phoneNumber", "custom": { "customerIdStr": "/#steps.1.attributes.data.userId" } } } ], "trigger": { "transitions": [ { "target": "XXXXXXXXX", "condition": { "op": "true", "values": [true] } } ], "meta": { "displayName": "Iterable User Update", "description": "update from Iterable" }, "id": "1", "eventName": "kustomer.hooks.web.XXXXXXXXXXXXXXXXXXXXXXXX.receive", "appVersion": "hooks-^1.0.0" } }
This workflow will accept the incoming data from Iterable and save it in Kustomer as needed.
-
In this Kustomer Workflow, update the first step to point at the new inbound webhook you created above.
Save the workflow and enable it.
-
In Iterable, create a new Journey Webhook:
Configure it as follows:
Method — POST
Endpoint — The URL of your Kustomer webhook
Authentication — None
-
Customer headers - Add a single custom header:
-
Name —
Authorization
-
Value -
Bearer
, followed by a space, followed by your Kustomer API key. For example:Bearer <API_KEY>
.
-
Name —
-
Body - JSON
Then, for the request body, enter any information user profile / triggering event data that you'd like to send to Kustomer. For example:
TIP
If you are unfamiliar or uncomfortable with JSON, use the Add user field button to add fields to the payload.
Include
email
andworkflowId
— Check this box (this is important).
To finish creating the webhook, click Create Webhook.
-
In Iterable, create a new journey.
Decide what should trigger the journey, and then add additional nodes as needed. At the point in the journey where you'd like to send data to Kustomer, create a Call Webhook node, and choose the webhook created above.
Save the journey, but do not enable it yet.
-
With everything set up in Iterable, you can test the journey and use the result of the test to finish configuring your Kustomer Workflow. To do this, click Test Journey, and then specify a test user for whom to send data from Iterable to Kustomer. Make sure to enable the Add test data toggle.
In Kustomer, open your Workflow's trigger node and click View Logs (in the bottom-left corner).
-
In the logs, look at the Input to the first step. Copy the
attributes
JSON and place it in the JSON input in the Hook Information section of UI for the Workflow's trigger node.IMPORTANT
Before moving forward, make sure that you see the valid JSON indicator.
Navigate to the Kustomer Update node in your Workflow and map information from Iterable Update to your customer user data, as desired.
Save and enable the Workflow.
Send another test user through your Iterable journey, and make sure the information updates in Kustomer as expected.
Once you've verified that everything looks correct, enable your Iterable journey.
Comments
0 comments
Article is closed for comments.