Send a Notification

There are two primary ways in which you can send a notification. You can trigger a send via the Courier Send API, or via a Segment event.

You can access the code snippet to send your notification via the Courier Send API by selecting the Send tab from within the notification designer, and select the runtime that you want to use to make the send call from.

Your Product Notification Template

Generating a Code Snippet

Once you have completed the required steps, you’ll be able to generate a code snippet and send a test Notification.

Code Snippet

To generate the right code snippet for your stack and start sending your notification to live users, confirm you have the right selection for these three settings:

1

Select Your Programming Stack

  • Choose between a list of programming languages that best fits your server stack to send your notification
2

Set the Notification Test Event

  • Choose the test event you wish to use with your notification to include the correct data and recipient profile sent in the request.
3

Recipient Profile Set

  • Make sure your test event includes a recipient profile so the request can successfully send.

Sending a Test Notification

After you configure the code snippet, setting these values will allow you to send a test Notification from the Send Tab:

1

Select a Test event

  • Selecting a test event modifies the send request with the selected data and profile payloads you wish to test your request with.
2

Select a Brand

  • Brand selection is used to give your notification content a consistent look depending on your company brand colors and styling. Available for Email and Courier Inbox.
3

Send a Test Notification

  • Alternatively, instead of copying a code snippet and sending it, you can send directly from the send tab page by clicking Send Test.
4

Copy the Code Snippet

  • The code snippet can be copied and pasted in your implementation to fire off a notification.

Read more: How to Send a Notification

Sending With Segment

In order to trigger a notification from a Segment event, you will first need to install the Courier destination in your Segment account, and then create a Courier automation.

Automations Overview

Linking Segment to an Automation

Once you have created an Automation, you need to configure the Segment event as the automation trigger.

Setting Up Your Automations Triggers