Custom Notification Buttons Tutorial

Notification Buttons prompt a user to take specific actions within or outside of the app. Urban Airship has 30+ out-of-the-box buttons to match the most common use cases that we have identified, but you can also create custom buttons.

Important

Notification buttons are tied to an action within your app, so a developer must first update your app, registering new categories in the Urban Airship SDK.

After your developer registers the new categories, you can complete this tutorial. You will need the category name for each button.

Related Workflows

  • Message
  • A/B Test
  • Automation

See: Message and Workflow Types.

What You'll Do

In this tutorial, you will:

  1. Name a new button and enter its category.
  2. Specify the button's label and actions.
  3. Optionally create a secondary button.
  4. Save the button for use.

Steps

Create a New Notification Button

  1. Open your project from the dashboard, then click Settings and select Configuration.

  2. If they are currently disabled, toggle Notification Buttons On.

  3. Select Notification Buttons from the left-side menu, then click New Notification Buttons.
  4. Complete the button configuration.
    • Enter a Name and Description so you can easily find it in the full list of buttons.
    • The Category Name is passed to the mobile device to identify which notification buttons to display with a message. Uncheck the Enabled box if you do not yet want these buttons to appear in the list of Interactive Notifications buttons when composing a message.
    • Specify the button's label and actions:

      • Button Label: Identifies button label for display purposes in the dashboard. Should match the label defined in the app. Does NOT change button labels in app.
      • ID: Associates actions with the correct button label when passed by message.
      • Foreground or Background: Controls which actions are available in the dashboard. Must match button ID defined in the app.
      • Destructive: Indicates if button action causes the removal of data, features, etc. Appears red on iOS. Must match capability defined in the app. Check the box to enable.
  5. Optionally fill out the same information for a Secondary Button.

  6. Click the Save button, or cancel to discard.

Next Steps

Include a Button in a Message

After you create a button, you can add it to a Message, A/B Test, Automation, or Push Template. In each, the last section in the Content step is Optional Features. See: Optional Message Features: Buttons.

Tutorials