Learn how to use Data Feeds to pull real-time data from your APIs into OneSignal messages.
{{ data_feed.rewards.points }}
and {{ data_feed.rewards.status_level }}
.
We’ll use this example to show you how to set up a Data Feed step by step below.
Data Feed configuration example
Personalization button options
Data Feeds section in the message composer
1a1-b2c3
, is a simple JSON blob like this:
rewards
Data Feed
rewards
feed knows to call the API with the external_id
of the recipientpoints
item (193) and the status_level
item (Gold)Content: application/json
.
Accept: application/json
.
cart_abandoned
custom event, where the payload includes a cart_id. In this example that event is being sent to OneSignal via API:
Custom event for Journey entry
user_12345
enters the journey when this event is fired, then reaches a node sending an email. That email template is set up with the cart
Data Feed, where the URL is set to retrieve the contents of a particular cart like so:
cart_id
value of 98765
will be stored to the Journeycart
Data Feed will reference that cart_id
value and use it to call the cart APIif
statement to do so:
tracking_number
exists.
banner
Data Feed that points to an endpoint without any variables in the URL like so:
{{ data_feed.banner.banner_url }}
as the image source URL, automating this process going forward.
external_id
)