# Klaviyo

## Overview

With this integration, you can use Klaviyo to send out the proactive delivery updates that are currently deployed by parcelLab. In the Klaviyo platform, you can create communication flows to send notifications from Klaviyo that use trigger events and order data from the parcelLab system.

## Standard Trigger Events

The standard parcelLab trigger events that can be used to send notifications in the Klaviyo platform are described in the following table.

{% hint style="info" %}
Additional custom events can also be made available for use in Klaviyo.
{% endhint %}

| parcelLab Trigger Name             | Description                                                                                                                                                                            | Klaviyo Metric Name                           |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| Order Preparation                  | This notification is sent when a customer’s order has been received and is being processed by the warehouse.                                                                           | parcelLab: Order Preparation                  |
| Warehouse Delay                    | This notification is sent when a customer’s order has been received but is experiencing delays in the warehouse.                                                                       | parcelLab: Warehouse Delay                    |
| Dispatch Confirmation              | This notification is sent when a customer’s order has been dispatched from your warehouse.                                                                                             | parcelLab: Dispatch Confirmation              |
| Scheduled                          | This notification is sent when the carrier has provided a delivery date for the customer’s order.                                                                                      | parcelLab: Scheduled                          |
| Delay                              | This notification is sent when a customer’s order is delayed while in transit.                                                                                                         | parcelLab: Delay                              |
| Pickup Ready                       | This notification is sent when a customer’s order is: 1) delivered to a post office, parcel shop, or parcel locker; 2) ready for collection.                                           | parcelLab: Pickup Ready                       |
| Out for Delivery                   | This notification is sent on the day a customer’s order is out for delivery.                                                                                                           | parcelLab: Out for Delivery                   |
| Out for Delivery Correction        | This notification is sent if the customer’s order is not fulfilled within the timeline announced and a new delivery date is provided.                                                  | parcelLab: Out for Delivery Correction        |
| Failed Attempt                     | This notification is sent when a delivery was attempted but is unsuccessful.                                                                                                           | parcelLab: Failed Attempt                     |
| Service Notice to Return to Sender | This notification is sent when a customer’s order is being returned to the sender. Additional notifications for the order en route to the sender will be suppressed from the customer. | parcelLab: Service Notice to Return to Sender |
| Return Warning                     | This notification is sent when a customer has: 1) selected “drop-off” as their return method; 2) not yet deposited their return parcel at a drop-off location.                         | parcelLab: Return Warning                     |
| Return Delayed                     | This notification is sent when a customer’s return is delayed while in transit.                                                                                                        | parcelLab: Return Delayed                     |
| Return Received                    | This notification is sent when a customer’s return has been delivered to your warehouse.                                                                                               | parcelLab: Return Received                    |
| Return Processed                   | This notification is sent when a customer’s return has been processed and their reimbursement is being issued.                                                                         | parcelLab: Return Processed                   |

## Configuring the Klaviyo Integration

The following sections describe the configuration required for the Klaviyo integration with parcelLab.

### Customer Requirements

For successful configuration of the Klaviyo integration, the following requirements must be met:

