{
"rule": {
"name": {
"value": "Use coupon from collection \"Valentines\"",
"translations": {
"pl": "Użycie kuponu z kolekcji \"Walentynki\""
}
},
"event_type": "string",
"frequency": {
"limit": 1,
"minimum": 1,
"rate": 1
},
"limit": 1,
"minimum": 1,
"rate": 1,
"paused": false,
"data_conditions": {
"operator": [
"EQUAL",
"GREATER",
"LOWER",
"EQUALS_OR_GREATER",
"EQUALS_OR_LOWER",
"IS_GIVEN",
"IS_NOT_GIVEN",
"NOT_EQUALS",
"IN",
"NOT_IN"
],
"value": "string",
"value_type": [
"STRING",
"NUMBER",
"BOOLEAN",
"ID",
"ARRAY_OF_STRINGS",
"ARRAY_OF_NUMBERS",
"ARRAY_OF_IDS"
],
"or_value_is_null": false
},
"audience_id": 1,
"hook_delayed_by_seconds": 100,
"hook_on_checks_failure": false,
"excluded_sources": [],
"daily_auto_trigger_at": "12:00",
"hook_type": "string",
"options": {
"rewards_api": {
"grant_points": 3,
"points_function": "if (eventData.amount > 100) {eventData.amount * 2} else if (eventData.amount > 50 && eventTime > Date.parse('2024-09-01')) {20} else {0}"
},
"mesages_api": {
"message_id": 1
},
"offers_api": {
"offer_id": 389123,
"offer_usable_for_seconds": 3600
},
"slack": {
"channel": "string",
"webhook_url": "https://url.com"
},
"url": {
"webhook_url": "https://url.com",
"webhook_secret": "string"
}
}
}
}