For the complete documentation index, see llms.txt. This page is also available as Markdown.

Generate Gift Codes in Bulk

There are certain scenarios in which you may want to generate a lot of gift codes and purchasing individually isn't ideal.

We have a way for you to import a file with pre-generated gift codes to facilitate that task.

To get started

  • First you'll need to generate a CSV file with the list of gift codes and other attributes defined below

    • Check if there are maximum character and regular expression restrictions defined in your redemption flow before generating the codes

  • Publish the offer that the gift codes use. The import finds only published offers. For an unpublished offer, each record fails with the error didn't match any offer on the catalog

  • Request access from Limio to access the CSV ingestion bucket

Prepping the file

  1. Check the file size to upload For reliability and performance we recommend that a file has no more than 5,000 records. Bigger files can cause data loss.

  2. Check the file structure Make sure the headers match as these are case sensitive. NB: the table below describes which fields are mandatory

  3. Name the file correctly Files to be uploaded for the general migration process need to have the following prefix: Limio_gift_code_. Do not put spaces in the file name. The file name must end with .csv.

  4. Make sure that each gift code is new The import does not check if a gift code already exists. If you upload the same file two times, Limio creates each gift code two times. Upload each file one time only.

Processing the file

  • Upload the file into the right CSV bucket (ie: SHARD.csv-ingestion.limio.com)

    • You can get this information from your Limio contact.

  • Limio splits the file into batches of 1,000 and if your original file had 5,000 records for example, you'll see multiple files in the bucket being processed.

  • Once the process is finished they'll be moved to the processed folder.

Checking the outcome

  • You can check progress by going into your Subscriptions page in the Limio Commerce app (https://yourdomain.prod.limio.com/objects/subscriptions/limio) which will show the orders that have been processed.

  • Once the files have finished processing you'll see events for the associated events in the Events section in the Limio Commerce app.

    • Any errors will also appear in the Events section.

  • Limio also writes an error file to the errors folder of the bucket. The file has one row for each record that failed, with the reason. If the file has only the header row, all the records were imported.

  • A record with a missing mandatory field or an unknown offer creates nothing. After you correct the cause, you can upload the failed records again in a new file.

CSV file structure

The headers are case sensitive.

Header
Type
Mandatory
Description

Subscription_subscriptionExternalCorrelator

string

yes

Subscription unique identifier - can be the source (legacy) value. It will also be used as Order Number to prevent duplicates if importing again same record. IMPORTANT: it needs to be the subscriptionNumber field exported to Zuora since is going to work as link for the integration

Identity_zuoraAccountId

string

yes

Zuora account id, used to link to an existing customer uploaded (it could be in Limio or uploaded via other migration file). If Limio finds no customer for the account id, it creates a placeholder customer for the record

Voucher_code

string

yes

It's the code that the redeemer will use to get the subscription

Voucher_offerPath

string

yes

Defines the path of the Limio offer to be mapped into the subscription. The path starts with /. Example: "/offers2/digital/annual". The offer must be published

Voucher_originalQuantity

string (int)

The original quantity for the gift code. If not specified 1 is assumed

Voucher_usedQuantity

string (int)

The already used quantity for the gift code. If not specified 0 is assumed

Voucher_expiryDate

string (isodate)

Expiry date for the gift code/voucher, format: YYYYMMDD. If not specified the gift code expires 10 years after the import

Example:

Last updated

Was this helpful?