# 营销消息与交易消息

当通过 Push、Email、In-App、SMS、WhatsApp 或 Viber 发送消息时，您可以选择消息是**营销**类型还是**交易**类型。此选择决定了 Pushwoosh 如何应用用户偏好、频率限制和[控制组](/zh/product/audience-data-and-segmentation/control-groups/)。

<span id="choosing-the-right-message-type" />

## 选择正确的消息类型

<Aside type="tip">

对于可以尊重用户选择和限制的营销活动，请使用**营销**类型。对于必要的、用户触发的或系统要求的通信，请保留使用**交易**类型。将其用于促销内容可能会导致合规性问题和用户投诉。
</Aside>

| 消息类型 | 营销消息 | 交易消息 |
| ----- | ----- | ----- |
| **用户偏好** | 尊重订阅偏好。仅发送给选择加入您在营销活动中选择的[订阅类别](/zh/product/messaging-channels/emails/email-preferences/#how-email-categories-and-message-delivery-work)的用户。对于 SMS 和 Viber，不会发送给已选择退出的号码。请参阅[SMS 和 Viber 营销同意](/zh/product/messaging-channels/sms-viber-marketing-consent/)。 | 绕过用户偏好。发送给所有用户，包括那些已退订营销消息的用户。 |
| **频率上限** | [全局频率上限](/zh/product/messaging-channels/message-delivery-settings/frequency-capping/)适用，但[静默推送和 Live Activity 更新](/zh/product/messaging-channels/message-delivery-settings/frequency-capping-faq/#which-messages-are-affected-by-global-frequency-capping)除外。[静默期](/zh/product/customer-journey/journey-settings/#silence-period)仅在 Customer Journey 中适用（不适用于 Viber）。 | 频率上限和静默期不适用。 |
| **控制组** | 排除[控制组](/zh/product/audience-data-and-segmentation/control-groups/)中的用户。 | 包括控制组中的用户。 |
| **典型用例** | 促销和优惠、新闻通讯、产品和功能更新、重新互动、生命周期营销活动、公告。 | 账户和安全、订单和支付、重要通知、验证。 |

<span id="where-to-set-the-message-type" />

## 在哪里设置消息类型
消息类型在特定于渠道的设置中进行设置：可以在 Journey 元素中设置，也可以在一次性消息表单中设置。

*   **Email**：消息类型在 Customer Journey 和发送一次性消息时可用。在 Journey 中，请在 [Email 元素](/zh/product/customer-journey/journey-elements/channels/email/#set-message-type)中设置。对于一次性电子邮件，请在[营销活动设置](/zh/product/messaging-channels/emails/sending-emails/send-one-time-emails/#select-message-type)中设置。
*   **Push**：消息类型在 Customer Journey 和发送一次性推送时可用。在 Journey 中，请在 [Push 元素](/zh/product/customer-journey/journey-elements/channels/push/#set-message-type)中设置。对于一次性推送，请在[营销活动设置](/zh/product/messaging-channels/push-notifications/one-time-push/)中设置。
*   **In-app**：消息类型仅在 Customer Journey 中可用。在构建 [Customer Journey](/zh/product/messaging-channels/in-apps/send-in-apps/send-in-apps-via-customer-journey/) 时，请在 [In-app 元素](/zh/product/customer-journey/journey-elements/channels/in-app/#set-message-type)中设置。
*   **SMS**：在构建 [Customer Journey](/zh/product/customer-journey/pushwoosh-journey-overview/) 时，请在 [SMS 元素](/zh/product/customer-journey/journey-elements/channels/sms/#set-message-type)中设置。
*   **WhatsApp**：在构建 [Customer Journey](/zh/product/customer-journey/pushwoosh-journey-overview/) 时，请在 [WhatsApp 元素](/zh/product/customer-journey/journey-elements/channels/whatsapp/#set-message-type)中设置。
*   **Viber**：在构建 [Customer Journey](/zh/product/customer-journey/pushwoosh-journey-overview/) 时，请在 [Viber 元素](/zh/product/customer-journey/journey-elements/channels/viber/#set-message-type)中设置。这与模板/自由格式内容的选择是分开的，后者仅影响定价。

### 无预选消息类型

消息类型由您自行选择：

*   **一次性推送**：新建的推送未选择消息类型。请在 **Content** 步骤中选择一种类型以继续。
*   **Customer Journey**：新建的 Push、SMS、Viber、WhatsApp、In-app、App Inbox 和 Multi-Armed Bandit 元素未选择消息类型，在您选择之前，元素会显示**未选择消息类型**警告。仅能从 [Audience-based entry](/zh/product/customer-journey/journey-elements/entry-elements/audience-based-entry/) 到达的元素会显示带有**默认**标记的**营销消息**。如果是服务类消息，请选择**交易消息**。

Journey 元素中的**未选择消息类型**警告不会阻止您应用该元素或保存 Journey。

Email 的工作方式不同。一次性电子邮件表单和 Journey 中的 Email 元素不要求您选择消息类型。

<span id="api-requests-and-message-type" />

## API 请求和消息类型

在 API 中使用与 Control Panel 中相同的 **marketing** 和 **transactional** 值。

对于推送、SMS 和 WhatsApp，请参阅 [`/createMessage` 参数](/zh/developer/api-reference/messages-api/api-prerequisites/#message_type)。对于 Viber，请在 [Messaging API v2](/zh/developer/api-reference/messaging-api-v2/notify/) 中使用 `message_type`。如果省略类型，消息将被视为营销消息。对于电子邮件，请参阅 [`createEmailMessage`](/zh/developer/api-reference/email-api/#createemailmessage)。