rules automations
Create new automation
Create a discount automation to apply on events received.
A automation can be used to automate the task of
giving discount to customers. The customer found in
the event will receive the discount.
###
Welcome discount: give discount to new user
{
"requirement": {
"events": ["customer_add"],
"automation_from": "2018-05-07T08:54:31Z",
"automation_to": "2018-06-07T08:54:31Z"
},
"actions": [
{
"type": "discount",
"id": "cae3e485-0e15-4afa-bc66-472f843efb84"
}
]
}
###
Purchase discount: give discount on first purchase at store
{
"name": "purchase at store sc029",
"requirement": {
"events": ["receipt_add"],
"automation_from": "2018-05-07T08:54:31Z",
"automation_to": "2018-06-07T08:54:31Z",
"filters": {
"$.store.id": ["sc029"]
}
},
"actions": [
{
"type": "discount",
"id": "cae3e485-0e15-4afa-bc66-472f843efb84"
}
],
"limitation": {
"automation_repeat": 1
}
}
scopes:
- admin:automations
- write:automations
POST
aid_automations_rules_post
Authorizations
Bearer authentication (token authentication) should be used for accessing the API.
Use Get Token to get an access token for client credentials. Pass the token in the request header:
where the access_token is JSON Web Tokens (JWT).
Path Parameters
Body
application/json
Automation to create
Response
Automation created