Set up an Emarsys automation program that triggers a charles flow using a CUSTOM Event
The Emarsys webhook node comes with some limitations, please check the Emarsys documentation for details.
This use case involves two components that need to be configured:
> An automation program that sends events to charles on Emarsys
> charles flows in Journeys.
Component 1 - Set up the Emarsys automation
1a - Create the Webhook Node Preset in Emarsys
> You can find further instructions in the official Emarsys documentation.
> Configure the Connection values as follows:
Field | Value |
API endpoint URL | https://<REPLACE WITH INSTANCE NAME>.hello-charles.com/api/v0/webhooks/incoming/emarsys/custom_external_event |
Authentication Method | Select “JWT authentication” |
JWT Secret | Copy it from the integration configuration of your charles instance (see screenshot below). |
Please configure the Data values as follows:
> Event data: If you enable this, charles will receive the data of the event that triggered the webhook. This data can be used for personalizing WhatsApp messages.
> Contact data:
external_reference_id
email
phone
For the phone, select the property that you use for storing the mobile phone number on Emarsys. Please note that phone numbers must be in format +{Country Code}… or {Country Code}…, for a German number this would be +4915… or 4911111
ID, Email and Phone are used by charles to identify the end-user, for whom the charles flow needs to be triggered.
Given a webhook is sent for a contact that does not exist yet, then charles will create a new contact based on the phone and/or the email from the webhook and attach the event to it.
> Additional Data:
The event name is used for identifying the charles flow to trigger.
The event_name should not contain whitespaces. For example, "abandoned_cart" instead of "abandoned cart"
All other settings are optional.
1b - Add a the charles webhook node to your automation program
Open the program where you would like to use the Webhook node and insert it.
Double-click the Webhook node and select the required charles configuration preset from the dropdown.
If the automation is triggered by an event and the automation program is configured to “Data of the triggering event is being sent”, then the event data will be available in charles flows.
1c - Test the automation program
Change the Status to “in testing”, chose to only send to test contacts, manually
2. Click on “Send test contacts” on the button right and select a test contact with a valid phone number:
3. After clicking on “Send Test Contact” the specified flow should be triggered for the ID number of the test contact.
Component 2 - Setting up the charles flow
Create a new flow
Select Emarsys trigger
Payload configuration: Based on the properties in the event, create a payload.
Example
{
"birthdate": "",
"discount_code": ""
}
Set up an Emarsys automation program that triggers a charles flow using an ORDER Event
This feature is currently only available for selected customers. Please reach out to your CSM if you want to enable these use cases.
Use cases
Leverage the charles revenue attribution model to get insights about the effectiveness of your campaigns and flows
Segment your contacts within charles based on order data
Send order confirmation messages
Display orders in the conversation view to get context about your contacts
Setup
Set up an Emarsys automation that gets triggered based on Order/Purchase event
In the automation, add a webhook preset node.
Configure the webhook preset node so that
It sends the event data to the charles order webhook