post https://example.com/EVENTS.BUS_VAL_RULE.CREATED
EVENT: "EVENTS.BUS_VAL_RULE.CREATED"
HTTP method: POST
HTTP method: POST
The EVENTS.BUS_VAL_RULE.CREATED
event indicates that a new business validation rule has been successfully created in Voucherify. This event provides, among others, the following details about the newly created rule:
- ID,
- Conditions,
- Logic.
Webhook documentation
This page documents only the event. If you need more details about the webhook payload data that includes this event, go to Webhook v2024-01-01 page.
Example: business validation rule.created
{
"rule": {
"id": "val_rfuNf5qDB9xg",
"name": "Business Validation Rule - 2/15/2024",
"type": "expression",
"rules": {
"1": {
"name": "customer.segment",
"error": {
"message": "Incorrect segment"
},
"rules": {},
"conditions": {
"$is": [
"seg_n3vVcU5t0m3rs4rEPr3C1oU5"
]
}
},
"2": {
"name": "order.initial_amount",
"rules": {},
"conditions": {
"$more_than": [
9900
]
}
},
"3": {
"name": "order.items.count",
"rules": {},
"conditions": {
"$more_than": [
3
]
}
},
"4": {
"name": "order.items.price_each",
"rules": {},
"conditions": {
"$more_than": [
500
]
}
},
"logic": " 1 AND 2 AND ( 3 AND 4 )"
},
"object": "validation_rules",
"created_at": "2024-02-15T11:04:01.856Z",
"context_type": "campaign.promotion",
"applicable_to": {
"excluded": [],
"included": [],
"included_all": false
}
}
}