Targets

What is a target?

A target is a configurable endpoint with a configurable payload according to the template
A target is usually directed at an Omneo endpoint, which is able to redirect the payload to a supported comms platform (Sendgrid, Mailchimp etc)
Targets can be configured against definition triggers to be triggered when certain conditions are met.

Example target template:

The template field defines the structure of the payload sent to the specified url.
The template field allows fancy date formatting and number formatting.

{
   "from":{
      "email":"[email protected]",
      "name":"Demo Store"
   },
   "to":{
      "email":"{{ profile.email }}"
   },
   "message_id":"118",
   "data":{
      "subject":"This reward is a ${{ value_initial|number_format(0) }} reward with Demo Store",
      "message":"A reward is available on your account, it expires at {{ expires_local_at|date('jS F Y') }}.",
      "omneoID":"{{ profile.id }}",
      "omneoProfileId":"{{ profile.id }}",
      "timezone":"{{ timezone }}",
      "firstname":"{{ profile.first_name }}",
      "lastname":"{{ profile.last_name }}",
      "issuedAt":"{{ issued_local_at|date('jS F Y') }}",
      "expiresAt":"{{ expires_local_at|date('jS F Y') }}",
      "amount":"{{ value_initial|number_format(0) }}",
      "balance":"{{ profile.combined_balance_dollars|number_format(2) }}",
      "emailPromo":"{{ profile.attributes.comms.email_promo }}",
      "emailOptOut":"{{ profile.attributes.comms.email_optout }}"
   }
}

Attribute

Description

id INTEGER

A unique Omneo ID of the target

url
URL

The URL endpoint of the target. The payload will be sent to this url when the target is triggered

name
STRING

The name of the target

handle
STRING

A unique handle for the target

template
STRING

The template defining the payload sent with to the target. This template supports

description
STRING

An internal description for the target

notes
STRING

Internal notes for the target

created_at
STRING
DATE-TIME
READ-ONLY

The UTC date & time the target record was created in ISO 8601 format.

updated_at
STRING
DATE-TIME
READ-ONLY

The UTC date & time the target record was last updated in ISO 8601 format.