Skip to content

Rule Engine

sblabreu edited this page Mar 23, 2021 · 2 revisions

Rule Engine

Schema creation

Make sure you define a valid schema for your event payload. use the following page to generate draft4 schema

https://www.liquid-technologies.com/online-json-to-schema-converter

NOTE do not include the event parameter make sure the types are correct (integer, string, etc)

Merchant Schema creation

Before any rule creation, you must define the merchant schema that is done with the API

http://164.68.126.56:5000/index.html#/PayloadSchema/FidelityRulexWeb_Api_V1_PayloadSchemaController_create

Rule Creation

With the merchant, schema define you can now create rules.

http://164.68.126.56:5000/index.html#/Rule/FidelityRulexWeb_Api_V1_RuleController_create

  • actions can be a list of "actions": [{"pay": 1}] where 1 is the number of Tokens to be payed.
  • condition can be

"condition": { "Operation": "eq", "key": "total_items", "value": "1" } Where, Operation can be "eq", "lt", "gt" and "key" any of the parameters on the event root.

set Creation

After the rule is created you must assign it to the merchant Rule Set

http://164.68.126.56:5000/index.html#/Set/FidelityRulexWeb_Api_V1_SetController_create

only after the rule is on the merchant set then an event can be fire against a rule.

Clone this wiki locally