Create a voucher code for a newsletter
Your newsletter code is ready in a minute, with the exact limits you want.
What it replaces: 30 min in the discount settings
What you write to Claude
„make a code AUTUMN10: 10% off, min cart €50, valid 2026-10-09 to 2026-10-16, once per customer, not on sale items”
The problem
I'm sending a newsletter on Thursday and need a code: 10% off, minimum order €50, valid one week.
What Claude does
- Claude checks that the code doesn't exist yet.
- It shows the code with its value, minimum order, dates and limits.
- After your yes it creates the code switched off.
- It switches it on after a second yes and gives you a sentence for the newsletter.
What you get
A working code with the agreed limits, valid only in the chosen week and active only once you switch it on.
You stay in control
You see the code before it's created, it starts switched off and goes live only after a second yes. Codes are never deleted, only switched off. Prices, discounts and stock stay switched off until you turn them on, and unusually large changes need an extra confirmation.
Related use cases
- Give one customer a one-off apology code
- Review active voucher codes and discounts
- Prepare a Black Friday campaign across the shop
For developers
- Area
- 2 · Commerce
- Connector
- daily connector
- In the free Audit
- no, paid version only
- For
- Marketer / SEO, Store owner
- Tools
- ps_manage_cart_rules
Step by step
- Checks with ps_manage_cart_rules (action list) that the code doesn't already exist.
- Calls ps_manage_cart_rules (action create) and previews the rule: code, 10%, minimum cart, dates, once per customer. Excluding products already on sale is set with exclude_discounted=true; the code is created inactive until a separate approval.
- After your approval, creates the code. New codes are always created inactive.
- Activates it with action set_active after a second, separate approval.
- Gives you a short summary to paste into the newsletter.
Safety
Commerce (block 2) runs on the daily connector, is off after installation and has its own switch. Claude acts as the connector's PrestaShop employee, so the action must also be allowed in that employee's profile. Every write shows a preview, runs only after your approval (single-use token valid 30 minutes, blocked if the data changed in the back office in the meantime), is logged in the change history and can be undone with ps_revert_change. A new code is created inactive and goes live only after a separate activation. Codes are never deleted, only deactivated.
Last updated: 2026-10-05