

**End of support notice:** On October 30, 2026, AWS will end support for Amazon Pinpoint. After October 30, 2026, you will no longer be able to access the Amazon Pinpoint console or Amazon Pinpoint resources (endpoints, segments, campaigns, journeys, and analytics). For more information, see [Amazon Pinpoint end of support](https://docs.aws.amazon.com/console/pinpoint/migration-guide). **Note:** APIs related to SMS, voice, mobile push, OTP, and phone number validate are not impacted by this change and are supported by AWS End User Messaging.

# Amazon Pinpoint campaigns
<a name="campaigns"></a>

A *campaign* is a messaging initiative that engages a specific audience [segment](segments.md). A campaign sends tailored messages according to a schedule that you define. You can use the console to create a campaign that sends messages through any single channel that is supported by Amazon Pinpoint: mobile push, in-app, email, SMS, or custom channels.

For example, to help increase engagement between your mobile app and its users, you could use Amazon Pinpoint to create and manage push notification campaigns that reach out to users of that app. Your campaign might invite users back to your app who haven't run it recently or offer special promotions to users who haven't purchased recently.

Your campaign can send a message to all users in a segment, or you can allocate a holdout, which is a percentage of users who receive no messages. The segment can be one that you created on the **Segments** page or one that you define while you create the campaign. 

You can set the campaign's schedule to send the message once or at a recurring frequency, such as once per week. You can also set up your campaign to send messages when specific events occur. For example, you can send a campaign when a user creates a new account, or when a customer adds an item to their shopping cart, but doesn't complete their purchase. To prevent users from receiving your messages at inconvenient times, you can also configure your campaigns so that they don't send messages during specific quiet hours.

To experiment with alternative campaign strategies, set up your campaign as an *A/B test*. An *A/B test* includes two or more treatments of the message or schedule. Treatments are variations of your message or schedule. As your users respond to the campaign, you can view campaign analytics to compare the effectiveness of each treatment.

If you want to send a one-time message without engaging a user segment or defining a schedule, you can [send a direct message](messages.md) instead of creating a campaign.

**Topics**
+ [Create a campaign](campaigns-begin.md)
+ [Specify the audience for the campaign](campaigns-segment.md)
+ [Configure the message](campaigns-message.md)
+ [Schedule the campaign](campaigns-schedule.md)
+ [Review and launch the campaign](campaigns-review.md)
+ [Managing campaigns](campaigns-managing.md)
+ [Troubleshooting campaigns](campaigns-troubleshooting.md)

# Create a campaign
<a name="campaigns-begin"></a>

The first step in setting up a campaign is to create a new campaign. When you create a new campaign, you give the campaign a name, specify whether the campaign should be a standard campaign or an A/B test campaign, and choose the channel that you want to use to send the campaign.

**To begin creating a campaign**

1. Open the Amazon Pinpoint console at [https://console.aws.amazon.com/pinpoint/](https://console.aws.amazon.com/pinpoint/).

1. On the **All projects** page, choose the project that you want to create the campaign in.

1. In the navigation pane, choose **Campaigns**.

1. Choose **Create a campaign**.

1. For **Campaign name**, enter a descriptive name for the campaign. Using a descriptive name makes it faster to find or search for the campaign later.

1. For **Campaign type**, choose one of the following options:
   + **Standard campaign** – Sends a message to a segment on a schedule that you define.
   + **A/B test campaign** – Behaves like a standard campaign, but enables you to define different treatments for the campaign's message or schedule. In an A/B test campaign, you create several versions of a message or schedule to compare their performance.

1. Under **Choose a channel for this campaign**, choose the channel that you want to use to send the campaign.
**Note**  
You can only choose a single channel. You can only choose the channels that are enabled for the current project. The **Custom** channel is enabled for all projects by default.

1. If you chose **In-app messaging** in the preceding step, choose a **Prioritization** for the in-app message. The value that you choose determines which message is shown in response to a trigger event.

   If you chose a different message type, proceed to the next step.

1. Choose **Next**.

**Next**  
[Specify the audience for the campaign](campaigns-segment.md)

# Specify the audience for the campaign
<a name="campaigns-segment"></a>

When you create a campaign, you choose a *segment* to send that campaign to. A segment is a group of your customers that share certain attributes. For example, a segment might contain all of your customers who use version 2.0 of your app on an Android device, or all customers who live in the city of Los Angeles. 

**Prerequisite**  
Before you begin, complete [Create a campaign](campaigns-begin.md).

**To specify a segment**

1. On the **Choose a segment** page, choose one of the following options:
   + **Use an existing segment** – Choose this option if you've already created a segment and you're ready to send your campaign to it.
   + **Create a segment** – Choose this option if you haven't created any segments yet, or if you want to create a new segment for this campaign. If you choose this option, create a segment by completing the procedures in [Building segments](segments-building.md).
**Note**  
If you want to send your campaign when certain events occur (as opposed to sending it at a specific time), you must use a dynamic segment (as opposed to an imported segment). To learn more, see [Building segments](segments-building.md).

1. (Optional) Under **Segment hold-out**, specify the percentage of segment members who shouldn't receive this campaign. Amazon Pinpoint chooses the appropriate number of segment members at random, and omits them from the campaign. 

   You can use this feature to perform *hold-out testing*. In a *hold-out test*, you omit a sample group of random recipients, and then compare their behaviors (for example, the number of purchases they make) against the behaviors of the customers who received the campaign. In this way, you can determine the effectiveness of your campaigns. 

**Next**  
[Configure the message](campaigns-message.md)

# Configure the message
<a name="campaigns-message"></a>

After you specify the target segment for the campaign, you can configure the message for the campaign. 

If you created the campaign as a standard campaign, you configure a single message. If you set up the campaign as an A/B test campaign, you define two or more *treatments*. A *treatment* is a variation of your message that the campaign sends to different portions of the segment.

**Prerequisite**  
Before you begin, complete [Specify the audience for the campaign](campaigns-segment.md).

## Set up the campaign
<a name="campaigns-message-channel"></a>

1. If you created this campaign as an A/B test campaign (as opposed to a standard campaign), specify the percentage of segment members who should receive each treatment. An A/B test campaign can include up to five treatments. Choose **Add another treatment** to add additional treatments.

1. On the **Create your message** page, configure the message for the campaign. The message options vary depending on the channel that you chose for the campaign.

   If you're creating an email campaign, see [Configuring an email message](#campaigns-message-email).

   If you're creating an in-app campaign, see [Configuring an in-app message](#campaigns-message-inapp).

   If you're creating an SMS campaign, see [Configuring an SMS message](#campaigns-message-sms).

   If you're creating a push notification campaign, see [Configuring a push notification](#campaigns-message-push).

   If you're creating a campaign that sends messages through a custom channel, see [Configuring a custom channel message](#campaigns-message-custom).

### Configuring an email message
<a name="campaigns-message-email"></a>

**To configure an email message**

1. Choose the priority level for the **Create your message** page, do one of the following:
   + To design and write a new message for the campaign, select **Create a new email message**.
**Note**  
The maximum email message size for **Create a new message** is 200 KB. You can use email templates to send larger email messages.
   + To create a message that's based on an email template:

     1. Select **Choose an existing email template**, and then select **Choose a template**.

     1. Browse for the template that you want to use. When you select a template from the list, Amazon Pinpoint displays a preview of the active version of the template. (The active version is usually the version of a template that's been reviewed and approved for use, depending on your workflow.)

     1. When you find the template that you want, select it, and then select **Choose template**.

     1. Under **Template version**, specify whether you want Amazon Pinpoint to automatically update the message to include any changes that you might make to the template before the message is sent. To learn more about these options, see [Managing versions of message templates](message-templates-versioning.md).

     1. When you finish choosing template options for the message, skip to step 5.

1. For **Subject**, enter the subject line for your email message.

1. For **Message**, enter the email body.
**Tip**  
You can enter the email body by using either HTML or Design view. In HTML view, you can manually enter HTML content for the email body, including features such as formatting and links. In Design view, you can use a rich text editor with a formatting toolbar to apply formatting features such as links. To switch views, choose **HTML** or **Design** from the view selector above the message editor.

1. 
**Note**  
You must set up an email orchestration sending role before you can use email headers. For more information, see [Creating an email orchestration sending role in Amazon Pinpoint](channels-email-orchestration-sending-role.md).

   Under **Headers**, choose **Add new headers**, to add up to 15 headers for the email message. For a list of supported headers, see [Amazon SES header fields](https://docs.aws.amazon.com/ses/latest/dg/header-fields.html) in the [Amazon Simple Email Service Developer Guide](https://docs.aws.amazon.com/ses/latest/dg/Welcome.html).
   + For **Name**, enter the name of the header.
   + For **Value**, enter the value of the header.

   (Optional) To add a One-click unsubscribe link to a promotional email, add the following two headers:

   1. Create a header with `List-Unsubscribe` for **Name** and set **Value** to your unsubscribe link. The link must support HTTP POST requests to process the recipients unsubscribe request.

   1. Create a header with `List-Unsubscribe-Post` for **Name** and set **Value** to `List-Unsubscribe=One-Click`.

1. (Optional) In the field below the message editor, enter the content that you want to display in the body of messages that are sent to recipients whose email applications don't display HTML.

1. If you created this campaign as an A/B test campaign (as opposed to a standard campaign), repeat the steps in this section for each treatment. You can switch between treatments by using the tabs at the top of the **Email details** section.

1. For **Sender email address**, choose the verified email address used to set up the email channel.

1. Choose where you want to send the test message to. This can be an existing segment of up to ten email addresses or endpoint IDs.

1. Choose **Next**.

### Configuring an in-app message
<a name="campaigns-message-inapp"></a>

Use in-app messages to send targeted messages to users of your applications. In-app messages are highly customizable. They can include buttons that open websites or take users to specific parts of your app. You can configure background and text colors, position the text, and add images to the notification. You can send a single message, or create a *carousel* that contains up to five unique messages that your users can scroll through.

When creating an in-app message, you can either choose to create a campaign from an existing template or create a new message.

If you chose to create an A/B testing campaign, you can apply a different template to each treatment. An A/B testing campaign can contain up to five different treatments.

1. On the **Create your message** page, do one of the following:
   + To create a new message for the campaign, select **Create a new in-app message**, and then proceed to step 2.
   + To create a message that's based on an existing in-app template, do the following:

     1. Select **Choose an existing in-app messaging template**, and then select **Choose a template**.

     1. Select the template that you want to use. When you select a template from the list, Amazon Pinpoint displays a preview of the active version of the template. The active version is typically the version of a template that's been reviewed and approved for use.

     1. When you find the template that you want do use, select it, and then select **Choose template**.

     1. Under **Template version**, specify whether you want Amazon Pinpoint to automatically update the message to include changes that are made to the template before the message is sent. To learn more about these options, see [Managing versions of message templates](message-templates-versioning.md).

     1. When you finish choosing template options for the message, proceed to step 11.

1. In the **In-app message details** section, under **Layout**, choose the type of layout for the message. You can choose from the following options:
   + **Top banner** – a message that appears as a banner at the top of the page.
   + **Bottom banner** – a message that appears as a banner at the bottom of the page.
   + **Middle banner** – a message that appears as a banner in the middle of the page.
   + **Full screen** – a message that covers the entire screen.
   + **Modal** – a message that appears in a window in front of the page.
   + **Carousel** – a scrollable layout of up to five unique messages.

1. Under **Header**, configure the title that appears at the beginning of the message. If you created a Carousel message, you must create the first message for the Carousel, which includes the header.

   1. For **Header text** to display in the banner. You can enter up to 64 characters.

   1. For **Header text color**, choose the text color for the header. You can optionally enter RGB values or a hex color code.

   1. For **Header alignment**, choose whether you want the text to be **Left**, **Center**, or **Right** justified.

1. Under **Message**, configure the body of the message.

   1. For **Message**, enter the body text for the message. The message can contain up to 150 characters.

   1. For **Text color**, choose the text color for the message body. You can optionally enter RGB values or a hex color code.

   1. For **Text alignment**, choose whether you want the text to be **Left**, **Center**, or **Right** justified.

1. (Optional) Change the background color of the message. Under **Background **, choose a background color for the message. You can optionally enter RGB values or a hex color code.

1. (Optional) Add an image to the message. Under **Image URL**, enter the URL of the image that you want to appear in the message. Only .jpg and .png files are accepted. The dimensions of the image depend on the message type:
   + For a **Banner**, the image should be 100 pixels by 100 pixels, or a 1:1 aspect ratio.
   + For a **Carousel**, the image should be 300 pixels by 200 pixels, or a 3:2 aspect ratio.
   + For a **Fullscreen** message, the image should be 300 pixels by 200 pixels, or a 3:2 aspect ratio.

1. (Optional) Add a button to the message. Under **Primary button**, do the following:

   1. Choose **Add primary button**.

   1. For **Button text**, enter the text to display on the button. You can enter up to 64 characters.

   1. (Optional) For **Button text color**, choose a color for the button text. You can optionally enter RGB values or a hex color code.

   1. (Optional) For **Background color**, choose a background color for the button. You can optionally enter RGB values or a hex color code.

   1. (Optional) For **Border radius**, enter a radius value. Lower values result in sharper corners, while higher numbers result in more rounded corners. 

   1. Under **Actions**, choose the event that occurs when the user taps the button:
      + **Close** – Dismisses the message.
      + **Go to URL** – Opens a website.
      + **Go to deep link** – Opens an app or opens a particular place in an app. 

      If you want the button behavior to be different for different device types, you can override the default action. Under **Action**, use the tabs to choose the device type that you want to modify the button behavior for. For example, choose **iOS** to modify the button behavior for iOS devices. Next, choose **Override the default actions**. Finally, specify an action.

1. (Optional) Add a secondary button to the message. Under **Secondary button**, choose **Add secondary button**. Follow the procedures in the preceding step to configure the secondary button.

1. (Optional) Add custom data to the message. Custom data are key-value pairs delivered with your message. For example, you might want to pass a promotional code along with your message. If you're sending a carousel message, you can add custom data to each of the carousel messages. To add custom data, do the following:

   1. Under **Custom data**, choose **Add new item**.

   1. Enter a **Key**. For example, this might be *PromoCode*. 

   1. Enter a **Value** for the key. Your *PromoCode* might be *12345*.

   1. When the message is sent, the code *12345* is included in your message.

   1. To add more key-value pairs, choose **Add new item**. You can add up to 10 key-value pairs to the message. When you finish adding custom data, proceed to the next step.

1. If your message is a carousel, you can add up to four more unique messages. To add messages to a carousel, expand the **Carousel overview** section. Next, choose **Add new message**. Repeat the preceding steps to configure the message.

   As you add messages to the carousel, the **Preview** page updates by displaying icons at the bottom of the page showing the number of messages included in the carousel.

   The following image shows a carousel with two messages:  
![\[\]](http://docs.aws.amazon.com/pinpoint/latest/userguide/images/channels-inapp-carousel.png)

1. (Optional) If you created this campaign as an A/B test campaign (as opposed to a standard campaign), repeat the steps in this section for each treatment. You can switch between treatments by using the tabs at the top of the **In-app messaging template** section.

1. Choose **Next**.

### Configuring an SMS message
<a name="campaigns-message-sms"></a>

**Important**  
If you send SMS messages to recipients in India using a Sender ID, you must complete additional steps. For more information, see [India sender ID registration process](https://docs.aws.amazon.com//sms-voice/latest/userguide/registrations-sms-senderid-india.html) in the *AWS End User Messaging SMS User Guide*.

**To configure an SMS message**

1. On the **Create your message** page, do one of the following:
   + To design and write a new message for the campaign, select **Create a new SMS message**, and then proceed to step 2.
   + To create a message that's based on an SMS template, do the following:

     1. Select **Choose an existing SMS template**, and then select **Choose a template**.

     1. Select the template that you want to use. When you select a template from the list, Amazon Pinpoint displays a preview of the active version of the template. The active version is typically the version of a template that's been reviewed and approved for use.

     1. When you find the template that you want, select it, and then select **Choose template**.

     1. Under **Template version**, specify whether you want Amazon Pinpoint to automatically update the message to include changes that are made to the template before the message is sent. To learn more about these options, see [Managing versions of message templates](message-templates-versioning.md).

     1. When you finish choosing template options for the message, proceed to step 6.

1. In the **SMS settings** section, for **Message type**, choose one of the following:
   + **Promotional** – Non-critical messages, such as marketing messages.
   + **Transactional** – Critical messages that support customer transactions, such as one-time passwords for multi-factor authentication.
**Note**  
This campaign-level setting overrides your default message type, which you set on the SMS settings page.

1. (Optional) For the **Origination phone number**, select a phone number to send the message from. This list contains all of the dedicated phone numbers that are associated with your account. If your account contains multiple dedicated phone numbers, and you don't choose an origination number, Amazon Pinpoint looks for a short code in your account; if it finds one, it uses that short code to send the message. If a short code isn't found in your account, then it looks for a 10DLC number (US recipients only), and then a toll-free number (US recipients only), and then a long code.

1. (Optional) For **Sender ID**, enter the alphanumeric Sender ID that you want to use to send this message.
**Important**  
Sender IDs are only supported in certain countries. In some countries, you must register your Sender ID with government or regulatory entities before you can use it. Only specify a Sender ID if you know that Sender IDs are supported in the countries of your recipients. For more information about Sender ID availability and requirements, see [Supported countries and regions (SMS channel)](https://docs.aws.amazon.com//sms-voice/latest/userguide/phone-numbers-sms-by-country.html) in the *AWS End User Messaging SMS User Guide*.

1. For **Message**, enter the body of the message.
**Tip**  
SMS messages can contain a limited number of characters. Long messages are split into multiple message parts, and you're charged separately for each of those parts. The maximum number of characters that you can include depends on the characters that you use in your messages. For more information, see [SMS character limits](https://docs.aws.amazon.com//sms-voice/latest/userguide/sms-limitations-character.html) in the *AWS End User Messaging SMS User Guide*.

1. (Optional) If you created this campaign as an A/B test campaign (as opposed to a standard campaign), repeat the steps in this section for each treatment. You can switch between treatments by using the tabs at the top of the **SMS details** section.

1. Choose **Next**.

### Configuring a push notification
<a name="campaigns-message-push"></a>

**To configure a push notification**

1. On the **Create your message** page, do one of the following:
   + To design and write a new message for the campaign, select **Create a new push notification**.
   + To create a message that's based on a push notification template: 

     1. Select **Choose an existing push notification template**, and then select **Choose a template**.

     1. Browse for the template that you want to use. When you select a template from the list, Amazon Pinpoint displays a preview of the active version of the template. (The active version is typically the version of a template that's been reviewed and approved for use, depending on your workflow.)

     1. When you find the template that you want, select it, and then select **Choose template**.

     1. Under **Template version**, specify whether you want Amazon Pinpoint to automatically update the message to include any changes that you might make to the template before the message is sent. To learn more about these options, see [Managing versions of message templates](message-templates-versioning.md).

     1. If you created this campaign as an A/B test campaign (as opposed to a standard campaign), repeat the steps in this section for each treatment. You can switch between treatments by using the tabs at the top of the **Push notification details** section.

     1. When you finish, choose **Next**.

1. For **Notification type**, specify the type of message that you want to send:
   + **Standard notification** – A push notification that has a title, a message body, and other content and settings. Recipients are alerted by their mobile devices when they receive the message.
   + **Silent notification** – A custom JSON attribute-value pair that Amazon Pinpoint sends to your app without producing notifications on recipients' devices. Use [silent notifications](https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-campaigns-campaign-id.html) to send data that your app is designed to receive and handle. For example, you can use silent notifications to update the app's configuration or to show messages in an in-app message center.
   + **Raw message** – A push notification that specifies all of a notification's content and settings as a JSON object. Use raw messages for cases such as sending custom data to an app for processing by that app, instead of the push notification service.

     If you choose the **Raw message** option, the message editor displays an outline of the code to use for the message. In the message editor, enter the content and settings that you want to use for each push notification service, including any optional settings—such as images, sounds, and actions—that you want to specify. For more information, see the documentation for the push notification services that you use. After you enter all the raw message content, repeat this step for each treatment, if you created this campaign as an A/B test campaign. When you finish, choose **Next**.

#### To create a standard notification
<a name="campaigns-message-push-standard"></a>

**To create a standard notification**

1. For **Title**, enter the title that you want to display above the message.

1. For **Body**, enter the message body. Your push notification can have up to 200 characters. A character counter below the field counts down from 200 as you add characters to the message.

1. For **Action**, select the action that you want to occur when a recipient taps the notification:
   + **Open your app** – Your app launches, or it becomes the foreground app if it was sent to the background.
   + **Go to a URL** – The default mobile browser on the recipient's device launches and opens a webpage at the URL that you specify. For example, this action can be useful for sending users to a blog post.
   + **Open a deep link** – Your app opens to a specific page or component in the app. For example, this action can be useful to direct users to special promotions for in-app purchases.

1. (Optional) Under **Media URLs**, enter the URLs for any media files that you want to display in the push notification. The URLs must be publicly accessible so that the push notification services for Android or iOS can retrieve the images.

1. If you created this campaign as an A/B test campaign (as opposed to a standard campaign), repeat the steps in this section for each treatment. You can switch between treatments by using the tabs at the top of the **Push notification details** section.

1. Choose **Next**.

#### To create a silent notification
<a name="campaigns-message-push-silent"></a>

**To create a silent notification**

1. For **Message**, enter the content of the message in JSON format. The exact content of the message varies depending on the notification service that you use and the values that your app expects to receive.

1. If you created this campaign as an A/B test campaign (as opposed to a standard campaign), repeat the steps in this section for each treatment. You can switch between treatments by using the tabs at the top of the **Push notification details** section.

1. Choose **Next**.



### Configuring a custom channel message
<a name="campaigns-message-custom"></a>

This section contains information about configuring a campaign to send messages by using a custom channel. You can use custom channels to send messages to your customers through any service that has an API or webhook functionality, including third-party services. 

#### Sending a custom message using a Lambda function
<a name="campaigns-message-custom-lambda"></a>

To send messages through a service that has an API, you must create an AWS Lambda function that calls the API. For more information about creating these functions, see [Creating custom channels](https://docs.aws.amazon.com/pinpoint/latest/developerguide/channels-custom.html) in the *Amazon Pinpoint Developer Guide*.

**To configure a custom channel that uses a Lambda function to call an API**

1. On the **Create your message** page, for **Choose your custom message channel type**, choose **Lambda function**.

1. For **Lambda function**, choose the name of the Lambda function that you want to execute when the campaign runs.

1. For **Endpoint options**, choose the endpoint types that you want Amazon Pinpoint to send to the Lambda function or webhook that's associated with the custom channel.

    For example, if the segment you chose for this campaign contains several endpoint types, but you only want to send the campaign to endpoints that have the Custom endpoint type attribute, choose **Custom**. You aren't required to choose the Custom endpoint type. For example, you could choose to only send the custom channel campaign to endpoints with the Email endpoint type attribute.

1. Choose **Next**.

#### Sending a custom message using a webhook
<a name="campaigns-message-custom-webhook"></a>

You can also create custom channels that send information about your segment members to services that use webhooks.

**To configure a custom channel that uses webhooks**

1. On the **Create your message** page, for **Choose your custom message channel type**, choose **URL**.

1. For **Enter your custom message channel URL**, enter the URL of the webhook.

   The URL that you specify has to begin with "https://." It can only contain alphanumeric characters, plus the following symbols: hyphen (-), period (.), underscore (\$1), tilde (\$1), question mark (?), slash or solidus (/), pound or hash sign (\$1), and semicolon (;). The URL must comply with [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986).

1. For **Endpoint options**, choose the endpoint types that you want Amazon Pinpoint to send to the Lambda function. For example, if the segment that you chose for this campaign contains several endpoint types, but you only want to send the campaign to endpoints that have the "Custom" endpoint type attribute, choose **Custom**.

1. Choose **Next**.

## Use message variables
<a name="campaigns-message-variables"></a>

To create a message that's personalized for each recipient, use *message variables*. *Message variables* refer to specific user attributes. These attributes can include characteristics that you create and store for users, such as the user's name, city, device, or operating system. When Amazon Pinpoint sends the message, it replaces the variables with the corresponding attribute values for the recipient. For information about the attributes that you can use, see [Endpoint properties](https://docs.aws.amazon.com/pinpoint/latest/apireference/apps-application-id-endpoints-endpoint-id.html#apps-application-id-endpoints-endpoint-id-properties) in the *Amazon Pinpoint API Reference*.

To include a variable in your message, add the name of an existing attribute to the message. Enclose the name in two sets of curly braces (\$1\$1), and use the exact capitalization of the name—for example, `{{Demographic.AppVersion}}`.

Often, the most useful attributes for message variables are custom attributes that you create and store for users. By using custom attributes and variables, you can send personalized messages that are unique for each recipient.

For example, if your app is a fitness app for runners and it includes custom attributes for each user's first name, preferred activity, and personal record, you could use variables in the following message:

`Hey {{User.UserAttributes.FirstName}}, congratulations on your new {{User.UserAttributes.Activity}} record of {{User.UserAttributes.PersonalRecord}}!`

When Amazon Pinpoint sends this message, the content varies for each recipient after the variables are replaced. Possible final messages are:

`Hi Jane Doe, congratulations on your new half marathon record of 1:42:17!`

Or:

`Hi John Doe, congratulations on your new 5K record of 20:52!`

## Test the message
<a name="campaigns-message-test"></a>

Amazon Pinpoint can display a preview of an email message that you can view before you schedule the message to be sent. For email and other types of messages, you can also send a test message to a small group of recipients for testing purposes. You can send test messages in the following channels —email, push notification, in-app notification, or SMS.

### Previewing an email message without sending it
<a name="campaigns-message-test-preview"></a>

The Design view in the Amazon Pinpoint message editor shows a preview of an email message as it would appear if it was rendered by your web browser.

If you're working in HTML view, instead of Design view, you can display a preview of an email message next to the HTML content of the message. This feature is helpful when you want to verify that a message renders as you expect, before you send a test. 

Note that this preview only shows how the message would appear if it was rendered by your web browser. As a best practice, you should still send test emails to several recipients and view those test messages by using a variety of devices and email clients.

**To preview an email**

1. In the area above the HTML view of the message editor, choose **No preview**, and then choose **Preview**. Amazon Pinpoint displays a preview pane next to the HTML editor.

1. (Optional) To display the HTML content and the preview in a larger window, choose **Fullscreen** in the area above the message editor.

### Sending a test message
<a name="campaigns-message-test-send"></a>

It's often helpful to send a test message to actual recipients to make sure that your message appears correctly when your customers receive it. By sending a test version of a message, you can test incremental improvements to the content and appearance of your message without impacting the status of your campaign.

When you send test messages, consider the following factors:
+ You're charged for sending test messages as if they were regular campaign messages. For example, if you send 10,000 test emails in a month, you're charged \$11.00 (USD) for sending the test emails. For more information about pricing, see [Amazon Pinpoint pricing](https://aws.amazon.com/pinpoint/pricing/).
+ Test messages count toward your account's sending quotas. For example, if your account is authorized to send 10,000 emails per 24-hour period, and you send 100 test emails, you can send up to 9,900 additional emails in the same 24-hour period.
+ When you send a test message to specific users, you can specify up to 10 addresses. Use commas to separate multiple addresses.
**Note**  
The word "address" (as it's used in this section) can refer to any of the following: an email address, a mobile phone number, an endpoint ID, or a device token.
+ When you send a test SMS message to specific phone numbers, the numbers must be listed in E.164 format. That is, they must include a plus sign (\$1), the country code without a leading zero, and the complete subscriber number, including area code—for example, \$112065550142. E.164-formatted numbers shouldn't contain parentheses, periods, hyphens, or any symbols other than the plus sign. E.164 phone numbers can have a maximum of 15 digits.
+ When you send a test push notification, the addresses must be either endpoint IDs or device tokens.
+ When you send a test in-app notification, the test message is only active for 30 minutes after you send it. Also, if you send multiple test messages to the same endpoint, the new message overrides all previous messages. Finally, when you remove an endpoint from a test message, the message is no longer available for that endpoint.
+ When you send a test message to a segment, you can only choose one segment. Additionally, you can only choose segments that contain 100 endpoints or fewer.
+ When you send a test message to a segment, Amazon Pinpoint creates a campaign for that test. The name of the campaign contains the word "test", followed by four random alphanumeric characters, followed by the name of the campaign. These campaigns aren't counted toward the maximum number of active campaigns that your account can contain. Amazon Pinpoint doesn't create a new campaign when you send a test message to specific recipients.
+ Events that are associated with test messages are counted in the metrics for the parent campaign. For example, the **Endpoint deliveries** chart on the **Campaigns** analytics page includes the number of test messages that were successfully delivered.

There are two ways to send a test message. You can send it to an existing segment or you can send it to a list of addresses that you specify. The method that you should choose depends on your use case. For example, if you have a regular group of people who test your messages, you might find it helpful to create a segment that contains all of their endpoints. If you need to send test messages to a group of testers that changes regularly, or to a dynamically generated address, you might want to specify your recipients manually.

**To send a test message to a segment**

1. Under the message editor, choose **Send a test message**.

1. In the **Send a test message** dialog box, under **Send a test message to**, choose **A segment**.

1. Use the dropdown list to choose the segment that you want to send the test message to.
**Note**  
Amazon Pinpoint automatically excludes all segments that contain 100 endpoints or more from this list.

1. Choose **Send message**.

**To send a test message to specific recipients**

1. Under the message editor, choose **Send a test message**.

1. In the **Send a test message** dialog box, under **Send a test message to**, choose one of the options in the following table.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/pinpoint/latest/userguide/campaigns-message.html)

1. Choose **Send message**.

**Next**  
[Schedule the campaign](campaigns-schedule.md)

# Schedule the campaign
<a name="campaigns-schedule"></a>

After you write your message, you can specify when the campaign should be sent. You can choose to send the campaign immediately, at a scheduled date and time, on a recurring basis, or when certain events occur.

**Tip**  
If a campaign is running, it will complete and then pause. Pause only pauses or skips the next run for a recurring future scheduled campaign. A campaign scheduled to be sent immediately can't be paused.

When you create a campaign, you choose a *segment* to send that campaign to. A segment is a group of your customers that share certain attributes. For example, a segment might contain all of your customers who use version 2.0 of your app on an Android device, or all customers who live in the city of Los Angeles. 

**Topics**
+ [Scheduling an email, SMS, voice message, push, or custom campaign](#campaigns-schedule-no-inapp)
+ [Scheduling an in-app campaign](#campaigns-schedule-inapp)

**Prerequisite**  
Before you begin, complete [Configure the message](campaigns-message.md).

## Scheduling an email, SMS, voice message, push, or custom campaign
<a name="campaigns-schedule-no-inapp"></a>

**Topics**
+ [Sending the campaign immediately](#campaigns-schedule-immediate)
+ [Sending the campaign at a specific date and time](#campaigns-schedule-once)
+ [Sending the campaign on a recurring basis](#campaigns-schedule-recurring)
+ [Sending the campaign when events occur](#campaigns-event-triggered)
+ [Best practices for using event-based campaigns](#campaigns-event-triggered-best-practices)

If you want to send the campaign as soon as you finish creating it, you can choose to send the campaign immediately.

### Sending the campaign immediately
<a name="campaigns-schedule-immediate"></a>

If you want to send the campaign as soon as you finish creating it, you can choose to send the campaign immediately. You can't pause a campaign that's set to run immediately.

**To send the campaign immediately**

1. Under **When should the campaign be sent**, choose **At a specific time**.

1. Under **How often should the campaign be sent**, choose **Immediately**.

1. Choose **Next** to continue to the final step.

### Sending the campaign at a specific date and time
<a name="campaigns-schedule-once"></a>

If you want to send a campaign only once, you can schedule it to be sent at a specific date and time.

**To send the campaign at a specific date and time**

1. Under **When should the campaign be sent**, choose **At a specific time**.

1. Under **How often should the campaign be sent**, choose **Once**. 

1. For **Start date and time**, choose the date and time when Amazon Pinpoint should send the message.

1. Under **Time zone**, choose the time zone that you want to use to schedule the campaign. Optionally, choose **Use recipient's local time** to base the delivery time on each recipient's local time zone.

1. Choose **Next** to continue to the final step.

### Sending the campaign on a recurring basis
<a name="campaigns-schedule-recurring"></a>

You can also schedule the campaign to be sent on a recurring basis. You can specify the frequency and the start and end dates for the campaign.

**To send the campaign on a recurring basis**

1. Under **When should the campaign be sent**, choose **At a specific time**.

1. Under **How often should the campaign be sent**, choose how often Amazon Pinpoint should send the recurring campaign. For example, to send the campaign once per week, choose **Weekly**.

1. For **Start date and time**, choose the date and time when Amazon Pinpoint should send the first message in the recurring series.

1. For **End date and time**, choose the date and time when Amazon Pinpoint should stop sending recurring messages.

1. Under **Time zone**, choose a time zone to base the start and end times on. Optionally, choose **Use recipient's local time** to base the delivery time on each recipient's local time zone.

1. Choose **Next** to continue to the final step.

### Sending the campaign when events occur
<a name="campaigns-event-triggered"></a>

If you want to send the campaign when customers take certain actions, you can configure the campaign to be sent when a specific event occurs. For example, campaigns can be sent when a customer registers a new account, or when a customer adds an item to their shopping cart but doesn't purchase it. To learn more about sending events from your apps to Amazon Pinpoint, see [Reporting events in your application](https://docs.aws.amazon.com/pinpoint/latest/developerguide/integrate-events.html) in the *Amazon Pinpoint Developer Guide*.

**Note**  
You can send event-based messages only if your campaign uses dynamic segments (as opposed to imported segments). In addition, if you integrate your app with Amazon Pinpoint by using an AWS Mobile SDK, messages from event-based campaigns are sent only to customers whose apps are running AWS Mobile SDK for Android version 2.7.2 or later, or AWS Mobile SDK for iOS version 2.6.30 or later.

**To configure a campaign to be sent when an event occurs**

1. Under **When should the campaign be sent**, choose **When an event occurs**.

1. For **Events**, choose the name of the event that initiates the campaign.

1. (Optional) For **Attributes** and **Metrics**, choose the specific characteristics that initiate the campaign.
**Tip**  
The more event data that you capture from your users, the more options you have when you set up event triggers. Event attributes and metrics are available only if you've provided those values to Amazon Pinpoint. To learn more about capturing event data, see [Reporting events in your application](https://docs.aws.amazon.com/pinpoint/latest/developerguide/integrate-events.html) in the *Amazon Pinpoint Developer Guide*.

1. Under **Campaign Dates**, for **Start date and time**, choose a start date. Amazon Pinpoint sends the campaign only if the event that you specified earlier occurs after the start date.
**Note**  
The **Start date and time** that you choose must be at least 15 minutes in the future.

1. For **End date and time**, choose an end date. Amazon Pinpoint sends the campaign only if the event that you specified earlier occurs before the end date.

1. Under **Time zone**, choose a time zone to base the start and end dates on.

1. Choose **Next** to continue to the final step.

### Best practices for using event-based campaigns
<a name="campaigns-event-triggered-best-practices"></a>

There are a few restrictions and best practices that you should consider when you create event-based campaigns:
+ You can create an event-based campaign only if you chose a dynamic segment (as opposed to an imported segment) in [Step 2](campaigns-segment.md).
+ If you integrate your app with Amazon Pinpoint by using an AWS Mobile SDK, your app should use the following versions of the SDK in order to work properly with event-based campaigns: 
  + AWS Mobile SDK for Android version 2.7.2 or later
  + AWS Mobile SDK for iOS version 2.6.30 or later

  Because of this restriction, we recommend that you set up your segments to include only customers who use a version of your app that runs a compatible version of the SDK.
+ Choose your events carefully. For example, if you send an event-based campaign every time a `session.start` event occurs, you might quickly overwhelm your users with messages. You can limit the number of messages that Amazon Pinpoint sends to a single endpoint in a 24-hour period. For more information, see [Editing a project's default settings](projects-manage-edit.md).

 

## Scheduling an in-app campaign
<a name="campaigns-schedule-inapp"></a>

This section contains information about setting up the parameters of your in-app message using the Amazon Pinpoint console. These parameters include setting up the following:
+ **Trigger event** – A trigger event is an action that a customer performs that makes your in-app message display. Trigger events might include opening an app, making a purchase, or opening a menu. With trigger events, you can see what users are doing within apps, and use that information to improve the apps.
+ **Conversion event** – Conversion events help you get your website visitors to become customers, and can help you keep current customers. Use conversion events alone, or use them with trigger events. After you add conversion events, you can view their performance on the [campaign analytics](analytics-campaigns.md) page of the Amazon Pinpoint console. A conversion is recorded for analytics when a user views your in-app message and performs the action set by the conversion event.

**Topics**
+ [Define triggers and set campaign start and end dates](#campaigns-inapp-trigger)
+ [(Optional) Change campaign global settings](#campaigns-inapp-settings)

### Define triggers and set campaign start and end dates
<a name="campaigns-inapp-trigger"></a>

**To set a trigger event**

1. Add the **Trigger event ** that initiates the campaign. You can manually enter a trigger event name, or choose an existing trigger from the dropdown list. For example, to show a message to a user who purchases something from your online store, enter *Purchase*.

   At this point, you don't need to enter any additional information, such as attributes or conversions. The *Purchase* trigger event displays your in-app campaign message to anyone who makes an online purchase.

1. (Optional) Add event attributes. An event attribute is used to refine a trigger. It consists of an attribute name and a value. For example, to narrow down the *Purchase* trigger event, you can add an attribute that displays the in-app message to customers who purchase a specific item. Imagine that the item is a pair of gardening gloves that cost \$110 USD or more. For **Attribute**, choose *item*, and then for **Value**, choose *gardening gloves*. (You set the event **Metric** for the cost in Step 3.)

   To further narrow down who gets your in-app message, choose **Add new attribute** and add additional attributes and values. If an attribute has multiple possible values, you must add each attribute and value pair separately. 

   When you use the same attribute multiple times with different values, Amazon Pinpoint processes the campaign attributes using "or" between the values. 

1. (Optional) Choose an event **Metric**. This event typically uses a range of numbers, such as a duration or a cost. After entering the event, choose one of the following **Operator** options:
   + **is equal to**
   + **is greater than**
   + **is less than**
   + **is greater than or equal to**
   + **is less than or equal to**

   Enter the **Value** for the operator. Only numeric values are supported. For example, enter the following values for the *Purchase* trigger. For **Metric**, choose *Price*, and for the **Operator**, choose **is greater than or equal to**. For the value, choose *10*. The in-app message now displays to any user that purchases gardening gloves at \$110 USD or more. 
**Note**  
You can use only a single metric in an in-app message.

1. Under **Campaign Dates**, for **Start date and time**, choose a start date. Amazon Pinpoint sends the campaign only if the event that you previously specified occurs after the start date.
**Note**  
The **Start date and time** that you choose must be set 15 minutes or more in the future.

1. For **End date and time**, choose an end date. Amazon Pinpoint sends the campaign only if the event that you previously specified occurs before the end date.

1. Under **Time zone**, choose a time zone to base the start and end dates on.

### (Optional) Change campaign global settings
<a name="campaigns-inapp-settings"></a>

Campaign global settings determine how often a message is displayed to a user. Customers might not want to see the same in-app message every time they initiate a trigger event. Alternatively, you might want to set the number of times that a customer sees your in-app message.

**To change global settings for the campaign**

1. For **Maximum number of session messages viewed per endpoint**, specify the number of times a customer should see your in-app message during a session. A session is defined as the period of time when a customer interacts with your application. Set a level from *0* to *10*, with *0* displaying the message during an unlimited number of sessions. For example, if you enter a value of *2*, then your customer sees your in-app message during two separate sessions only. If your customer interacts with your app for a third session, the in-app message is not displayed. 

1. For **Maximum number of daily messages viewed per endpoint**, choose **Override default setting**. Then, set the number of times during a day that a customer sees your message. Set a level from *0* to *10*, with *0* displaying the message an unlimited number of times during the day. For example, if you enter a value of *2*, then your customer sees your in-app message only twice during a 24-hour period.

1. For **Maximum number of session messages viewed per endpoint**, choose **Override default setting**. Then, set the number of in-app messages a customer can see. If you send out multiple in-app messages, you might want to restrict the number of messages that an endpoint displays. Set a level from *0* to *10*, with *0* displaying an unlimited number of messages. For example, if you enter a value of *2*, then your customers only see two in-app messages, regardless of how many you send out. 

**Next**  
[Review and launch the campaign](campaigns-review.md)

# Review and launch the campaign
<a name="campaigns-review"></a>

At this point, you're almost ready to send the campaign to your audience segment. Before you launch the campaign, you should review your settings and make changes if needed.

**Prerequisite**  
Before you begin, complete [Schedule the campaign](campaigns-schedule.md).

**To review and launch a campaign**

1. On the **Review and launch** page, review the settings for the campaign. If you need to make changes, use the navigation section on the left side of the window to go directly to the page that contains the content that you want to edit.

1. If all of the settings are correct, choose **Launch campaign**.

# Managing campaigns
<a name="campaigns-managing"></a>

In the Amazon Pinpoint console, you can update the settings for a campaign, delete a campaign, or copy an existing campaign to a new campaign.

**Note**  
Because 10DLC campaigns exist outside of a specific project, information about these campaigns can be found on the **10DLC campaigns** tab on the **SMS and voice** page of the Amazon Pinpoint console.

**To manage a campaign**

1. Sign in to the AWS Management Console and open the Amazon Pinpoint console at [https://console.aws.amazon.com/pinpoint/](https://console.aws.amazon.com/pinpoint/).

1. On the **All projects** page, choose the project for which you want to manage campaigns.

1. In the navigation pane, choose **Campaigns**.

1. On the **Campaigns** page, choose the campaign that you want to manage. Then, on the **Actions** menu, select the action that you want to take, as shown in the following image.  
![\[The Actions menu shows the following options: View details, View analytics, Change settings, Duplicate, and Delete.\]](http://docs.aws.amazon.com/pinpoint/latest/userguide/images/campaigns_actions_menu.png)

   On the **Actions** menu, you can do the following:
   + **View details** – Shows the details page for the selected campaign. On this page, you can see information about the campaign, such as the campaign type, the status of the campaign, and the number of endpoints targeted by the campaign.
   + **View analytics** – Shows the analytics page for the selected campaign. For more information about campaign analytics, see [Campaign charts](analytics-campaigns.md).
   + **Change settings** – Change the settings for the campaign, including the target segment, the message content, and the delivery time. You can choose this option only for campaigns that haven't been sent yet.
   + **Duplicate** – Copy the campaign to use its settings as a template for a new campaign, in which you can change or keep any of the original settings.
   + **Delete** – Remove the campaign from Amazon Pinpoint and stop sending messages through the campaign.

# Troubleshooting campaigns
<a name="campaigns-troubleshooting"></a>

Verify that logging is turned on to assist in identifying the cause of failure. For more information, see [Monitoring and logging](troubleshooting.md#troubleshooting-logging) and [Campaign events](https://docs.aws.amazon.com/pinpoint/latest/developerguide/event-streams-data-campaign.html).

## Some endpoints were not processed or targeted successfully by the campaign
<a name="troubleshooting-campaign-endpoints"></a>

 **Endpoints targeted**: The total number of endpoints that will be targeted when the campaign runs for the chosen channel. This total excludes duplicate or inactive endpoints from the segment.

**Endpoints processed**: The total number of endpoints that were successfully targeted by the campaign run.

For **dynamic segments**, the endpoint count can change over time based on the criteria defined for the audience therefore the number of endpoints per channel is only an estimate. You may export the segment to get the total number of endpoints at any given time.
+ Throttling based on delivery channel constraints
+ If you schedule the campaign to use recipient's local time (isLocalTime is set to true)
+ If the campaign does not have sufficient time configured to process all endpoints
+ Downstream delivery issues or rendering issues
+ Permanent failure

### Throttling
<a name="troubleshooting-campaign-throttling"></a>
+ Review the Amazon CloudWatch metric `CampaignSendMessageThrottled` during the time frame that the campaign ran to confirm whether this is the issue. For more information, see [View Amazon Pinpoint metrics in CloudWatch](monitoring-view-metrics.md).
+ Throttling occurs when the endpoint delivery rate capability is exceeded. For more information, see Amazon Pinpoint [quotas](https://docs.aws.amazon.com/pinpoint/latest/developerguide/quotas.html).

### Using recipients timezone
<a name="troubleshooting-campaign-time"></a>

When a campaign is scheduled to use a recipients’ local time ([isLocalTime](https://docs.aws.amazon.com//pinpoint/latest/apireference/apps-application-id-campaigns.html) set to true) for the Campaign, all endpoints must have a `Demographic.Timezone` attribute value formatted correctly in the endpoint definition, else the endpoint will not be targetedsuccessfully. This is because the [isLocalTime](https://docs.aws.amazon.com//pinpoint/latest/apireference/apps-application-id-campaigns.html) option bases the delivery time on each recipient's local time zone.

### Processing time
<a name="troubleshooting-campaign-processing-time"></a>
+ When a campaign doesn't have sufficient time to process all targeted endpoints, the endpoints aren't processed and logs show a `campaign_send_status` of [https://docs.aws.amazon.com/pinpoint/latest/developerguide/event-streams-data-campaign.html#event-streams-data-campaign-attributes-attrs](https://docs.aws.amazon.com/pinpoint/latest/developerguide/event-streams-data-campaign.html#event-streams-data-campaign-attributes-attrs).
+ Based on the number of endpoints being targeted by your campaign, verify that the **Maximum amount of time for a campaign run** and **Maximum number of messages per second** is configured based on your use case and delivery channel. For more information, see [Editing a project's default settings](projects-manage-edit.md).

### Delivery, render or permanent failure
<a name="troubleshooting-campaign-other"></a>
+ Delivery issues can occur when reaching the different endpoint types. Verify that logging is enabled to assist in identifying the cause of the failure. To troubleshoot downstream delivery issues further, see the delivery issues associated with the corresponding endpoint type [Troubleshooting the email channel](channels-email-troubleshooting.md), [Troubleshooting the SMS channel](channels-sms-troubleshooting.md), [Troubleshooting the voice channel](channels-voice-troubleshooting.md), and [Troubleshooting the push channel](channels-push-troubleshooting.md).
+ Rendering issues occur for the following reasons: when a message template is used and template data is missing, template data is incorrectly formatted, or there's a mismatch between the template parameters and endpoint data. For more information, see the email section under delivery issues. 
+ Permanent failures occur when the endpoint address might not be reached by Amazon Pinpoint. The reason for the permanent error is displayed in the logs. Permanent failures are not retried. Examples of permanent failures can include invalid address, such as an email address or a phone number, as well as permission issues, account in a sandbox, or insufficient quota.