What is a Trigger?
Triggers allow Omneo to trigger pre-configured logic in response to different Omneo events.
This could be specific even such as a transaction was created (transaction.create), a daily process for larger process flows, or even one-off schedule on a specific date.
Triggers can be used to apply actions such as points, achievements, tiers, and can even be redirected to a configured target endpoint with a JSON payload.
Trigger Attributes
Attribute | Description |
---|---|
idINTEGER | A unique omneo identifier for the trigger |
nameSTRING | The name of the trigger |
triggerSTRING | The unique name of the triggering event. (e.g profile.updated |
descriptionSTRING | A description of the trigger |
notesSTRING | User notes about the trigger |
actionsARRAY | An array of actions that make up the trigger |
actions[].idINTEGER | The unique Omneo ID of the Trigger Action |
actions[].uuidSTRING | The unique Omneo uuid of the Trigger Action (e.g 'tsend') |
actions[].reference_idSTRING | A unique reference id to this specific trigger action |
actions[].nameSTRING | The name of the trigger action |
actions[].sort_orderINTEGER | The sort order of the trigger actions. Upon triggering, the lowest sort_order action will be executed first |
actions[].descriptionSTRING | The description of the trigger action |
actions[].notesSTRING | Notes for the trigger action |
actions[].argumentsARRAY | An array of arguments that make up the events as part of the action. |
actions[].arguments.nameSTRING | The argument name. (This must be a valid attribute name from the list of Trigger Actions below) |
actions[].arguments.valueOBJECT | The argument value. This value is passed directly as JSON LOGIC, and used to determine the selection, If is_dynamic is true. |
actions[].arguments.is_dynamicBOOLEAN | Determines whether the value is passed as JSON LOGIC, or processed as a static string. |
actions[].created_atDATE-TIME | The date-time the action was created |
actions[].updated_atDATE-TIME | The date-time the action was last updated |
Trigger Actions
The below is a list of trigger actions, and the available attributes to access within the action
When configuring actions in Omneo, you need to specify (a) the name
of the object, and (b) the value
which is converted directly to JSON Logic
Populating is_dynamic
determines whether the value
field is passed as JSON logic to calculate the field dynamically. (if true), or passed as a static value (if false).
Create Benefit
EVENT: benefit.create
Attribute |
---|
profile_id Must exist in profiles |
issued_at_days |
issued_at_hour |
timezone |
definition Must exist in definitions |
Create Point
EVENT: point.create
Attribute |
---|
value_remaining |
value_initial |
issued_at |
Create Reward
EVENT: reward.create
Attribute |
---|
meta |
value |
profile_id Must exist in profiles |
definition (handle) Must exist in definitions |
rounding DOWN, UP, HALF-DOWN, HALF-UP |
timezone |
max_issue |
expires_at Y-m-d H:i:s |
Create Tier Point
EVENT: tier-point.create
Attributes |
---|
profile_id Must exist in profiles |
amount |
definition (handle) |
issued_at Y-m-d H:i:s |
Achievement Increment
EVENT: achievement.increment
Attributes |
---|
profile_id Must exist in profiles |
definition (handle) Must exist in definitions |
count |
Achievement Increment Product Update
EVENT: achievement.increment.product.update
Attribute |
---|
id Must exist in products |
definition handle Must exist in definitions |
Target Send
EVENT: target.send
Attribute |
---|
target (handle) Must exist in targets |