# Send inbox messages

You can send inbox messages as a part of a campaign or broadcast workflow.

## Set up a message[](#set-up-a-message)

Before you try to send an inbox message, make sure you’ve [set up your inbox](/journeys/inbox-setup/).

When you set up a message, you’re essentially determining the *id* or *name* of the message you want to send. You’ll use one of these values to send and populate your message when you’re ready to send it.

1.  In your campaign or broadcast workflow, drag an **Inbox message** block into your workflow.
    
    [![The inbox message block in the campaign editor](https://docs.customer.io/images/inbox-message-campaign-block.png)](#43a9a76a71a01a8f0533be7e2fd3b571-lightbox)
    
2.  Click **Add Content** to set up your message.
    
    [![The inbox message content screen in the campaign editor](https://docs.customer.io/images/inbox-message-add-content.png)](#003c3ef856d6eb6b97641798b4aa2d9b-lightbox)
    
3.  Define your message settings:
    
    *   **Type**: Provides a way to differentiate messages in your inbox. For example, if a message type is `rich`, that might tell your inbox client to display a rich message with support for images, etc.
    *   **Expiration**: The time between when the message is sent and when it should expire. Messages only expire if they’re sent but not delivered. **By default, messages expire after 60 days.**
    *   **Topics**: These are the topics that the message belongs to, used to filter the inbox (when you call `analytics.inbox('topic1', 'topic2')`). You can let your audience filter on topics when they open the inbox.
        
        [![The inbox message settings screen with the message settings filled in](https://docs.customer.io/images/inbox-message.png)](#bf49584b3c7088f0b198a5f9671d34e2-lightbox)
        
4.  In the JSON area, provide the JSON payload that represents your message. By default we provide a `title` and `body` field, but you can add other fields like an `image` or a `link`.
    
    You can use [liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable `{{customer.first_name}}`.](/using-liquid) to include dynamic content from your trigger data, like `{{customer.<attribute_name>}}` to include customer attributes. If you reference event data, you’ll use `{{event.<attribute_name>}}`.
    
    For example, your message might look like this:
    
    ```json
    {
     "title": "Hey, {{customer.first_name}}, your order shipped!",
     "body": "You can track your order #{{event.order_number}} here:",
     "link": "https://example.com/orders/{{event.order_number}}"
    }
    ```
    
5.  When you’re done, save your message.
    

#### Personalize your message[](#personalize-your-message)

You can use [liquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable `{{customer.first_name}}`.](/using-liquid) to include dynamic content in your message. You can use profile [attributesA key-value pair that you associate with a person or an object—like a person’s name, the date they were created in your workspace, or a company’s billing date etc. Use attributes to target people and personalize messages.](/journeys/attributes/) in any message in the format `{{customer.<attribute_name>}}`. You can use event data in messages triggered by an event or an API call.

Source

Example

Campaign

Broadcast

Newsletter

Description

Profile attributes

`{{customer.first_name}}`

Yes

Yes

Yes

Attributes belonging the message recipient.

Event data

`{{event.order_number}}`

When triggered by an event

N/A

N/A

Data from an event that triggered the message.

Trigger data

`{{trigger.order_number}}`

N/A

Yes

N/A

Data sent in the `message_data` object when you trigger a broadcast or a [transactional message](/journeys/send-inbox-txnl/).

#### Message topics and types[](#message-topics-and-types)

The message **Topic** provides a way to filter messages in the inbox, and the **Type** provides extra context to help you render the message. Neither field is required to send (or display) messages.

These are values that you’ll implement when you [set up your inbox](/journeys/inbox-setup/). So if you’re not sure what values to use here, talk to team members who developed your inbox!

If you don’t want to filter messages by topic, and you don’t want to assign “types” to your messages, you can leave these fields empty.

## Troubleshooting[](#troubleshooting)

Inbox messages follow the same [delivery patterns](/journeys/in-app-getting-started/#in-app-warming-and-polling) as regular in-app messages. Check our [in-app messaging FAQ](/journeys/in-app-faq/) for additional troubleshooting.

### My message doesn’t appear[](#my-message-doesnt-appear)

1.  Verify that [you’ve enabled in-app and inbox messaging](/journeys/in-app-getting-started/) in workspace settings.
2.  Ensure the In-App Plugin loads (`analytics.inbox` should be defined).
3.  Check that the message isn’t filtered out by `analytics.inbox()`. If you call `analytics.inbox('topic1')` and the message’s topic is `topic2`, it won’t appear in the inbox.
4.  Check that the user is [identified](/integrations/data-in/connections/javascript/method-reference/#identify).
5.  Confirm that the message you intend for people to see hasn’t expired. You may need to investigate a specific deliveryThe instance of a message sent to a person. When you set up a message, you determine an audience for your message. Each individual “send”—the version of a message sent to a single member of your audience—is a delivery. to see the expiration date.

### Topics don’t filter correctly[](#topics-dont-filter-correctly)

Remember that topics are set in the message template, not the API call. Messages with empty topics arrays match all topic filters. Calling `inbox('topic1')` only returns messages that include `'topic1'` in their topics array.