Skip to main content

What is an achievement definition?

Much like point definitions, achievement definitions are a configurable ‘template’ used when adding a profile achievement. Use Add Achievement Definition to specify your new type of achievement. After this, you can then Add a Profile Achievement to a profile, using your newly created definition.
See Achievements for a full explanation of how achievement definitions, levels, and profile achievement instances work.

Achievement definition properties

What the dates do and do not do

starts_at and ends_at are a presentation contract. They describe the window in which the achievement is offered to customers. They are not enforced anywhere in the earning path.
starts_at and ends_at do not block achievement progress. Neither field is evaluated when a count is incremented, so:
  • A direct POST to Add a Profile Achievement succeeds outside the window.
  • A reaction running achievement.increment or achievement.increment.transaction increments regardless of the window, and any level crossed will issue its unlocked rewards or benefits.
If a campaign must only count activity inside a date range, the date test belongs in the reaction’s filter action. See Date-gating a campaign.
This bites hardest with batched or replayed transactions. A POS batch delivered tonight can carry sales transacted days ago; the reaction fires when the batch lands, not when the sale happened. Gate on the transaction’s own transacted_at, never on when Omneo received it.

Creating Achievement Levels

Triggers

Triggers type levels will grant a level when the achievement count reaches the trigger value. These are granted only once and are used for a fixed achievement path.

Repeating

Repeat type levels will grant an achievement sequentially based on repeat interval. Used for campaigned such as ‘Earn achievement for every 5 shops’ etc. A repeats value of 0 will continue indefinitely. Any other number will stop granting levels after that number is reached.

Achievement Level Fields