Some products send coupon codes automatically after someone buys them. For example, a 10-pack of guest passes might email the buyer ten single-use codes. A code generation process is the named setup Rhythm uses to create those codes and send the delivery email. Each product names the process it uses.
Where to Find It
Go to Setup › Coupons & Discounts › Code Generation Processes. The page is headed Manage Coupon Code Generation Processes. When this feature is on for your account, Rhythm includes two default processes, so this list is usually not empty.
Prerequisites
- You need access to Orders & Inventory Setup.
Create or Edit a Process
- Go to Setup › Coupons & Discounts › Code Generation Processes.
- Press
Create Coupon Code Generation Process, or use a row'sCloneorEditicon to start from an existing process. - Under
Basic Information, enter aName:. Rhythm suggests theID:from the name, and you can change it while the process is new. After you save the process, you cannot change the ID. - Under
Coupon Code Template, enter theCoupon Code Template. Use#for a random digit,@for a random letter, and*for either. For example,GOLD-######creates codes such asGOLD-482913. - Leave
Confirmation Emailon, which is the default for a new process, when you want buyers to receive their codes by email. Switch it off when you do not want Rhythm to send that email. - If the email is on, write a
Subject:and body. Use the merge-field picker to add details about the buyer, their organization, the order, the product, the coupon, and the code. - Press
Save Changes.
Result
Coupon Code Generation Process '[name]' saved successfully. The process is now available for a merchandise item or another product to use.
Tip
The coupon.code_generation_html merge field returns HTML markup instead of plain text, so it keeps the coupon description's formatting. Reference it with triple braces, {{{coupon.code_generation_html}}}, so Rhythm outputs that HTML instead of showing the raw tags. Use the same coupon-code merge field throughout the email rather than switching to another token such as couponCode.name.
The Settings
| Setting | Options | Default | Effect |
|---|---|---|---|
Coupon Code Template | Text using #, @, *, and any literal characters | ****** | Sets the format for every code the process generates. The template must include at least six wildcard characters (#, @, or *). Rhythm rejects a shorter template when you save it; the form does not warn you while you type. |
Confirmation Email | On or off | On, for a new process | Controls whether the buyer receives the generated codes by email when they purchase a product that uses this process. |
Status: | Active / Inactive | Active | Marking a process inactive does not stop products that already name it from issuing codes, because Rhythm does not check this flag during code generation. |
Deletion Protection: | On or off | Off | Only Rhythm staff can use this setting, so customer staff do not see it on the form. |
How a Code Is Generated
When a purchase should issue codes, Rhythm fills in the template with random characters, then checks whether that exact code is already in use. If the code already exists, Rhythm tries again until it finds one nobody has. There is no retry limit, so generation can take unusually long when the template's available code space is nearly used up. Rhythm generates random letters in mixed case, then converts them to uppercase only after the uniqueness check runs.
Any literal characters you add to the template stay exactly as written in every generated code. If those literal characters are not valid in a coupon code, every code from that process is refused later, so use plain characters for anything that is not a wildcard.
Preview the Confirmation Email
Before customers see the confirmation email, you can send a preview to any address. Rhythm builds the preview from a real order line.
- While editing the process with
Confirmation Emailon, pressPreviewbeside the merge-field picker. - In the dialog, choose the
Coupon Type:the codes belong to, and the coupon itself. - Enter an
Order ID:and, if the coupon should come from a line other than the first, anItem #:. - Enter the
Send Preview To:address. - Press
Send Preview.
Result
Email preview sent successfully. The dialog closes. The preview uses nine placeholder codes, COUPON0 through COUPON8, because previews do not generate real codes.
Warning
The preview sends real order and customer data, including the bill-to contact and organization, to the address you enter. If the order is billed only to an organization and has no bill-to contact, the preview fails.
Changing or Retiring a Process
You can change a process's template, email, or status, or delete the process, even when a product still names it. Rhythm does not warn you or block the change.
- Changing the template or email takes effect the next time a product using this process issues codes.
- Switching a process inactive has no effect on products that name it; they keep issuing codes.
- Deleting a process while a product still names it means purchases of that product fail to issue codes from then on.
Warning
Before you delete or heavily change a process, check which products name it. Rhythm does not warn you, and there is no confirmation step beyond the ordinary delete prompt.
Where Customers See Generated Codes
When a product purchase generates coupon codes, the codes appear in the product's own confirmation email after the order finishes processing. They do not appear only in this process's confirmation email. If you want coupon-specific wording that connects a code to its coupon, add it under the coupon's own Code Generation Confirmation Email Content; see Coupons.
Related
- Coupons: the coupon that a code generation process's codes point to, and the coupon-specific email content merged into the confirmation.
- Discount Products: the product that a whole-order coupon posts its discount to.
- Merchandise Items: Create, Edit, and Find: where a merchandise item names the code generation process it uses.