> ## 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.

# Klaviyo in-flow Webhook to Chatarmin

> Chatarmin guide: Klaviyo in-flow Webhook to Chatarmin

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

You can either watch the [Video-Guide](https://www.loom.com/share/28d4e0e1438b40cebfb635ad3275f925?sid=25314d8d-86aa-4d36-bf8d-da4087f6e859) above or check-out the steps below!

# First create Chatarmin Flow

When you want to trigger a Flow from a third-party like Zappier or Klaviyo, your Flow Trigger has to be of type **POST-Endpoint** or **Klaviyo Webhook.** You can create a new flow [here](https://chatarmin.com/dashboard/flows/create)

<img src="https://mintcdn.com/chatarmin-help-center/cCC7f96yUQwfA_7X/images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af42-759c-ad54-29910d517d7d.png?fit=max&auto=format&n=cCC7f96yUQwfA_7X&q=85&s=fa6b9bb12227716b4eb22d2fde51f959" alt="Chatarmin help center image" width="564" height="190" data-path="images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af42-759c-ad54-29910d517d7d.png" />

<img src="https://mintcdn.com/chatarmin-help-center/cCC7f96yUQwfA_7X/images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af57-72aa-833a-09c06fc022da.png?fit=max&auto=format&n=cCC7f96yUQwfA_7X&q=85&s=457168aa058f2bbbe5d4609dcd3dc979" alt="Chatarmin help center image" width="564" height="190" data-path="images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af57-72aa-833a-09c06fc022da.png" />

After selecting your trigger, you will need to pass in the **Payload Body,** so that the Tool (Chatarmin) knows, which Variables will/can be used. An example of that payload would be:

```
&#123;
"email": "&#123;&#123; person.email &#125;&#125;",
"phone":"&#123;&#123;person.phone_number&#125;&#125;",
"tracking_url":"&#123;&#123;event.trackingURL&#125;&#125;"
&#125;
```

**You may be asking yourself:** *Where do I get this from?* -> Here comes the fun part:

# Calling the Chatarmin Flow from Klaviyo/Zappier

Now when you go inside a Flow in Klaviyo and choose "**Webhook**" as your Flow-Action, you will be prompted to input following things:

1. Destination URL
2. Headers
3. Payload Body

This Image show-cases where you get those values from, in **Klaviyo**:

<img src="https://mintcdn.com/chatarmin-help-center/cCC7f96yUQwfA_7X/images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-afc9-7385-a7da-b5af20f5795d.png?fit=max&auto=format&n=cCC7f96yUQwfA_7X&q=85&s=2998d92a35435c4b6ef885742fe3594e" alt="Chatarmin help center image" width="5692" height="3200" data-path="images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-afc9-7385-a7da-b5af20f5795d.png" />

So:

1. The **Destination URL** comes from the **Chatarmin Trigger**
2. The **Headers** come from the **Chatarmin Trigger**
3. The **Payload Body** needs to be set **IN** Klaviyo & be copy & pasted **INTO Chatarmin**

🚨 The **"phone"** property is the only required one, in the **Klaviyo JSON Body**, to make the Chatarmin Flow work. For syncing purposes, we recommend to have those 4 properties at least:

```
&#123;
"email": "&#123;&#123; person.email &#125;&#125;",
"phone":"&#123;&#123;person.phone_number&#125;&#125;",
"firstname":"&#123;&#123;person.first_name&#125;&#125;",
"lastname":"&#123;&#123;person.last_name&#125;&#125;"
&#125;
```

# Using JSON/Payload Variables from Trigger in the Flow

Now, after you have configured your **Trigger** with the correct **Payload Body** and clicked on **Save**, you can add **"Send Campaign"** as the next step and select a Template:

<img src="https://mintcdn.com/chatarmin-help-center/cCC7f96yUQwfA_7X/images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af7d-742d-a985-77d63ad413e7.png?fit=max&auto=format&n=cCC7f96yUQwfA_7X&q=85&s=18dd52cc63159ffdf775c7c115c3aed6" alt="Chatarmin help center image" width="3444" height="1858" data-path="images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af7d-742d-a985-77d63ad413e7.png" />

After selecting your Template -> Select your Variables:

<img src="https://mintcdn.com/chatarmin-help-center/cCC7f96yUQwfA_7X/images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af6a-739a-8256-a5af4dfaaab6.png?fit=max&auto=format&n=cCC7f96yUQwfA_7X&q=85&s=bd659c6f16ff9134e256adb3d939c529" alt="Chatarmin help center image" width="3444" height="1858" data-path="images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af6a-739a-8256-a5af4dfaaab6.png" />

Now, after Publishing your Flow, you can test your Flow and see that the passed Variables will be used!

# Testing

If you want **to test if your Webhook works**, you can do so by clicking on **"Preview".**

<img src="https://mintcdn.com/chatarmin-help-center/cCC7f96yUQwfA_7X/images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af49-72d1-8654-08ef1418a4da.png?fit=max&auto=format&n=cCC7f96yUQwfA_7X&q=85&s=c05cb123628c8a45c0d1b9b5656c45d8" alt="Chatarmin help center image" width="1904" height="892" data-path="images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af49-72d1-8654-08ef1418a4da.png" />

Then click on **"Search for a profile"** and choose **your Profile**.\
**NOTE:** Your **"Phone Number"** field has to be **filled out** for the Webhook to work.

<img src="https://mintcdn.com/chatarmin-help-center/cCC7f96yUQwfA_7X/images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af43-756c-b491-23b08bfd1231.png?fit=max&auto=format&n=cCC7f96yUQwfA_7X&q=85&s=b0acab9b2f4604740d397349fdc8acf0" alt="Chatarmin help center image" width="609" height="883" data-path="images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af43-756c-b491-23b08bfd1231.png" />

Once you've chosen your profile with the phone number you want the test flow to be sent, click **"Send Test Request"**.

<img src="https://mintcdn.com/chatarmin-help-center/cCC7f96yUQwfA_7X/images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af3a-73db-825a-8d6a955bdc0b.png?fit=max&auto=format&n=cCC7f96yUQwfA_7X&q=85&s=803e40058f20bd3626adc257eb9391e3" alt="Chatarmin help center image" width="618" height="240" data-path="images/4cf74881-fc3e-4135-b493-85b48a808d33/019b9c80-af3a-73db-825a-8d6a955bdc0b.png" />

**If you received a WhatsApp message the Webhook works as it should.**
