> For the complete documentation index, see [llms.txt](https://help.sesami.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.sesami.co/zh-cn/zi-dong-hua/sesami-flows-and-klaviyo.md).

# Sesami 流程和 Klaviyo

将 Sesami 与 Klaviyo 集成，为您的预约业务提供高级电子邮件和短信营销支持。

{% hint style="success" %}
**连接 Klaviyo 有两种方式。** 该 [Klaviyo 应用](https://help.sesami.co/zh-cn/apps-integrations/klaviyo/klaviyo-app.md) 无需 API 密钥或 webhook 设置即可发送预约事件。本页面介绍 Sesami Flows，它使用您自己的 Klaviyo API 密钥，并可处理到访前的提醒。请参阅 [Klaviyo](https://help.sesami.co/zh-cn/apps-integrations/klaviyo.md) 了解何时使用哪一种。
{% endhint %}

## 什么是 Klaviyo？

Klaviyo 是一个主要用于电子邮件营销和短信营销的营销自动化平台。作为 Sesami 的战略合作伙伴，Klaviyo 为基于预约的业务提供强大的客户沟通工具。

## 为什么要将 Sesami 与 Klaviyo 集成？

您可以通过将 Sesami 事件数据导入 Klaviyo，并通过 Klaviyo 触发所有通信（电子邮件或短信），来简化所有面向客户的互动。对于许多已经使用 Klaviyo 发送订单确认、短信营销消息和其他通信的企业，通过 Klaviyo 同时发送预约确认和预约提醒，可打造统一的客户体验。

### 常见使用场景

**电子邮件和短信流程：**

* 预约确认流程
* 预约改期流程
* 预约取消流程
* 预约提醒流程（提前 24 小时，或自定义时间）
* 预约完成流程

**组合集成：**

* 通过评价平台（Okendo、Yotpo、Trustpilot 等）请求客户评价
* 在预约后邀请客户加入或跟踪忠诚度计划（LoyaltyLion、Swell 等）
* 个性化预约电子邮件（Limespot、Nosto 等）

## 工作原理

Sesami 使用 **Sesami Flows** 将预约事件实时发送至 Klaviyo。当预约被创建、改期、签到、开始、取消或标记为未到场时，Sesami 会将该事件数据作为自定义指标推送到 Klaviyo。然后，您可以在 Klaviyo 中创建流程，以根据这些指标触发电子邮件或短信。

### 数据流

1. 客户在 Sesami 中预约
2. Sesami Flow 被触发，并通过 webhook 将事件数据发送至 Klaviyo
3. Klaviyo 将该事件作为自定义指标接收（例如，“Sesami Appointment Created”）
4. Klaviyo Flow 根据该指标触发
5. 客户收到包含预约详情的电子邮件或短信

## 设置说明

### 第 1 步：在 Sesami 中创建 Flow

1. 打开 [Sesami 管理门户](https://help.sesami.co/admin/sesami-admin-portal)
2. 导航至 **Flows**
3. 点击 **创建 Flow**

### 第 2 步：选择 Klaviyo 预设

从可用的 Klaviyo Flow 预设中选择：

* **Klaviyo 事件，已创建预约**
* **Klaviyo 事件，预约已改期**
* **Klaviyo 事件，预约已取消**
* **Klaviyo 事件，预约已完成**
* **Klaviyo 事件，预约前 24 小时提醒**

{% hint style="info" %}
您可以通过复制提醒预设并更改触发时间，创建任意数量的提醒 Flow。
{% endhint %}

<figure><img src="https://1798155128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FuxdHvTIRYlwCWGpBwGIH%2FScreenshot%202026-08-27%20at%2013.33.08.png?alt=media&amp;token=2071f95d-dbf7-4dcf-a786-e0d1c0e5434d" alt=""><figcaption></figcaption></figure>

### 第 3 步：查看 Flow 设置

查看常规 Flow 设置，以了解触发条件和 webhook 配置。

### 第 4 步：获取您的 Klaviyo 私有 API 密钥

{% hint style="warning" %}
**重要提示**：自 2024 年 6 月 12 日起，Sesami Flows 使用 Klaviyo 的私有 API 密钥（而非公钥）。请务必创建私有密钥。
{% endhint %}

1. 登录您的 **Klaviyo 账户**
2. 导航至 **设置 > API 密钥**
3. 点击 **创建私有 API 密钥**
4. 将其命名为“Sesami Integration”，并选择 **完全访问密钥**
5. **复制生成的私有 API 密钥**

<div><figure><img src="https://1798155128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FJQQrLNJF0Wc1v55x5pw6%2FScreenshot%202026-08-27%20at%2013.37.52.png?alt=media&amp;token=2482f74f-2bd7-416a-b74c-e617cbd40076" alt=""><figcaption></figcaption></figure> <figure><img src="https://1798155128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FtDaqzIIZt1JaRJaFN2Zo%2FScreenshot%202026-08-27%20at%2013.43.28.png?alt=media&amp;token=bdf7fd77-bbd9-4867-aa5c-dd62512056bf" alt=""><figcaption></figcaption></figure></div>

### 第 5 步：将您的 API 密钥添加到 Flow

1. 在您的 Sesami Flow 设置中，找到占位符 `KLAVIYO_PRIVATE_API_KEY`
2. 将其替换为您实际的 Klaviyo 私有 API 密钥
3. **保存** 该 Flow

<figure><img src="https://1798155128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2Fi5oTyjoqq0PXgNihjLCt%2FScreenshot%202026-08-27%20at%2013.46.46.png?alt=media&amp;token=cf59b1ba-62f8-4910-aef2-a545e114fd05" alt=""><figcaption></figcaption></figure>

### 第 6 步：创建并测试预约

1. 在 Sesami 中创建测试预约，以连接 Sesami 和 Klaviyo 并发送事件数据。<br>
2. 测试完成后，相应的事件及其属性将在 Klaviyo 中可用。然后，您可以继续进行 Klaviyo Flow 配置的后续步骤。

{% hint style="info" %}
**注意：** 必须创建测试预约，才能建立新配置的 Sesami Flow 与 Klaviyo API 之间的连接。

测试操作必须与 Flow 的触发器相匹配：

* 已创建预约 → 创建新的测试预约。
* 预约已改期 → 为现有预约改期。
* 客户已签到 → 为客户的预约办理签到。
* 预约已开始 → 等待预约开始。
* 预约已取消 → 取消现有预约。
* 未到场 → 将预约标记为未到场。
  {% endhint %}

## 在 Klaviyo 中设置 Flows

一旦 Sesami 开始向 Klaviyo 发送事件，您需要在 Klaviyo 中创建 Flows 以向客户发送通信。

### 第 1 步：在 Klaviyo 中创建 Flow

1. 登录 **Klaviyo**
2. 导航至 **Flows**
3. 点击 **创建 Flow** 然后 **自行构建**

<figure><img src="https://1798155128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FgF1uw6IQslc07hlOzuBD%2FScreenshot%202026-08-27%20at%2014.23.17.png?alt=media&amp;token=daee427d-8831-4abc-979c-0f87e44b10ff" alt=""><figcaption></figcaption></figure>

### 第 2 步：选择指标触发器

1. 选择 **指标** 作为您的触发器类型
2. 点击 API
3. 找到“Sesami”并选择相应的指标。

<div><figure><img src="https://1798155128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2FdeylxlHLsqqiXcWoO3pb%2FScreenshot%202026-08-27%20at%2014.26.23.png?alt=media&amp;token=8c59d1a1-ec7f-413b-ae5c-b61baf23116c" alt=""><figcaption></figcaption></figure> <figure><img src="https://1798155128-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDgiM1CWSLWRIbhORANO%2Fuploads%2F5XGdGYX0ttyeANtcq58A%2FScreenshot%202026-08-27%20at%2014.30.23.png?alt=media&amp;token=c9c3fb06-9ad7-4f05-bc2b-9b6aa25f767f" alt=""><figcaption></figcaption></figure></div>

### 第 3 步：添加电子邮件或短信操作

1. 点击 **添加操作**
2. 选择 **电子邮件** 或 **短信**
3. 设计您的消息模板

### 第 4 步：在模板中使用事件属性

编辑电子邮件或短信内容时，您可以使用上表所示的语法访问所有预约相关属性。例如：

* `{{ event.datetime }}` - 显示预约日期和时间
* `{{ event.service_name }}` - 显示服务名称
* `{{ event.team_member }}` - 显示分配的团队成员
* `{{ event.customer_management_link }}` - 为客户提供改期或取消的链接

### 第 5 步：启用您的 Flow

设计并测试消息后，将您的 Flow 设置为 **启用** 以开始发送自动消息。

{% hint style="info" %}
**将您的 Klaviyo Flows 标记为事务性消息。** 预约确认、提醒、改期/取消通知及类似的预约通信属于事务性消息，而非营销消息。在 Klaviyo 中将其标记为事务性消息，可确保无论客户是否同意接收营销信息，所有客户都能收到这些消息，同时保持营销信息的送达率。

在 Klaviyo 中，打开 Flow 的消息操作，前往 **其他选项**，然后关闭 **智能发送** 并将消息类型设置为 **事务性**.
{% endhint %}

## 测试您的集成

上线前，请测试集成：

1. 在 Sesami 中创建测试预约
2. 检查该事件是否显示在 Klaviyo 的 **活动动态** 或 **指标**
3. 验证所有预约属性是否正确填充
4. 测试您的 Klaviyo Flow，确保电子邮件/短信能正确发送
5. 检查内容，确保所有动态属性均正确显示

{% hint style="success" %}
**专业提示**：创建一个测试客户电子邮件地址并进行测试预约，以便在为真实客户启用 Flows 前验证完整的客户体验。
{% endhint %}

## 可用事件属性

当 Sesami 将预约数据发送至 Klaviyo 时，会包含以下属性，您可以在 Klaviyo 电子邮件或短信模板中使用它们：

| 属性                                     | 示例值                           | 说明            |
| -------------------------------------- | ----------------------------- | ------------- |
| `{{ event.appointment_id }}`           | 62e144124a6d0b9ed42ffb55      | 唯一预约 ID       |
| `{{ event.datetime }}`                 | 2022 年 7 月 29 日下午 04:30       | 预约日期和时间       |
| `{{ event.order_id }}`                 | 4447608111157                 | Shopify 订单 ID |
| `{{ event.quantity }}`                 | 1                             | 预约数量          |
| `{{ event.service_name }}`             | 纹身去除                          | 服务名称          |
| `{{ event.service_description }}`      | 请提前 15 分钟到达                   | 服务说明          |
| `{{ event.service_duration }}`         | 30                            | 时长（分钟）        |
| `{{ event.service_price }}`            | 149                           | 服务价格          |
| `{{ event.service_location }}`         | 洛杉矶比佛利山庄 100 号                | 服务地点          |
| `{{ event.service_image_url }}`        | <https://cdn.shopify.com/>... | 服务图片 URL      |
| `{{ event.team_member }}`              | David                         | 分配的团队成员姓名     |
| `{{ event.team_member_description }}`  | David 拥有十年经验                  | 团队成员简介        |
| `{{ event.team_member_email }}`        | <david@email.com>             | 团队成员电子邮件      |
| `{{ event.team_member_phone }}`        | 0000000000                    | 团队成员电话        |
| `{{ event.variant_title }}`            | 30 分钟                         | 产品变体标题        |
| `{{ event.customer_management_link }}` | <https://r.sesami.co/1234>    | 供客户管理预约的链接    |
| `{{ event.line_item_properties }}`     | 问题/答案对                        | 自定义表单回复       |

## 常见问题

<details>

<summary>如果我需要设置多个提醒流程，该怎么办？</summary>

您可以使用 Klaviyo 提醒预设创建新的 Flows，并在 Flow 配置中更改触发时间，从而构建任意数量的提醒流程。例如，您可以在以下时间发送提醒：

* 预约前 7 天
* 预约前 24 小时
* 预约前 2 小时

</details>

<details>

<summary>我可以将 Klaviyo 用于短信以及电子邮件吗？</summary>

可以！Klaviyo 同时支持电子邮件和短信。只要您已在 Klaviyo 账户中启用短信功能，并在获得同意后收集了客户电话号码，您就可以在 Klaviyo Flows 中使用短信操作。

</details>

<details>

<summary>公有 API 密钥要求发生了什么变化？</summary>

自 2024 年 6 月 12 日起，Sesami 已将所有 Flow 预设更新为使用 Klaviyo 的私有 API 密钥而非公钥，以符合 Klaviyo 更新后的 API 要求。设置新集成时，请始终使用私有密钥。

</details>

<details>

<summary>事件没有显示在 Klaviyo 中。我应该检查什么？</summary>

* 确认您的 Klaviyo 私有 API 密钥正确且具有完全访问权限
* 确保已在 Sesami 中启用该 Flow
* 检查您是否在设置 Flow 后创建了测试预约
* 查看 Sesami Flow 日志，确认 webhook 是否已成功发送
* 查看 Klaviyo 的活动动态，确认是否正在接收事件

</details>

## 相关内容

* [Sesami Flows](https://help.sesami.co/zh-cn/zi-dong-hua/sesami-flows.md) - Sesami 自动化系统概述
* [电子邮件和 Webhook 操作](https://help.sesami.co/zh-cn/zi-dong-hua/email-and-webhook-as-action-types.md) - 了解操作类型
* [Klaviyo 集成概述](https://help.sesami.co/zh-cn/apps-integrations/klaviyo.md) - Klaviyo 通用模式
* [通知电子邮件](https://help.sesami.co/zh-cn/tong-zhi/notification-emails.md) - Sesami 默认通知系统


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.sesami.co/zh-cn/zi-dong-hua/sesami-flows-and-klaviyo.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
