Cupones Masivos
Create and archive VTEX coupons in bulk from the Admin, with unique codes, per-coupon reporting, and CSV export.
Installation identifier
Cupones Masivos is distributed under the official VTEX App ID
soluciones4fpartnerar.cupones-masivos. The installation command is:
vtex install soluciones4fpartnerar.cupones-masivos@0.xCupones Masivos is a VTEX Admin App that solves a limitation of the native VTEX
panel: it cannot generate coupons in bulk. The app creates N coupons from a base code —
with a random suffix or sequential numbering — links them to a utmSource /
utmCampaign, and archives them in bulk once the campaign ends. Every operation returns
a per-coupon report and, for bulk creation, a CSV with the generated codes.
Unlike Koru's storefront apps, nothing is configured in the Koru panel and no site code is touched. Koru Suite is used only to enable the app's license for the store; the entire operation lives inside VTEX Admin.
VTEX prerequisite: the coupon does not define the discount
In VTEX, a coupon does not apply a discount on its own: it only activates the
promotions whose scope is configured to respond to its utmSource / utmCampaign.
This app creates and archives coupons; it does not create promotions. Without a
promotion bound to those UTM values, the coupons are created correctly but discount
nothing at checkout.
What Cupones Masivos does not do
It does not create or edit promotions, does not list or search the store's existing coupons, does not overwrite coupons that already exist, adds nothing to the storefront, and has no undo: reverting an archive is done from VTEX Admin.
Before you begin
Recommended owners
| Task | Typical owner |
|---|---|
| Install the app and validate the account/workspace | VTEX agency, developer, or technical lead |
| Activate the app for the website in Koru Suite | Red Clover / Koru Suite administrator |
| Enter the Website ID | Technical lead or project manager |
| Create the promotion bound to the UTM values | Ecommerce or marketing manager |
| Define prefix, quantity, and UTM values per campaign | Marketing or ecommerce |
| Run the creation and store the CSV | Campaign operator |
| Archive the coupons when the campaign ends | Campaign operator |
The same person may cover several roles in a small store.
Required access
Before installing, make sure you have:
- A valid VTEX Admin session in the store account.
- The official VTEX CLI installed and up to date.
- Permission to install apps in the selected workspace.
- VTEX permission to operate coupons (Promotions and Coupons module). Without it, every coupon fails with "No permission to operate coupons in VTEX."
- The ecommerce Website ID from Koru Suite, with Cupones Masivos active for that website.
Cupones Masivos does not create a custom VTEX role and uses no credentials of its own: it operates with the identity of the logged-in administrator. Human permissions are managed with VTEX's existing access controls (License Manager).
There is no VTEX AppKey/AppToken to configure. The only value the merchant enters is the Koru Website ID.
Identifiers you will encounter
| Identifier | Example | Defined by | Is it configured? |
|---|---|---|---|
| Store VTEX account | my-store | Merchant | Used to log in with the CLI |
| VTEX workspace | master or coupons-qa | Merchant/agency | Determines where the app is installed and validated |
| VTEX App ID | soluciones4fpartnerar.cupones-masivos | App publisher (Red Clover) | Used by vtex install |
| Koru Website ID | Website UUID | Koru Suite | Yes, once per store |
| Koru App ID | Internal Cupones Masivos UUID | App build | No; it is built into the app |
Do not confuse the two accounts
The merchant account used by vtex login is different from soluciones4fpartnerar,
which is the publisher account for Cupones Masivos. Never replace the App ID vendor with
the merchant account.
Installation with the VTEX CLI
Installation uses the
official VTEX CLI.
It requires no Store Theme changes, no block declarations, no <script> snippet, and no
Google Tag Manager setup: the app runs entirely inside VTEX Admin and its own Node
service.
Install in a validation workspace first
If the store has a QA process, install and test the app in a development workspace first. Replace values in braces:
Log in to the store account
vtex login {store-account}Select the validation workspace
vtex use {store-account}/{workspace}Confirm the context before installing
vtex whoamiThe output must show the expected account and workspace. Do not continue if the context is wrong.
Install Cupones Masivos
vtex install soluciones4fpartnerar.cupones-masivos@0.xThe 0.x range installs the latest stable release available in major version 0.
Verify the installation
vtex listLook for soluciones4fpartnerar.cupones-masivos under the installed apps.
Policies declared by the app
ADMIN_DS, outbound-access to portal.vtexcommercestable.com.br/api/license-manager/*
— admin session validation — and outbound-access to www.korusuite.com/api/auth/* —
license validation. There are no additional accesses.
Open the app in VTEX Admin
The app registers a Cupones Masivos item under the store setup section of VTEX Admin. You can also navigate directly to:
https://{workspace}--{store-account}.myvtex.com/admin/app/cupones-masivosFor master, use the account's main Admin domain:
https://{store-account}.myvtex.com/admin/app/cupones-masivosIf that URL does not resolve in your account, try /admin/cupones-masivos: depending on
the installed version, the app may expose the screen on either route. The stable entry
point is always the Admin menu item.
If the app does not appear in the navigation, confirm vtex list, reload VTEX Admin, and
verify that you are viewing the same account and workspace where it was installed.
Install in master
After validating the setup in the appropriate workspace, select master, confirm the
context again, and repeat the installation:
vtex use {store-account}/master
vtex whoami
vtex install soluciones4fpartnerar.cupones-masivos@0.x
vtex listSettings belong to each installation/workspace. Verify the Website ID in the final environment even if you already tested it elsewhere.
Do not create test coupons in master
Coupons created from any workspace affect the account's real coupon catalog. To test, use
identifiable prefixes — for example QA- — and archive them when you are done.
Updating and uninstalling
Update within the current major
Select the correct account/workspace, confirm it, and install the range again:
vtex whoami
vtex install soluciones4fpartnerar.cupones-masivos@0.x
vtex listAfter updating, open the app and verify that the license is still active and the Website ID is present.
Uninstall
Uninstallation applies to the current workspace:
vtex whoami
vtex uninstall soluciones4fpartnerar.cupones-masivos
vtex listUninstalling the app does not archive or delete the coupons already created: they still exist in VTEX and are managed from the native Promotions and Coupons module.
Activation and first access
Get the Website ID
Before first use, Red Clover must activate Cupones Masivos for the corresponding website in Koru Suite. The Website ID is available in Koru Suite or is provided during activation.
The Website ID:
- Identifies the ecommerce website in Koru Suite.
- Is not a password or secret.
- Must belong to the same VTEX store where the app is installed.
- Is the only Koru identifier the merchant enters manually.
Connect the store
On first access, the app displays Connect this store to Koru Suite:
Paste the Website ID
Enter the full value without extra spaces. This is the Website ID, not the App ID.
Save and continue
The app persists the value in its VTEX app settings. It can also be managed through the app's native settings: Admin → Apps → Installed apps → Cupones Masivos → Settings.
Confirm the license
The header must display Active license. If you see Koru license not active, all operations are blocked: verify the Website ID and the activation in Koru Suite first.
The app does not request a separate Koru login. The user is already authenticated in VTEX Admin; Koru Suite only checks that the Website ID + Cupones Masivos combination has an active license.
Available app settings
| Setting | Admin title | Required | Behavior |
|---|---|---|---|
koruWebsiteId | Koru Website ID | Yes | Connects the store to the Koru license. |
koruAppId | Koru App ID (optional) | No | Koru App ID override. Leave it empty: the app already ships the correct value. Fill it in only if Koru explicitly asks you to migrate the App ID. |
koruAppId can only be set from VTEX's native settings; the app's connection screen
writes the Website ID only.
A wrong koruAppId produces exactly the same error as an inactive license. Unless Koru
told you otherwise, leave it empty.
Verify the license from the browser
With an open Admin session, in the same tab and domain:
GET https://{store-account}.myvtex.com/_v/private/cupones-masivos/health{
"ok": true,
"appId": "soluciones4fpartnerar.cupones-masivos",
"account": "{store-account}",
"workspace": "master",
"checkedAt": "2026-07-30T12:00:00.000Z",
"license": {
"configured": true,
"authorized": true,
"reason": "koru"
}
}Before creating the first batch
In VTEX the discount lives in the promotion, not in the coupon. The correct order is:
Create the promotion in VTEX
Admin → Promotions → new promotion, with a UTM parameter condition pointing to the source and campaign you are going to use.
Write down the exact source and campaign
UTM values are sent to VTEX in lowercase (Mailing → mailing) and cannot contain
spaces. The promotion must listen for those same values.
Generate the coupons with those UTM values
Only then run the creation in Cupones Masivos. Each coupon is bound to the promotion
through its utmSource / utmCampaign.
Test one coupon at checkout
Validate with a coupon from the batch before distributing the rest. If it does not discount, the problem is in the promotion, not in the coupons.
Creating coupons
Everything is handled from VTEX Admin → Store settings → Cupones Masivos. There is a single screen with an Operation selector in the upper right:
| Operation | What it does |
|---|---|
create | Generates new coupons, individually or in bulk. |
archive | Archives existing coupons, individually or in bulk. |
Code strategy
The codeStrategy field defines how each code is assembled: {prefix}{separator}{suffix}.
| Option | What it does | Fields used | Example with prefix RedClo |
|---|---|---|---|
plain | The code is the text you entered, as is. Always generates 1 coupon: bulk mode is ignored and the toggle is hidden. | couponCode | RedClo |
random | Prefix + separator + readable random suffix. Codes are deduplicated within the batch. | couponCode, separator, suffixLength, quantity | RedClo-A3F7K, RedClo-T9QMX |
sequential | Prefix + separator + incremental zero-padded number. Unique by construction. | couponCode, separator, suffixLength, sequenceStart, quantity | RedClo-00001, RedClo-00002 |
The random suffix uses a readable alphabet without ambiguous characters:
ABCDEFGHJKMNPQRSTUVWXYZ234567890/O and 1/I/L are excluded so the code can be dictated over the phone or
transcribed by hand without errors.
Below the fields, the app shows a live preview (Example: RedClo-00001) that updates
as you change the prefix, separator, and length.
Code parameters
| Field | Description |
|---|---|
batch | Toggle. ON generates quantity coupons; OFF generates 1. Only visible with random or sequential. Enabled by default. |
quantity | Integer from 1 to 500 per operation. Only requested when bulk mode is on. |
couponCode | Required. With plain it is the exact code; with random/sequential it is the prefix. Maximum 20 characters, letters, numbers, and hyphen only. |
separator | - or empty, for direct concatenation (RedCloA3F7K). Default -. |
suffixLength | With random: 1 to 12. With sequential: 1 to 10 padding digits. Default 5. |
sequenceStart | Integer ≥ 0, default 1. Only with sequential. Useful to resume batches: if you already created 00001–00005, start at 6. A number exceeding the padding is not truncated (padding 2, start 99 → RedClo-99, RedClo-100). |
VTEX does not allow dots or underscores
The coupon code accepts letters, numbers, and hyphen (-) only. Any other character
is rejected during validation, before VTEX is called.
Coupon parameters
These apply equally to every coupon in the batch.
| Field | Required | Description |
|---|---|---|
utmSource | Yes | No spaces. Sent to VTEX in lowercase. This is half of the key the promotion must be listening for. |
utmCampaign | Yes | No spaces. Sent in lowercase. |
maxItemsPerClient | No | Integer ≥ 1. If left empty, the app omits the field and VTEX applies its own default behavior. |
expirationIntervalPerUse | No | An interval, not a date. Format hh:mm:ss, with hh of 1 to 3 digits and mm/ss between 00 and 59. Example: 24:00:00 = 24 h from first use. Empty = no expiration per use. |
The form shows a permanent notice: "The coupon only applies a discount if a VTEX promotion is bound to this UTM source and campaign."
Overwrite protection
Before creating each coupon, the backend checks whether the code already exists in VTEX. If it does, it is not overwritten: that item is reported as "Coupon already exists." and the rest of the batch continues.
This is deliberate. VTEX's coupon POST is an upsert: without this check, a new campaign
could silently overwrite the configuration of an active coupon.
Archiving coupons
| Field | Description |
|---|---|
batch | Toggle. OFF (default) means a single code; ON means a list of codes. |
code | With bulk OFF. Exact code to archive. |
codes | With bulk ON. One code per line or comma-separated. Spaces are trimmed and duplicates and empty entries are removed, both in the UI and in the backend. |
Archiving uses VTEX's dedicated endpoint, one coupon per request. A nonexistent code returns "Coupon does not exist." for that item without aborting the rest.
Archiving has no undo inside the app
Reverting an archive is done from the Promotions and Coupons module in VTEX Admin. Confirm the list of codes before archiving a large batch.
Results and export
A results block appears after every operation:
| Element | Description |
|---|---|
| Counters | Requested, Succeeded, and Failed. |
| Detail table | One row per coupon: code, status (OK / Error), and reason, shown only on error. |
| Export CSV | Available only for bulk creation with at least one success. Downloads cupones-{campaign}.csv with the successfully created coupons. |
CSV columns: couponCode, utmSource, utmCampaign, maxItemsPerClient,
expirationIntervalPerUse.
Always export the CSV when using `random`
Random suffixes are generated on the spot and the app keeps no batch history. If you close the screen without exporting, the only way to recover the codes is to look them up in the Promotions and Coupons module in VTEX Admin.
A bulk operation never fails entirely because of a single coupon: each one is resolved separately and the response aggregates the counters.
Operation limits
| Limit | Value | Source |
|---|---|---|
| Coupons per creation operation | 500 | Backend validation |
| Coupons processed in parallel | 8 | Backend concurrency pool |
Retries per coupon on VTEX 429 / 5xx | 3 | Exponential backoff with jitter, honoring Retry-After |
| Service timeout | 60 s per request | Node service configuration |
| Maximum body size | 1 MB | Handler parser |
| Prefix / base code length | 20 characters | Backend validation |
The 500 limit is validated on creation. For archiving, the backend only requires at least one code, but avoid going beyond a few hundred per operation: with a 60 s timeout and 8 in parallel, a very large batch is cut off by time.
For more than 500 coupons, run several operations. With sequential it is
straightforward: raise sequenceStart to the next number of the previous batch — batch 1
from 1, batch 2 from 501. With random, simply repeat the operation: codes are
checked against the store before being created, so there is no risk of a silent
collision.
License and security
License validation
Every operational route requires:
- A valid VTEX Admin session. Without it, the backend responds
401. - An active Koru license for the Website ID and the Cupones Masivos App ID.
The backend exposes its routes under /_v/private/cupones-masivos/*. They are private:
they cannot be consumed from the storefront or by an external client without an admin
session.
To tolerate transient failures:
- A positive authorization is cached for 5 minutes; an explicit revocation for 60 seconds.
- If Koru Suite does not respond due to a network or server error, a previous positive validation can keep access alive for up to 72 hours.
These values are internal, are not configurable per store, and there is no manual cache purge: after activating the license or fixing the Website ID, wait for the TTL and reload the screen.
Data and credentials
- The app does not request or store the merchant's AppKey/AppToken: it operates with the identity of the logged-in administrator.
- There are no Koru secrets in the browser; license validation is resolved server-side.
- The only persisted data are the
koruWebsiteIdandkoruAppIdsettings — neither is a secret — and an internal record of the last positive validation. - It stores no customer data and no batch history.
- It injects no JavaScript, CSS, or blocks into the storefront and does not participate in public page rendering or checkout: it does not affect store performance.
Troubleshooting
The app does not appear after installing
- Run
vtex listand look forsoluciones4fpartnerar.cupones-masivos. - Run
vtex whoamiand confirm the account and workspace. If the app was linked in a development workspace, it does not appear inmaster. - Reload VTEX Admin: the menu is cached on the browser side.
- Open
/admin/app/cupones-masivosor/admin/cupones-masivosdirectly.
The app says "Koru license not active"
Koru answered that this website_id + app_id combination does not have the app
enabled. Check:
- That
koruWebsiteIdbelongs to this ecommerce website. This is the most common mistake: pasting the Website ID of another store of the same client. - That the app is active for that website in Koru Suite.
- That you did not copy any spaces.
- That
koruAppIdis empty, unless Koru explicitly told you otherwise.
The app says "We could not verify the license"
This is a transient availability state, not proof of revocation. The backend tolerates network outages: if there was a positive validation within the last 72 hours, operations remain enabled. Retry in a few moments.
I activated the license and the app is still blocked
Validation is cached. Wait for the corresponding TTL — 5 minutes for an active license, 60 seconds for a revoked one — and reload the Admin screen. There is no manual purge endpoint.
The coupons were created but discount nothing
This is not an app problem. In VTEX a coupon only activates promotions whose scope
listens for its utmSource / utmCampaign. In Admin → Promotions, create a
promotion with a UTM parameter condition pointing to the same source and campaign, in
lowercase.
A coupon failed with "Coupon already exists."
The code is already in the store and the app does not overwrite existing coupons by
design. Change the prefix, raise sequenceStart, or increase the random suffix length.
I requested 100 coupons and fewer were created, with no errors
This happens with random and very short suffixes: the combination space runs out. The
alphabet has 30 symbols, so a 1-character suffix yields at most 30 distinct codes. The
app deduplicates and creates only the unique codes it managed to generate.
Fix: increase suffixLength or reduce quantity. Always compare the requested amount
with the Requested counter in the results.
Several coupons failed with "VTEX rate limit reached."
The coupon API applied rate limiting and the 3 retries were exhausted. Retry those codes later or split the work into smaller batches.
Every coupon fails with "No permission to operate coupons in VTEX."
The logged-in admin user has no permission over the Promotions and Coupons module. The app operates with that identity, not with its own credentials: request the corresponding role in License Manager and sign in again.
Raw identifiers appear on screen
If you see text such as create.title instead of a label, the workspace message catalog
is out of date. Re-link or reinstall the app.
For technical support in production:
vtex logs soluciones4fpartnerar.cupones-masivosDo not share tokens, cookies, or unnecessary personal information.
Functional limits
The current version:
- Creates and archives coupons; it does not create or edit promotions.
- Does not list, search, or export the store's existing coupons: it works by code.
- Does not overwrite existing coupons.
- Keeps no history of generated batches.
- Does not undo an archive.
- Supports up to 500 coupons per creation operation.
- Allows letters, numbers, and hyphen only in the code.
- Accepts only
hh:mm:ssin the expiration interval. - Is a single Admin screen per account: it does not support multiple instances.
- Is available in Spanish, English, and Portuguese, following the VTEX Admin language; it has no language setting of its own.
Checklist before operating
- Cupones Masivos installed in the correct account and workspace.
- Store Website ID verified and
koruAppIdempty. - Active license visible in the header.
- Admin user with permission over Promotions and Coupons.
- Promotion created in VTEX with the UTM parameter condition.
-
utmSourceandutmCampaignagreed, without spaces and in lowercase. - Code strategy chosen and live preview reviewed.
-
quantitywithin the 500-per-operation limit. -
suffixLengthlarge enough for the requested amount, if usingrandom. - Requested counter compared with the amount you asked for.
- CSV exported and stored before closing the screen.
- One coupon from the batch tested at checkout.
- Owner defined for archiving the coupons when the campaign ends.
Useful details when requesting support
Report the VTEX account, workspace, approximate time, the operation executed, the code
strategy, utmSource / utmCampaign, an affected code, and the visible error message.
Avoid sending credentials or cookies.