---
url: /codes.md
description: >-
  How to create and manage codes (generic and unique), set usage limits,
  expiration dates, and distribution strategies.
---

# Codes

**Codes** control access to your campaigns. They determine who can place orders and help you track campaign performance across different channels.

## When to Use Codes

Use codes when you want to:

* **Control access**: Only allow specific people to participate
* **Track channels**: See which distribution channels perform best
* **Set limits**: Restrict total orders per code
* **Time-limit access**: Create codes that expire
* **Personalize**: Give individual customers unique codes

## Code Types

### Generic Codes

A single code that can be used multiple times.

**Best for**:

* Social media promotions
* Email campaigns to lists
* Partner distribution
* Public promotions with limits

**Example**: Code `SUMMER2024` can be used by up to 1,000 different customers.

### Unique Codes

Individual codes for one-time use each.

**Best for**:

* VIP customers
* Contest winners
* Loyalty rewards
* Personalized offers
* Tracking individual distribution

**Example**: Generate 500 unique codes like `SUM-A3X7K`, `SUM-B9P2M`, etc.

## Creating Codes

### Creating Generic Codes

1. Open your campaign
2. Click **Manage codes**
3. Click **Create Code**
4. Select **Generic Codes**
5. Configure:
   * **Code**: The code customers will enter
   * **Code Limit**: Total uses allowed
   * **Start Date**: When code becomes active
   * **Expiration Date**: When code stops working
6. Click **Create**

### Creating Unique Codes

1. Open your campaign
2. Click **Manage codes**
3. Click **Create Code**
4. Select **Unique Codes**
5. Configure:
   * **Prefix**: Starting characters for all codes
   * **Amount**: How many codes to generate
   * **URL**: Optional base URL to create links
   * **Start Date**: When codes become active
   * **Expiration Date**: When codes stop working
6. Click **Create**

::: info Bulk Generation
When generating many unique codes, you'll receive an email with a downloadable file once they're ready.
:::

## Code Settings

### Basic Settings

| Setting             | Description          | Example                        |
| ------------------- | -------------------- | ------------------------------ |
| **Code** (Generic)  | The actual code text | `SUMMER24`                     |
| **Prefix** (Unique) | Starting characters  | `SUM-` → generates `SUM-A3X7K` |
| **Amount** (Unique) | Number to generate   | 1000 codes                     |

### Usage Limits

| Setting            | Description                                  |
| ------------------ | -------------------------------------------- |
| **Code Limit**     | Total times this code can be used            |
| **Address Limit**  | Times same address can use the code          |
| **Customer Limit** | Times same customer (email) can use the code |

::: tip
For unique codes, each code has an implicit limit of 1 use. Additional limits can still apply.
:::

### Timing

| Setting             | Description                          |
| ------------------- | ------------------------------------ |
| **Start Date**      | Code won't work before this date     |
| **Expiration Date** | Code won't work after this date      |
| **Active**          | Toggle to immediately enable/disable |

Leave dates empty for codes that work indefinitely (until manually deactivated).

### URL Generation

For unique codes, you can specify a **URL** that will be combined with each code:

* URL: `https://yourcompany.stampix.com`
* Codes are appended: `https://yourcompany.stampix.com?code=SUM-A3X7K`

This creates ready-to-distribute personalized links.

## Managing Codes

### Viewing Code Usage

In the codes list, you can see:

* **Usage**: How many times the code has been used
* **Limit**: Maximum allowed uses
* **Status**: Active or expired

### Activating/Deactivating

Toggle the **Active** status to:

* Immediately stop a code from working
* Re-enable a previously disabled code

### Exporting Codes

For unique codes, you can export the list for distribution. The export includes:

* All generated codes
* Their status (used/unused)
* Optional personalized URLs

## Distribution Strategies

### Email Campaigns

**Generic code approach**:

* Create one code like `EMAIL25`
* Include in your email blast
* Track redemptions vs. emails sent

**Unique code approach**:

* Generate one code per recipient
* Merge codes into personalized emails
* Track exactly who redeemed

### Social Media

* Use generic codes for public posts
* Create different codes per platform to track performance
  * `FACEBOOK24`
  * `INSTAGRAM24`
  * `TWITTER24`

### Partners

* Give each partner their own generic code
* Set appropriate limits
* Track which partners drive the most redemptions

### Events

* Generate unique codes for attendees
* Print on name badges or handouts
* Ensure each attendee can redeem once

## Best Practices

### Code Design

**Generic codes**:

* Keep them short and memorable
* Use letters that look different (avoid O/0, I/1)
* Make them relevant to the campaign
* Test that they're easy to type on mobile

**Unique codes**:

* Use clear prefixes for organization
* Keep total length reasonable (8-12 characters)
* Consider how they'll be distributed

### Limits

* Set code limits slightly above expected usage
* Use address/customer limits to prevent abuse
* Monitor usage and adjust if needed

### Timing

* Set start dates for planned campaigns
* Set expiration dates to create urgency
* Consider timezone differences for international campaigns

### Tracking

* Use different codes for different channels
* Review code performance regularly
* Document which codes were distributed where

## Examples

### Loyalty Program

**Setup**:

* Unique codes
* Prefix: `LOYALTY-`
* Amount: 10,000
* Customer limit: 1 per customer
* No expiration

**Distribution**: Send one code per loyalty member with their monthly statement.

### Flash Sale

**Setup**:

* Generic code: `FLASH50`
* Code limit: 50 (first 50 customers)
* Start: Sale start time
* Expiration: 24 hours later

**Distribution**: Announce on social media at sale start.

### Partner Campaign

**Setup**:

* Multiple generic codes:
  * `PARTNER-A`: 500 limit
  * `PARTNER-B`: 500 limit
  * `PARTNER-C`: 500 limit
* Same dates for all

**Distribution**: Give each partner their allocated code.

### Influencer Campaign

**Setup**:

* Generic codes per influencer:
  * `INFLUENCER-JANE`: 200 limit
  * `INFLUENCER-JOHN`: 200 limit
* URL links for tracking

**Distribution**: Each influencer shares their personal code.

## Code Required vs. Open Access

### When Webapp has "Code Required" enabled

* Customers must enter a valid code to start
* Only one campaign can be linked to the webapp
* Every order is tracked to a specific code

### When "Code Required" is disabled

* Anyone with the URL can place an order
* Codes are optional but can still be used
* Multiple campaigns can share the webapp
* Orders without codes are tracked as "organic"

## Common Questions

### Can I edit a code after creating it?

You can change limits and dates, but not the code text itself. Create a new code if you need a different code.

### What happens when a code expires?

Customers see an error message. Orders in progress may be affected depending on timing.

### Can a customer use multiple codes?

No, each order uses one code. If you want to offer multiple redemptions, create codes with appropriate limits.

### How do I handle code abuse?

* Use customer/address limits
* Monitor unusual patterns
* Deactivate compromised codes
* Create replacement codes for legitimate customers

### Can I delete unused codes?

Yes, but consider deactivating instead to maintain historical records.

## Related Topics

* [Campaigns](/campaign) — Assign codes to campaigns
* [Webapps](/webapp) — Configure code requirements
* [Orders](/orders) — Track which codes were used
