> ## Documentation Index
> Fetch the complete documentation index at: https://help.chatarmin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Emarsys Integration

> Chatarmin guide: Emarsys Integration

By connecting your Emarsys integration, chatarmin automatically syncs contacts and activity with your Emarsys account. The following data is synced Email address, Phone number, custom properties, and Flow enrolled. This way you have measurable KPIs you can use to estimate how Chatarmin is helping you increase your profit, and know which WhatsApp user is which Emarsys Account.

***

# How to connect to Emarsys

***

<iframe src="https://www.loom.com/embed/3933996d87f04ca29466abef77fef61b" title="Loom video" width="100%" height="420" allowFullScreen />

First, go to **Management** -> **Security Settings** -> **API Users** and click on **"Create API User":**

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d72c-76de-96e8-8affa7e8dadd.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=a4994fe18d0105544a7c75dccefbc8e6" alt="Chatarmin help center image" width="1145" height="772" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d72c-76de-96e8-8affa7e8dadd.png" />

Now copy & paste the **Username** & **Secret** into the[**Emarsys Page inside Chatarmin**](https://chatarmin.com/dashboard/emarsys/connect)**:**

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d736-735f-95f8-595032fd38a9.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=8b3be8b43e507d6267f6903a14c9f101" alt="Chatarmin help center image" width="985" height="616" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d736-735f-95f8-595032fd38a9.png" />

Now make sure, to set the correct **permissions** for the newly created **Emarsys API** User.

Click on **Edit** first:

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d71e-7560-a188-49ef55d53682.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=e6553172bf068572b4a3278fd4dd889a" alt="Chatarmin help center image" width="1467" height="483" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d71e-7560-a188-49ef55d53682.png" />

Then select all the permissions shown below:

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d72a-771c-a406-eeaa8f177eb3.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=819b7d6768e6af7830a17c6416694797" alt="Chatarmin help center image" width="1476" height="699" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d72a-771c-a406-eeaa8f177eb3.png" />

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d712-7469-a842-3556772ecfbc.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=c50e3a12bf2cb4f790f90ffc2b616002" alt="Chatarmin help center image" width="1476" height="672" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d712-7469-a842-3556772ecfbc.png" />

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6ef-70ac-a44f-9ce3607086fc.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=d1014e4d9670497a004a3bf891e0fbda" alt="Chatarmin help center image" width="1476" height="540" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6ef-70ac-a44f-9ce3607086fc.png" />

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6f9-738f-bcad-a75604a8efb6.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=625a2adddee52fa73e7f63352a967a1d" alt="Chatarmin help center image" width="1476" height="401" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6f9-738f-bcad-a75604a8efb6.png" />

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d718-7518-825a-1f21c02f8767.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=c359f4a7b0b20052ca3fb9a54ef784df" alt="Chatarmin help center image" width="1476" height="651" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d718-7518-825a-1f21c02f8767.png" />

Now save those permissions.

Congratulations! You have successfully connected to Emarsys 🥳

***

# Updating Emarsys properties via a Chatarmin Flow

***

Here's how you can add properties to your Emarsys account. We can automatically add properties to an Emarsys account depending on the user's behavior. Depending on which branch of the flow the user goes through we can Update the Emarsys profile with a property we determine.

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6e8-73c8-b1bb-54d4299b8b67.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=46cf0d96fbb3705068b6b8cd4e5001ab" alt="Chatarmin help center image" width="747" height="267" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6e8-73c8-b1bb-54d4299b8b67.png" />

Additionally, you can subscribe a user to an Emarsys list depending on the user activity directly.

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6ed-7038-80f3-554096983483.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=d0ad1aa21fd6ee74115802e158a24bc4" alt="Chatarmin help center image" width="784" height="384" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6ed-7038-80f3-554096983483.png" />

***

# IF/Else Split based on Emarsys Properties

***

Inside Flows you also have the ability to if/else split for certain Emarsys Properties:

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d70b-773e-8618-247175061a47.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=22eeb590f79456a87f05726fa6891225" alt="Chatarmin help center image" width="1033" height="537" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d70b-773e-8618-247175061a47.png" />

***

# Segmentation with Emarsys

***

You can use **Emarsys information,** you have on your clients to create specific segments. These segments can later be used to do splits in Flows via **If/Else** splits or to **send campaigns to specific user cohorts**. This way you can create a List or Segment or use an existing one inside of Klaviyo with your existing data and **fetch the** [**Segment in Chatarmin**](https://chatarmin.com/dashboard/audience/segments).

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6e6-75e8-8f1c-2e688bc06e6c.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=eecb6e18f9547b97c6c77de4eccbc89c" alt="Chatarmin help center image" width="1873" height="797" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6e6-75e8-8f1c-2e688bc06e6c.png" />

***

# Automation Programs to Chatarmin Flow

***

You can also trigger a **Chatarmin** Flow through **Emarsys' Automation Program:**

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d763-7688-804a-fd9615f54613.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=a5f379e3b5eaaed1a7082abca4c86095" alt="Chatarmin help center image" width="5292" height="3199" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d763-7688-804a-fd9615f54613.png" />

<iframe src="https://www.loom.com/embed/e6b8a4e020eb43429ede49a0089114d2" title="Loom video" width="100%" height="420" allowFullScreen />

***

# Automatic Sync of Properties to Emarsys

***

When connecting Emarsys in the Chatarmin Integration Page, you can also specifc properties to sync automatically to Emarsys.

For example, to sync the WhatsApp / Chatarmin Optin-Status to an Emarsys Property:

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6fc-730f-ba1c-7916d7b0c7ab.png?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=0006709a6d7b22cd4aca6d8c44e21b11" alt="Chatarmin help center image" width="1033" height="537" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6fc-730f-ba1c-7916d7b0c7ab.png" />

***

# Emarsys Birthday campaign

## How to set up the automation in Emarsys?

1. Create the audience for your campaign. If you want to set up a recurring campaign that is triggered on the specific Birthday of your contract, the segment would be **“Birthday is today”.**

2. Set up an audience-focused program:

* Start with the recurring filter and set it to a daily send-out
* For a Birthday campaign we would recommend sending the message early in the day 😉

3. Edit the Segment to the one you prepared for this specific event:

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d70f-74ce-be47-3501de7651e4.jpg?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=56a9175296de8d6efcffb9c0a70440f9" alt="Chatarmin help center image" width="1254" height="950" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d70f-74ce-be47-3501de7651e4.jpg" />

4. Connect your automation to a webhook and choose the correct webhook preset.

## How to create the correct webhook preset?

[Emarsys Documentation: How to create a webhook preset](https://help.emarsys.com/hc/en-us/articles/4408457148177-Nodes-Webhook-node)

🚨 *External\_reference\_id, phone and e-mail is mandatory to match the contact in Chatarmin. For 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*

5. In the additional data section, please add the event name (this info is relevant for the journey that is supposed to be triggered from charles side):

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6f2-73cd-84f5-5158b71c9f24.jpg?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=c475773ba25438331818f595e668e919" alt="Chatarmin help center image" width="1346" height="356" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d6f2-73cd-84f5-5158b71c9f24.jpg" />

5. Setup a new Flow with an Emarsys Trigger:

* Event Type: Custom Event
* Event Name: “birthday” (needs to match the webhook preset)

Copy the JSON Payload from the testing environment in Emarsys and paste it to the journey trigger. Example:

\{ "id": "646b8faba72d83cfac9724c2", "email":"[max@mustermann.com](mailto:max@mustermann.com)", "phone":"+49182381238", "firstname":"Max", "lastname":"Mustermann", "consent":"double", "tags":\[\{"label":"Agency","id":"643e6d91815051a97f293738"}], }

* set an if/else-split on "emarsys property"

6. Submit the Birthday Template and when accepted, publish the flow.

7. Test the flow by triggering the automation from Emarsys.

***

# Emarsys Webhook as a WhatsApp-Flow-Trigger

***

Setting up a new Flow with an Emarsys Webhook as a trigger:

* Event Type: Custom Event
* Event Name: “birthday” (needs to match the webhook preset)

Copy the JSON Payload from the testing environment in Emarsys and paste it to the journey trigger. Example:

\{ "id": "646b8faba72d83cfac9724c2", "email":"[max@mustermann.com](mailto:max@mustermann.com)", "phone":"+49182381238", "firstname":"Max", "lastname":"Mustermann", "consent":"double", "tags":\[\{"label":"Agency","id":"643e6d91815051a97f293738"}], }

* set an if/else-split on "emarsys property"

🚨 ***Make sure you test the flow by triggering the automation from Emarsys.*** 🚨

Please [find the documentation to setup an emarsys webhook as a trigger for Chatarmin flows here](https://help.sap.com/docs/SAP_EMARSYS/f8e2fafeea804018a954a8857d9dfff3/fdef803874c11014bb3d84b02f215ff1.html?locale=en-US\&advPhr=Webhook+node).

Next, make sure you choose this exact webhook as a trigger [in Chatarmin flowbuilder, as shown below](https://chatarmin.com/dashboard/flows/create):

<img src="https://mintcdn.com/chatarmin-help-center/yL66zflq9rxpRjF_/images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d769-7421-8fad-345bbf036919.jpg?fit=max&auto=format&n=yL66zflq9rxpRjF_&q=85&s=858595cf4d5ba36923f2a729a578345a" alt="Chatarmin help center image" width="5292" height="3199" data-path="images/87930d88-c523-4dfc-a8a4-2330d96d5a8a/019b9c80-d769-7421-8fad-345bbf036919.jpg" />

Next, follow our [flow-guide](/features-in-depth/flows/flows-explained), [more exactly this guide on triggering WA-flows in Chatarmin through custom api endpoints from 3rd party integrations](/features-in-depth/flows/how-to-trigger-a-whatsapp-flow-via-post-endpoint-in-chatarmin), in order to setup the flow of your choice.

***PRO-TIP:*** Make sure you pair delays and if/else-splits with emarsys-syncs ("logic -> emarsys as integration") in order to only target the right audience at the right moment of the user journey.