* An active account with parcelLab and Klaviyo.
* Outbound and/or returns communications set up through parcelLab with current order data in the parcelLab system.
* Connect your Klaviyo account with parcelLab (see [how to set up via OAuth below](#set-up-klaviyo-oauth-connection))

{% hint style="info" %}
You can also provide parcelLab with your Klaviyo public API key to connect with Klaviyo, which you can find from the Settings section of your Klaviyo account.
{% endhint %}

<figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FmRf8ay7HPPdAdlczaJPg%2FAPIKey.gif?alt=media&#x26;token=2294f3f2-558e-4fbc-a7b4-0555a2825dc2" alt="GIF showing how to find the public API key in the Klaviyo account settings"><figcaption></figcaption></figure>

#### Set Up Klaviyo OAuth Connection

{% hint style="info" %}
We recommend connecting your Klaviyo account using OAuth to enable secure access to your data.
{% endhint %}

To authenticate with Klaviyo:

1. In the parcelLab App, click the **Admin** option in the global navigation menu.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FEloLFDEQZXNKzGmXpidQ%2FAdminOption.png?alt=media&#x26;token=0c0dc151-95e1-444b-b842-afae09995c9e" alt="Admin option highlighted in the global navigation menu" width="152"><figcaption></figcaption></figure></div>

   The Admin module is where certain administrative functions for App users can be found.
2. Click the **Authorizations** option in the navigation pane.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>You must have the Account Setup Admin permission assigned to access integrations.</p></div>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FARPT7wK91fG9dnz11Kvg%2FAuthorizationsOption.png?alt=media&#x26;token=9c54c4b3-c054-4233-aae4-a852e1059ff1" alt="Authorizations option highlighted in the Admin navigation pane" width="563"><figcaption></figcaption></figure></div>

   The Authorizations section of the Admin module will display, showing a list of integrations for your account.
3. Select the Klaviyo OAuth integration from the list.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>The Klaviyo integration will be available for authentication when parcelLab has done the initial set up for your account.</p></div>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FlAcmuOHKXMjXsJYPDKIR%2FAuthorizationsListKlaviyo.png?alt=media&#x26;token=99739ebc-6315-47f8-8acd-9ad911fa32ba" alt="Klaviyo OAuth integration highlighted in integrations list" width="563"><figcaption></figcaption></figure></div>

   The Change OAuth Integration page will display for the Klaviyo integration.
4. Click the **Link Account** option to initiate the authentication process.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FDZbfZ7SsHMZrMeflhYDU%2FAuthorizationsKlaviyoLinkAccButton.png?alt=media&#x26;token=d8115d71-9b23-488c-bd7c-975f9f92df32" alt="Link Account button highlighted on Klaviyo OAuth integration page" width="563"><figcaption></figcaption></figure></div>

   You will be redirected to the Klaviyo website to authorize parcelLab to connect to your Klaviyo account.
5. Follow the on-screen instructions to complete the authentication process.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FS6uQcxfhZcyu6yjpTbVI%2FAuthorizationsKlaviyoConfirm.png?alt=media&#x26;token=fc3352ad-37ed-4bbe-b857-a45a9e92435f" alt="Klaviyo account authorization page" width="563"><figcaption></figcaption></figure></div>

   When the authentication process is finished, the Klaviyo integration will show as connected to your account in the App.

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FHGtp8wSJr15OGVlgmDMQ%2FAuthorizationsKlaviyoConnected.png?alt=media&#x26;token=515bde56-ac1b-4c6b-bfe1-19a2f35fc8d3" alt="Klaviyo OAuth integration connected" width="563"><figcaption></figcaption></figure></div>

### Implementation Process

When the required information is provided, parcelLab can integrate with the Klaviyo platform and send the order and status update information for the supported trigger events to enable the configured communications to be sent via Klaviyo.

{% hint style="info" %}
For more information on the scope and requirements of integrating Klaviyo, please contact your parcelLab representative.
{% endhint %}

### Create Communication Flows in Klaviyo

You can create flows for your communications (that is: emails and SMS) in Klaviyo using the trigger events from parcelLab.

{% hint style="info" %}
These trigger events are referred to as metrics in the Klaviyo platform.
{% endhint %}

#### Create a Communication Flow using Metrics

To create a communication flow in Klaviyo using metrics:

1. Access the flow builder in Klaviyo.<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FLbUnwpmsDyH53uH071w5%2FFlowCreateBuilder.png?alt=media&#x26;token=1d9248c3-a571-4d4c-86b2-65b96febb4f2" alt="Klaviyo flow builder" width="563"><figcaption></figcaption></figure></div>
2. Click the **Metric** component in the **Trigger Setup** pane.<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FJAzzmQDMGm6DAe0qA4vQ%2FFlowCreateBuilderMetricOption.png?alt=media&#x26;token=cf06191e-297a-4d87-b44c-388ad38a19fd" alt="Metric component highlighted in the Trigger Setup pane" width="180"><figcaption></figcaption></figure></div>
3. Select the metric (that is: parcelLab trigger event) to trigger the communication flow, and then click **Done**.<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FWj06YATgOXzi46ZTU2Uj%2FFlowCreateBuilderMetricSelected.png?alt=media&#x26;token=d753cb81-974d-4e3a-895a-7c0dd6fc85e6" alt="parcelLab trigger event highlighted in the Trigger Setup pane" width="175"><figcaption></figcaption></figure></div>

   \
   The selected metric will display as the trigger event in the main section of the flow builder.<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FsFlpKVLbgJxohH9ZefHA%2FFlowCreateBuilderMetricTrigger.png?alt=media&#x26;token=68679690-d0db-4199-9e8b-a81fb4f25f33" alt="parcelLab trigger event highlighted in the main section of the flow builder"><figcaption></figcaption></figure></div>
4. Drag and drop the action (for example: email) that you want to occur after the event is triggered.<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FugnqDuO6jM7F5tD40KAa%2FFlowsCreateBuilderEmail.png?alt=media&#x26;token=f0ab6772-494e-4253-9dfc-0e20f1def371" alt="Email action highlighted"><figcaption></figcaption></figure></div>
5. When you have added the required actions, click **Exit**.

The communication flow is saved for the selected metric and communication type.

#### Create a Communication Flow using Segments

You can use segments to configure customer-specific communications, allowing you to customize the communication type and content sent to different customer groups based on the segment settings. You can include parcelLab trigger events as part of custom segments to target your communications to your customers based on different scenarios (for example: for customers that subscribe to marketing content or items that are being returned).

<figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FxAKgwSOiG85UXjYkQWMx%2FSegmentpLEvent.png?alt=media&#x26;token=ce32ecc6-e9ac-43c9-8883-0e8b058fc74a" alt="parcelLab trigger event highlighted on segment builder"><figcaption></figcaption></figure>

To create a communication flow in Klaviyo using segments:

1. Access the flow builder in Klaviyo, and then click the **Segment** component in the **Trigger Setup** pane.<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2F7DaNRc1BSOqkDGFUuUgI%2FFlowCreateBuilderSegmentOption.png?alt=media&#x26;token=859c3657-31f3-4165-8d1e-dfc23e28c701" alt="Segment component highlighted in the Trigger Setup pane" width="563"><figcaption></figcaption></figure></div>
2. Select the required segment you want to use (that is: these can use parcelLab trigger events).<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FfWgBPp5DYP3vCJm918UI%2FFlowCreateBuilderSegmentSelected.png?alt=media&#x26;token=9f0dade8-b01f-4c9b-9bf1-da134bd95c74" alt="Selected segment highlighted in the Trigger Setup pane" width="176"><figcaption></figcaption></figure></div>

   \
   The selected segment will display as the trigger event in the main section of the flow builder.<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FxySBTRCSU1jRmOJQJyuh%2FFlowCreateBuilderSegmentTrigger.png?alt=media&#x26;token=670b9ffc-ece0-4345-8765-aa67c06beaa4" alt="Selected segment in main section of the flow builder" width="563"><figcaption></figcaption></figure></div>
3. Drag and drop the action(s) that you want to follow the segment (for example: email).<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FhdYkuaMM8KccbEPdOcTN%2FFlowCreateBuilderSegmentEmail.png?alt=media&#x26;token=4712b352-c055-478a-8f10-e961bbe85ae5" alt="Email action highlighted" width="563"><figcaption></figcaption></figure></div>
4. When you have added the required actions, click **Exit**.

The communication flow is saved for the selected segment and communication type.

#### Create a Communication Flow using Conditional Split

The following examples show how you can use the conditional split functionality in communication flows to display content differently based on certain values.

<details>

<summary>Configure Email and SMS Notifications</summary>

To configure email and SMS notifications:

1. Access the flow builder in Klaviyo, and then select the required metric (that is: parcelLab trigger event) to trigger the communication flow. For further information, see [how to add communication flows](#create-communication-flows-in-klaviyo).
2. Drag and drop the **Conditional Split** component that you want to occur after the event is triggered, and then add the required condition (that is: if customers have consented to receive SMS notifications) in the **Configuration** section in the left-hand pane.<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FCu3JJ2Vjm89QQYqjwNBH%2FConditionalSplitSMSConfig.png?alt=media&#x26;token=2eb74aff-6c43-463a-a3d5-ebe189b414df" alt="Conditional split configuration for SMS consent" width="175"><figcaption></figcaption></figure></div>
3. Drag and drop the **SMS** action under the **YES** answer to send SMS messages to those customers that have opted-in to receive order status notifications via SMS.<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2Fj2VtRynacwzuzGY6YMlo%2FConditionalSplitSMSYes.png?alt=media&#x26;token=2c6e2d24-d070-4708-a5dc-c45b8c1722c6" alt="SMS action highlighted" width="563"><figcaption></figcaption></figure></div>
4. Drag and drop the **Email** action under the **YES** answer (below the SMS action) and the **NO** answer to send email messages providing order status updates for customers that opt-in to receive SMS notifications and those that opt-out respectively.<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FAiuWUkjvBA7kXKz0MVXB%2FConditionalSplitSMSEmails.png?alt=media&#x26;token=e763e24d-721e-424c-995a-73f7c3af35d0" alt="Email action highlighted for customers that opt-in/opt-out to receive SMS notifications" width="563"><figcaption></figcaption></figure></div>
5. Click **Exit**.

The communication flow is saved to send email and SMS notifications.

</details>

<details>

<summary>Configure Different Emails for Customer Groups</summary>

To configure different emails for specific customer groups:

1. Access the flow builder in Klaviyo, and then select the required metric (that is: parcelLab trigger event) to trigger the communication flow. For further information, see [how to add communication flows](#create-communication-flows-in-klaviyo).
2. Drag and drop the **Conditional Split** component that you want to occur after the event is triggered, and then add the required condition (that is: if customers are registered as members) in the **Configuration** section in the left-hand pane.<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FOIktisrXMGsNMO3OqVbT%2FConditionalSplitMembersConfig.png?alt=media&#x26;token=eee49166-63fa-4549-a303-97f8b853226b" alt="Conditional split configuration for membership" width="175"><figcaption></figcaption></figure></div>
3. Drag and drop the **Email** action under the **YES** answer to send email messages providing order status updates with additional content for a specific customer group (for example: inform customers registered as members with your brand about membership advantages or offer discounts).<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2Fzjkw8sLFNOlNpJH4FFZY%2FConditionalSplitMembersYes.png?alt=media&#x26;token=424a124b-9308-4012-83b1-c0738c872943" alt="Email action highlighted for members" width="563"><figcaption></figcaption></figure></div>
4. Drag and drop the **Email** action under the **NO** answer to send email messages providing order status updates only to those customers for a specific customer group (for example: customers that are not registered as members with your brand).<br>

   <div align="left"><figure><img src="https://1156682959-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPf1Lv1YUuLYva6LrXQ%2Fuploads%2FyrrbOgGCeJzzywWMhOiy%2FConditionalSplitMembersNo.png?alt=media&#x26;token=426c76a2-652a-4d32-86df-ba91b7638df8" alt="Email action highlighted for non-members" width="563"><figcaption></figcaption></figure></div>
5. Click **Exit**.

The communication flow is saved to send different email messages based on the defined customer group.

</details>
