# Manage referrals

> After you have created referrals in a campaign, you can create rules to reward customers for redeeming a valid referral code, import more codes, and edit, export, or delete existing codes.

> For the complete documentation index, see [llms.txt](https://docs.talon.one/llms.txt).

## Redeem a referral code

To reward your customers for redeeming a valid referral code, you can [create a
rule](/docs/product/rules/create-and-manage-rules#create-a-promotion-rule) with a
[**Referral code is valid** condition](/docs/product/rules/conditions/available-conditions.md#referral-conditions)
and any desired effects, such as a direct discount.

Learn more about it in [our Developer
Docs](/docs/dev/integration-api/api-effects#referrals).

1. Click **Create Rule** in the **Rule Builder** section of your campaign.
1. In **Conditions**, click **Add Conditions**.
1. In **Referral**, click **Referral code is valid**.
1. Click the check mark to the right of the condition.

The condition is saved. You can then add an effect.

:::note
You can [create a condition](/docs/product/rules/conditions/use-conditions.md) for a rule to be
triggered if the referral code is valid without the code having to be redeemed. This is
useful if, for example, you want your customers to know that the code is valid but can
only be redeemed if they meet other conditions, such as a given minimum session total.
:::

## Edit an individual referral code

You can modify some characteristics of a referral after it has been created. For example,
you can add an expiration date.

:::tip
We recommend always setting up a start date and an expiration date for your referral
codes.
:::

1. On the left-side menu of your campaign, click <Referrals className="icon"/> **Referrals**.
1. Select the checkbox to the left of the referral code you want to edit.
1. At the top of the page, click <Menu className="icon"/> > <Edit className="icon"/> **Edit referral**.
1. Edit the required information, such as date, limits, or attributes, and click **Update Referral**.

  :::note
  For security reasons, you cannot edit the **Advocate's Integration ID** or the code itself.
  :::

## Edit a referral batch

You can modify some characteristics of all the referrals from a given batch at the same
time. For example, you can add an expiration date.

1. On the left-side menu of your campaign, click <Referrals className="icon"/> **Referrals**.
1. Select the checkbox to the left of the referral code whose batch you want to edit.
1. At the top of the page, click <Menu className="icon"/> > <Edit className="icon"/> **Edit batch**.
1. Edit the required information, such as date, limits, or attributes.
1. Click **Update Batch** and confirm your action in the pop-up that appears.

## Delete referral codes

You can delete referrals at any time.

1. On the left-side menu of your campaign, click <Referrals className="icon"/> **Referrals**.
1. Select the checkbox to the left of the referral code you want to delete.

   :::note
   You can select as many codes as you want. To select all the referrals displayed on the
   same page, select the **Code** checkbox at the top of the referrals list.
   :::

1. At the top of the page, click <Menu className="icon"/> > <Delete className="icon"/> **Delete 1 referral**.
1. In the confirmation window that appears, click **Delete Referrals**.

## Export referral codes

You can obtain a CSV file with referral codes from your campaign. For example, you can
use it to import the referrals into another marketing tool, like a mailing tool.

1. On the left-side menu of your campaign, click <Referrals className="icon"/> **Referrals**.
1. Click the arrow to the right of the <Import className="icon"/> **Import Referrals**
   button to display the dropdown menu, then click <Export className="icon"/> **Export Referrals**.
1. Use the tabs to choose which codes you want to export:
   - To export all the codes created after a date you select in **Created after**, click
     **After a Specific Date**.
   - To export all the codes from the same batch you specify in **Batch ID**, click
     **Specific Batch**.
   - To export all the codes created after one of your previous exports, click
     **After Recent Export**. You can choose the specific export by using the
     **Created after** dropdown menu. This option is available only if you have exported
     codes.
1. In **Date format**, select the date format of your choice.

   :::note
In the exported file, all timestamp values follow `UTC+00:00`.
:::

1. Click **Export Data**.

## Related pages

- [Basic referral](/docs/product/tutorials/referrals/basic-referral.md)
- [Create a referral code](/docs/product/rules/effects/use-effects.md#create-a-referral-code)
