Kustomer is an omnichannel customer experience and support platform that lets you talk to your customers where they want to connect: email, phone, chat, social, and messaging apps.
The Kustomer + Iterable integration lets you send user attributes and events from Kustomer to Iterable and use them to personalize and trigger campaigns. You can also send user data from Iterable to Kustomer in order to provide helpful context during support conversations.
You can send any user data or events that you track in Kustomer to Iterable — the sky’s the limit!
In this article
Before you begin
This article uses an example that shows how to send data about a conversation you had with a user in Kustomer to Iterable, where you can use it in a transactional campaign (maybe one that thanks the user for contacting you).
In this example, you should replace the values used for eventName
,
dataFields
, and displayName
with your own custom event data. In addition,
this example uses placeholders to represent IDs that you define however your
organization assigns unique IDs – assign them as you normally would, making sure
that they sync as they do here (for example, everywhere you see <YOUR_ID_1>
you might use a value like Le7rGj0bu
).
For more information, see POST /api/events/track
and POST /api/users/update
.
NOTE
Email-based projects require the email
data field, user ID-based projects
require the userId
field, and hybrid projects require one of either of these
fields (though we recommend that you use the userId
field if it’s available).
Sending data from Kustomer to Iterable
In Iterable
Step 1: Create an API key
- Go to Integrations > API Keys.
- Click New API Key.
- Give your API key a name (for example, "Kustomer Integration") and select JavaScript.
- Do NOT check the box for Require JWT authentication.
- Click Create.
- Copy the API key to your clipboard.
IMPORTANT
Store your API key in a safe location. Once you close this menu, you won't be able to view the full API key again.
In Kustomer
Step 1: Create a new workflow
Click Import Workflow.
Enter the following for your JSON file. (Remember to replace variables and custom values with your own data.)
{ "description": "sending data from Kustomer to Iterable as custom event", "name": "kustomer-to-iterable", "steps": [ { "transitions": [ { "target": "<YOUR-ID-1>", "condition": { "op": "true", "values": [ true ] } } ], "errorCases": [], "id": "<YOUR-ID-2>", "action": "kustomer.customer.find", "appVersion": "kustomer-^1.9.6", "params": { "identifier": "/#steps.1.customer" } }, { "transitions": [], "errorCases": [], "id": "<YOUR-ID-1>", "action": "kustomer.rest-api.json", "meta": { "displayName": "Call Iterable trackEvent API", "description": "send data from Conversation to Iterable as Custom Event" }, "appVersion": "kustomer-^1.9.6", "params": { "headers": { "api-key": "<YOUR-ITERABLE-API-KEY>" }, "uri": "https://api.iterable.com/api/events/track", "method": "POST", "data": { "email": "/#steps.<YOUR-ID-2>.emails[0].email", "eventName": "<YOUR-CUSTOM-EVENT-NAME-1>", "dataFields": { "conversationId": "/#steps.1.id", "conversationName": "/#steps.1.name", "conversationPriority": "/#steps.1.priority", "conversationStatus": "/#steps.1.status" } }, "json": "/#steps.<YOUR-ID-2>.emails[0].email" } } ], "trigger": { "transitions": [ { "target": "<YOUR-ID-2>", "condition": { "op": "true", "values": [ true ] } } ], "eventName": "<kustomer.conversation.create>", "id": "1", "appVersion": "kustomer-^1.9.6" } }
-
Click Options > Workflow Variables.
-
Create a new workflow variable, and enter the following values:
-
Name —
Iterable_Key
- Value — The Iterable API key you created earlier
-
Name —
Save the workflow.
-
Open the third step of your workflow. By default, this step calls Iterable's
POST /api/events/track
API endpoint. However, you can change the request URL as needed (see the note box below).NOTE
Your Kustomer workflow should call one of the following Iterable API endpoints, depending on what you're trying to accomplish:
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
.
Open the Headers section, and set
api_key
to your Iterable API key.(Optional) While you have this step open, edit the data fields you want to send to Iterable, as needed.
(Optional) Add any additional workflow steps you need.
Save the workflow, and turn it on.
Sending data from Iterable to Kustomer
In Kustomer
Step 1: Create a webhook
Create a new inbound webhook.
For Type, select Web.
-
Save the webhook, and copy its URL (you'll need it in a later step).
Step 2: Create an API key
- Create a new API key.
- For Roles, enter
org.hooks
. - For Expires, select No Expiration.
- Save your API key.
IMPORTANT
Store your API key in a safe location. Once you close this menu, you won't be able to view the full API key again.
Step 3: Create a new workflow
Click Import workflow.
-
Enter the following for your JSON file. Remember to replace variables and custom values with your own data (for example, everywhere you see
<YOUR_ID_3>
you might use a value likeqBQ88EARK
) and add additional custom Iterable fields (likebrandAffinityLabel
andpredictiveGoals
) as needed.{ "description": "Iterable Webhook triggers Kustomer to update Customer", "name": "iterable-to-kustomer", "steps": [ { "transitions": [ { "target": "<YOUR-ID-3>", "condition": { "op": "true", "values": [ true ] } } ], "errorCases": [], "id": "<YOUR-ID-4>", "action": "kustomer.customer.find-by-email", "appVersion": "kustomer-^1.9.2", "params": { "email": "/#steps.1.attributes.data.email" } }, { "transitions": [], "errorCases": [], "id": "<YOUR-ID-3>", "action": "kustomer.customer.update", "appVersion": "kustomer-^1.9.2", "params": { "id": "/#steps.<YOUR-ID-4>.id", "externalId": "/#steps.1.attributes.data.userId", "email": "/#steps.1.attributes.data.email", "phone": "/#steps.1.attributes.data.phoneNumber", "name": "/#steps.1.attributes.data.firstName", "custom": { "brandAffinityLabelStr": "/#steps.1.attributes.data.brandAffinityLabel" } } } ], "trigger": { "transitions": [ { "target": "<YOUR-ID-4>", "condition": { "op": "true", "values": [ true ] } } ], "eventName": "<kustomer.hooks.web.632a005eca880258393a4ed9.receive>", "id": "1", "appVersion": "hooks-^1.0.0" } }
-
Open the first step of the workflow, and update it to point to the new inbound webhook you created earlier.
Save the workflow and enable it.
In Iterable
Step 1: Create a journey webhook
Go to Integrations > Journey Webhooks.
Click New webhook.
-
Give your webhook a name (like "Kustomer Webhook"), and enter the following settings:
- Method — POST
- Endpoint — The URL of your Kustomer webhook
- Authentication — None
-
Under Custom headers, click Add header and enter the following:
-
Name —
Authorization
-
Value —
Bearer
, followed by a space, followed by your Kustomer API key. For example:Bearer <KUSTOMER_API_KEY>
.
-
Name —
Under Body, select JSON.
-
In the code input box, enter any user or event data that you want to send from Iterable to Kustomer. For example:
TIP
You can either enter the JSON manually or use the Add user field button to add fields to the payload.
Make sure the box next to Include
email
andworkflowId
is checked (this is important).Click Create Webhook.
Step 2: Create a journey
Go to Messaging > Journeys.
Click New journey.
Choose an entry source for the journey, and add your desired tiles.
At the point in the journey where you'd like to send data to Kustomer, add a Call Webhook tile and set it up to call the inbound webhook you created in Kustomer.
-
Save the journey, but don't turn it on yet.
Testing and final steps
With everything set up in Iterable, you can test your Iterable journey and use the result of the test to finish setting up your Kustomer workflow.
In your Iterable journey, click Test Journey and specify a test user.
-
If your journey is triggered by the API or Event Occurs entry source, switch the Add Test Data toggle on and enter the JSON for the Kustomer event that triggers the journey.
In Kustomer, open your workflow's trigger step.
Click View Logs.
-
Look at the Input section of the first step. Copy the
attributes
JSON and paste it in the JSON input box in the Hook Information section of the workflow's trigger step.IMPORTANT
Before continuing to the next step, make sure the green Valid JSON indicator is showing.
Open the Kustomer Update step in your workflow and map the data from Iterable Update to your user data, as desired.
Save and enable the Kustomer workflow.
Go back to Iterable, and send another test user from your Iterable journey. Then, make sure your Kustomer data is updated as expected.
If everything looks right, go back to Iterable and turn on your journey.