Promo codes help you collect and enrich your customer database, encourage target actions, and personalize discounts. When you need a large batch of unique codes ready to distribute, Maestra can generate them for you and store them inside a pool.
This guide walks you through generating promo codes for a pool from start to finish.
Before you start
Make sure you already have a pool created in Maestra. The generation flow described below is configured on the pool itself — specifically inside its Promo Codes section.
If you don’t have a pool yet, create one first using the standard pool creation flow. The only thing that changes for this use case is what you choose inside the Promo Codes section.
Open the pool you want to populate and navigate to the Promo Codes section of its settings. This is where you decide how the pool will be filled with codes.
In the Promo Codes section, select Generate promo codes as the method Maestra will use to replenish the pool. This tells the system you want it to create codes for you rather than upload them from a file.
Next, Maestra asks which promo code format to use. The format defines the structure of the codes that will be generated — for example, length, character set, and any fixed prefix or suffix.
You have two options:
- Pick an existing format from the list of formats already configured in your account.
- Create a new format if none of the existing ones fit. Follow the standard format creation flow to define how the codes should look, then return to this step.
Reusing an existing format is the fastest path. Create a new format only when you need a code structure that isn’t already available.
Once a format is selected, configure how many codes to generate in this run:
| Field | What it means |
|---|
| Quantity | The number of promo codes this task will generate and add to the pool. |
| Available codes for generation | The number of codes still available in the selected format’s set. This is the upper bound for how many unique codes the format can still produce. |
Use Available codes for generation as a sanity check — your Quantity can’t exceed it. If you need more codes than the format can produce, switch to a format with a larger code space (for example, a longer code length or a wider character set).
Optional: Auto-generate when the pool runs out
You can enable Auto-generate promo codes if they run out. When this option is on, Maestra will automatically generate a new batch of codes as soon as the last code in the pool is distributed — so campaigns that rely on this pool don’t stall when supply runs low.
Turn this on for always-on use cases (welcome flows, evergreen offers, referral programs) where you can’t afford to manually top up the pool. Leave it off for one-time campaigns with a fixed code budget.
Step 5: Save and generate
Click Save and generate to kick off the task. Maestra creates a new upload task for this generation run.
The task moves through statuses — starting at Awaiting execution and progressing until it completes. Once done, you’ll see the results of the run, including how many codes were generated and added to the pool.
After generation finishes, save the Promo Codes block settings on the pool itself. This persists your replenishment configuration (including the auto-generate option, if you enabled it) so the pool keeps behaving the way you set it up.
What happens next
The newly generated codes are now in the pool and ready to be handed out through any campaign, scenario, or integration that draws from it. If you enabled auto-generation, Maestra will refill the pool on its own when supply runs out — no further action needed from you.