Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated Apr 18, 2024

Create an in-app messaging campaign on AWS Console

As an alternative to writing AWS Cloud Development Kit (CDK) code, you can use the AWS 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. Learn how to create a campaign using Amazon Pinpoint to continue integrating in-app messages in your app with Amplify.

  1. Login to the AWS Console, and Search for Pinpoint.

  2. Click on your project from the list of available project. Your project name would be the name you provided when you created the pinpoint project using CDK.

  3. Click on Campaigns from the left navigation menu, and then click on Create a campaign

    A screenshot of the pinpoint campaign page on the AWS console highlighting the 'Campaigns' option on the left navigation menu and the 'Create a campaign' button on the main page

  4. Add a name to your campaign, and keep the following options as follows and then click Next:

    1. Campaign type: Standard campaign
    2. Channel: In-App messaging
    3. set prioritization: Fairly important
  5. Click on the Create a segment radio button, add a name for your segment, and then click Next.

    1. You can add as many segments as needed to the campaign. For this quickstart, you can use Include any audiences under the Segment group 1 section.
    2. You can add a criteria to your segments to ensure that audiences that satisfy that criteria can receive the in-app message.
    3. If you see an error message titled Segment might include multiple channels, click I understand to proceed.

    A screenshot of the pinpoint page displaying a selected 'Create a segment' option on the 'Create a campaign' page. The page shows a input box called 'Name' with 'All my users' as an input. The page also displayed a 'Segment details' section with a radio button selected on 'Include any audiences'

  6. Click on the Create a new in-app message radio button.

  7. You have the ability to customize the following attributes of the in-app message:

    • Layout: Which includes all of the different messaging layout options.
    • Header: Title of the in-app message, including the text color/alignment.
    • Message: The body of the Message, including the text color/alignment.
    • Background: Control the background color of the in-app message.
    • Image URL: Add an image to be displayed as part of the in-app message body.
    • Primary button: Allows the addition of a button to add functionality to the in-app message.
    • Secondary button: Allows the addition of an extra button for additional functionality.
    • Custom Data: Allows the in-app message to pass additional data to the frontend app once it is triggered by an event.

For this tutorial you can create a simple message as shown below. Customers in your application will see the same message once the event is triggered.

A screenshot of the 'In-app message details' page providing layout options, header, message and a sample phone display on the right side of the page. The page allows customizing the your applications in-app message displayed on various device displays

  1. Once you have finished customizing your in-app message, click on Next.
  2. Under Trigger events, add the name of the analytics trigger that will be sent from your frontend app.
    • You have the ability to customize the trigger to allow only certain attributes or metrics that are passed with the analytics event to trigger the in-app message. (Optional)

A screenshot of Campaign setup page, titled 'Choose when to send the campaign'. The page shows options such as trigger events, attributes, metrics, campaign dates and time zone. The options allow configuring a trigger event and when the campaign should start and end in a time zone

  1. By default, the number of messages shown per session is 1. You can update this threshold during campaign setup.

A screenshot of the optional 'Edit campaign settings' page providing configuration options 'Maximum number of session messages viewed per endpoint', 'Maximum number of daily messages viewed per endpoint' and 'Maximum number of messages viewed per endpoint'. The 'Maximum number of session messages viewed per endpoint' is the maximum number of messages that can be viewed per session for this campaign which is set to 1 by default and can be increased on a campaign creation

  1. Review your campaign, and then click on Launch campaign.

Your campaign is now setup, and you are ready to start integrating the In-App Messaging functionality into your app.

Note: Campaign start time must be at least 15 minutes in future. In-app messages can only be synced to local device once the campaign becomes active (status should be "In Progress" in the campaigns screen of the Pinpoint console).