Marketing. Scenarios. Generate promo code
The "Generate promo code" action allows scenarios to automatically create a unique promo code for a user when the scenario is triggered. The generated code can then be sent to the user via SMS or Push notification.
For example, you can configure a scenario that generates a personalized promo code and immediately sends it to the customer in a message — fully automatically, without any manual steps.
Scenario setup:
- In the Control Panel, select the Marketing section
- Go to the Scenarios tab → Create
Fill in the "General" tab:
- Name. A descriptive name of the scenario (e.g., "Promo code for a free pizza")
- Status. Set the status to active.
Active — the scenario will run when the trigger is activated.
Inactive — the scenario will not run for new triggers, but all tasks that have already been started will be executed.
- Trigger. Select from the dropdown list. The event that activates the scenario.
- Limit scenario. Optionally, you can set trigger limitations.
This allows you to narrow down which orders should activate the scenario. When "Limit trigger" is enabled, you can configure the following filters:
- Limit by order source type
Restricts the scenario to orders from specific platforms. For example, only orders from the mobile app or only from the website.
- Limit by delivery type
Restricts the scenario to specific delivery types (e.g., delivery, pickup, dine-in).
- Minimum / Maximum order price
Restricts the scenario to orders within a specific price range.
- Minimum order price — the scenario will run only for orders equal to or above this amount.
- Maximum order price — the scenario will run only for orders equal to or below this amount.
- Delay period and Delay value. The waiting time after the trigger before executing actions, i.e., how long to wait before performing the configured scenario action.
- Execute only once per order and Execute only once per user. These settings prevent duplicate scenario execution:
Parameter | Description |
Execute only once per order | If enabled, the scenario will create only one task for a single order. Even if the trigger fires multiple times for the same order, only the first task will be created. |
Execute only once per user | If enabled, the scenario will create only one task for a single user. After a task is created for a user, new tasks for them under this scenario will not be created. |
- Cancellation conditions define events that will cancel a pending scenario task before it is executed. This is useful when planned actions are no longer relevant.
Available cancellation conditions:
Condition | Level | Description |
New order creation | User level | Cancels the task if the same user creates a new order (any order, not only related to the trigger) |
Current order cancellation | Order level | Cancels the task if the trigger order is canceled |
Current order completion | Order level | Cancels the task if the trigger order is completed |
Review creation for current order | Order level | Cancels the task if a review is left for the trigger order |
Important notes:
● Cancellation conditions apply only to tasks with the "Pending" status (not yet executed).
● You can select multiple cancellation conditions — if any of them is triggered, the task will be canceled.
● Order-level conditions check the specific order that triggered the scenario.
● User-level conditions check any user activity across all their orders.
Example: A scenario sends a promo code 24 hours after order cancellation. Cancellation condition: "New order creation". If the customer places a new order within 24 hours — the promo code sending will be canceled (since the customer has already returned).- Success conditions.
Success conditions track whether the scenario achieved its goal after executing actions. This is optional — they are only needed if you want to measure scenario effectiveness.
Enabling success conditions
Toggle "Has success conditions" to enable this feature. Then configure:
Parameter | Description |
Success conditions | Events that indicate scenario success |
Result waiting time | How long to wait for the success condition. If not met within this time, the result will be "Conditions not met". |
Available success conditions
Condition | Level | Description |
New order creation | User level | The scenario is considered successful if the user creates a new order |
Review creation for current order | Order level | The scenario is considered successful if a review is left for the trigger order |
● Success condition: "New order creation"
● Waiting time: 7 days
● If the customer places a new order within 7 days → result "Successfully completed"
● If 7 days pass without an order → result "Conditions not met"
This allows you to track the scenario success on the tasks page.
Example of "General" tab configuration:


Fill in the "Actions" tab:
In the scenario actions form, enable the Generate promo code toggle. After enabling, three additional fields will appear below.
- Promo campaign. Select a campaign from the dropdown list that will be used as the basis for generating the promo code. The list shows all promo campaigns created for this account.
- Promo code expiration type and Promo code expiration value. Configure how long the generated promo code will be valid:
“Promo code expiration type” — select a time unit: Month, Week, Day, Hour, or Minute.
“Promo code expiration value” — enter the number of selected units.
Example values:
- Send message. To send the generated promo code to the user, you also need to enable the “Send message” action in the same scenario.
In the notification text (Push or SMS), use the placeholder: {{promoCode}}. This placeholder will be automatically replaced with the actual promo code when sending the notification.
Example notification text:
Hi, {{userName}}! Here is your personal promo code: {{promoCode}}. Use it to get a gift in your next order!
Example of "Actions" tab configuration


How the scenario works:
When the scenario is triggered for a user:
- The system generates a unique promo code (a random 7-character code).
- The code is assigned to the user and linked to the selected promo campaign.
- The code validity period starts immediately (from the moment of generation).
- If “Send message” is also enabled, the code is inserted into the {{promoCode}} placeholder and sent to the user via SMS and/or Push.
Important: “Generate promo code” is always executed before “Send message”, so the code is always ready at the moment the notification is created.
Frequently asked questions:What happens if the promo campaign is deleted or not found?
The promo code will not be generated. The system skips this step. The notification will still be sent, but the {{promoCode}} placeholder will remain empty.
Can it be used without sending a notification?
Yes. The promo code will be generated and assigned to the user even if “Send message” is disabled. The user will have the code in their account but will not receive a notification about it.
Is each promo code unique?
Yes. Every time the scenario is triggered, a new unique code is generated for the specific user.
When does the promo code validity start?
The validity period starts at the moment the scenario is executed for the user, not at the moment the scenario is configured.
Can it be combined with other actions (e.g., cashback)?
Yes. “Generate promo code” works independently of other actions. It can be enabled together with “Send message” and “Add cashback” in one scenario.
Where can I see generated promo codes?
Generated promo codes are displayed in the promo codes section of the selected promo campaign, just like any other promo codes. They will have the status “Assigned” and will be linked to a specific user.
Article link: here.
Updated on: 29/03/2026
Thank you!
