# Create and manage campaigns

> Create a campaign to manage your promotional activities in Talon.One.

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

You can create a campaign in one of the following ways:
- [Create a campaign from scratch.](#create-a-campaign-from-scratch)
- [Create a campaign from a template.](#create-a-campaign-from-a-template)

## Create a campaign from scratch

1. Select the Application where you want to create your campaign.
1. From the left-side menu, click <Add className="icon"/> **Create Campaign**.
1. Click **From scratch**, and select the [type of campaign](/docs/product/campaigns/overview#campaign-types)
   you want to create.
1. In **Name**, type a name for the campaign.
1. (Optional) In **Features**, select which features you want to enable, for example
   **Coupons** or **Loyalty**.

   :::note
   You can [enable or disable a feature](/docs/product/campaigns/settings/manage-campaign-features.md)
   after creating your campaign. The **Giveaways** feature is not available in item
   campaigns.
   :::

1. (Optional) From the **Campaign access group** dropdown, select a [campaign access group](/docs/product/account/account-settings/manage-campaign-groups.md) to add your campaign to.

   :::note
   This option appears only if there are one or more campaign access groups connected to
   the Application.
   :::

1. From the **Campaign evaluation group** dropdown, select a [campaign evaluation group](/docs/product/applications/manage-campaign-evaluation.md) to add your campaign to.

   :::note
   - Unless you select another group, the campaign is added to the default campaign
   evaluation group. You can change this at any time in the **Campaign Evaluation**
   section of your Application.
   - You cannot add your campaign to a locked group.
   - You can add standard campaigns only to groups with a session [evaluation scope](/docs/product/applications/manage-campaign-evaluation.md#set-campaign-evaluation-scope).
   :::

1. In **Store-based campaign evaluation**, select the type of [stores-based evaluation](/docs/product/applications/evaluation-order-for-rules-and-filters.md#evaluate-stores-based-campaigns)
   you want for your campaign.
   - **All stores**: Your campaign is evaluated for all the stores that are present in
     the Application.
   - **Specific stores**: Your campaign is evaluated only for stores you select. Each store is
     linked to the campaign. You can select stores by their **Store name** and
    **Store integration ID**.

   :::note
   This option appears only if there are stores in your Application. To create stores in
   your Application, use the [Create stores](/management-api#tag/Stores/operation/createStore)
   endpoint.

   Read [evaluating stores-based campaigns](/docs/product/applications/evaluation-order-for-rules-and-filters.md#evaluate-stores-based-campaigns)
   to understand how stores-based campaigns are evaluated.
   :::

1. Click **Create Campaign**.

The [dashboard][campaign dashboard] of the campaign appears.
The campaign state is <StateLabel type="disabled" name="Disabled" />.

:::tip
Add at least one valid [rule](/docs/product/rules/create-and-manage-rules.md)
to be able to either [test](#test-a-campaign)
or [activate](#activate-a-campaign) the campaign.
:::

## Create a campaign from a template

Before you start, ensure that the [template](/docs/product/campaigns/templates/overview.md)
you want to use is enabled and available in the Application where you want to create the
campaign.

To create a campaign from a template:

1. Select the Application where you want to create your campaign.
1. From the left-side menu, click <Add className="icon"/> **Create Campaign**.
1. Click <Template className="icon"/> **From a template**.
1. Select the template you want to use and click **Create Campaign**.

1. If attributes in the template are not connected to the Application in which you are creating a campaign, you can see them in a list that appears.

   To connect an attribute from the list to your current Application:
   1. In **Connect Attributes**, click the attribute name in the list.
   1. In **Edit** > **Connected Applications**, select the Applications where you want the attribute to be available, including the current Application.
   1. Click **Update Attribute**.
   1. Refresh the **Connect Attributes** page to continue creating a campaign from this template.
   1. Repeat these steps for all the listed attributes.

   :::note
   To connect an attribute to an Application, ensure you are an admin or the Application admin for every Application the attribute is currently connected to.
   :::

1. In **Details**, enter the basic information for the campaign:
   - In **Name**, type a name for the campaign.
   - In **Description**, enter a description to help you identify the campaign.
   - (Optional) In **Tags**, enter any tags you want to apply, and separate them with
     commas.
   - From the **Campaign evaluation group** dropdown, select a [campaign evaluation group](/docs/product/applications/manage-campaign-evaluation.md) to add your campaign to.

   :::note
   - Unless you select another group, the campaign is added to the default campaign
     evaluation group. You can change this at any time in the **Campaign Evaluation**
     section of your Application.
   - You cannot add your campaign to a locked group.
   - You can add standard campaigns only to groups with the session [evaluation scope](/docs/product/applications/manage-campaign-evaluation.md#set-campaign-evaluation-scope).
   :::

1. In **Placeholders**, enter or select values for the placeholders defined when creating
   the template.

   Admins, Application admins, and users with permission to [create and edit](/docs/product/account/account-settings/manage-roles.md) campaigns
   can do the following:
   - Make changes to the Rule Builder after creating a campaign.
   - Edit the placeholder values on the **Properties** page of the campaign settings.
   - If you have defined a value range for placeholders of type  `Number` or `Percent`, you can enter a value that falls within that range.
   - If you have connected an attribute picklist to a placeholder of type `List of strings`, you can choose from the picklist values in the dropdown.

   :::note
   If you cannot see specific conditions or effects in the Rule Builder, check if they are [hidden](/docs/product/applications/manage-rule-builder-settings.md) in your destination Application settings.
   :::

1. In **Attributes**, you can define the mandatory attributes of the campaign.
1. In **Budgets**, you can edit the budgets of the campaign.
1. In **Stores**, select the type of [stores-based evaluation](/docs/product/applications/evaluation-order-for-rules-and-filters.md#evaluate-stores-based-campaigns)
   you want for your campaign.

   - **All stores**: Your campaign is evaluated for all the stores that are present in
     the Application.
   - **Specific stores**: Your campaign is evaluated only for stores you select. Each store is
     linked to the campaign. You can select stores by their **Store name** and
     **Store integration ID**.

   :::note
   This option appears only if there are stores in your Application. To create stores in
   your Application, use the [Create stores](/management-api#tag/Stores/operation/createStore)
   endpoint.

   Read [evaluating stores-based campaigns](/docs/product/applications/evaluation-order-for-rules-and-filters.md#evaluate-stores-based-campaigns)
   to understand how stores-based campaigns are evaluated.
   :::

1. If the [**Coupons** feature](/docs/product/campaigns/settings/manage-campaign-features.md)
   was enabled in the campaign from which the template was created, in **Coupons**, you can
   do the following:
   - Create a [universal code](/docs/product/campaigns/coupons/create-coupons.md#generate-a-universal-code).
   - Create [random codes](/docs/product/campaigns/coupons/create-coupons.md#generate-random-codes).
   - Create [gift cards](/docs/product/campaigns/coupons/create-coupons.md#generate-a-gift-card).
   - [Import coupons](/docs/product/campaigns/coupons/manage-coupons.md#import-coupon-codes).
1. (Optional) In **Schedule**, set start and expiration dates for your campaign.
1. Click **Create Campaign**.

The created campaign is available in your Application. The campaign state
is <StateLabel type="disabled" name="Disabled" />.

## Test a campaign

When a campaign is created, its default state is <StateLabel type="disabled" name="Disabled" />.

If [campaign staging and revisions][staging-revisions-feature] is enabled
for your Application, you can [stage the campaign](#staging) for testing and [test it](#test)
independently without affecting your production runs.

### Staging

Staging a campaign moves it from <StateLabel type="disabled" name="Disabled" />
to <StateLabel type="staged" name="Staged" />, where it can be tested as if it were running, but without any triggered [effects][effects] being retained.
After you stage a campaign, you cannot move it back to <StateLabel type="disabled" name="Disabled" />.

To stage a campaign:

1. Add at least one [rule](/docs/product/rules/create-and-manage-rules.md)
   to the <StateLabel type="disabled" name="Disabled" /> campaign.
1. In the **State** section of the [campaign dashboard][campaign dashboard],
   click **Stage Campaign**.

The campaign moves to the <StateLabel type="staged" name="Staged" /> state.

### Test

To trigger the effects of a <StateLabel type="staged" name="Staged" /> campaign,
use a [testing API key][testing-key]. When a testing API key is present,
it is automatically used for authentication, and all the requests you make are [dry requests][dry-requests].

If you're unsure of which key your testing environment uses, contact your development team.

When you are satisfied with the results of your testing,
verify that your [budget limits][campaign-budgets] are correct and
[activate the campaign](#activate-a-campaign).

:::note
If [campaign staging and revisions][staging-revisions-feature] is not enabled,
add at least one [rule][rules]
and [activate the campaign](#activate-a-campaign).
You can set a [start time][schedule] before activating it.

To test your scenario, you can replicate the campaign
in a [sandbox Application](/docs/product/applications/overview.md#application-environments),
which serves as a test environment.
:::

## Activate a campaign

If [campaign staging and revisions][staging-revisions-feature] is enabled
for your Application, you can activate <StateLabel type="staged" name="Staged" /> campaigns.
After that, you can no longer edit the [rules][rules] and [settings][settings].
To make changes to an active campaign, [revise it][revise-campaign].

To activate a campaign:

1. Open the [campaign dashboard][campaign dashboard].
1. In the **State** section, click **Activate Campaign**.

The campaign state changes to <StateLabel type="running" name="Running" />.
If the campaign has a future [start time][schedule],
its state changes to <StateLabel type="scheduled" name="Scheduled" /> instead.

:::important
Keep in mind that your Talon.One plan may contain a limit of the number of active
campaigns. See your [plan details](/docs/product/account/overview.md).
:::

:::note
- If [campaign staging and revisions][staging-revisions-feature] is not enabled,
  you can activate <StateLabel type="disabled" name="Disabled" /> campaigns
  after adding at least one [rule][rules].
- If you do not have permission to activate a campaign, in the [campaign dashboard][campaign dashboard],
  in the **State** section, click **Request Campaign Activation** and select an admin from the
  list to notify via email.
  - If your campaign is not activated on time, you can click <Ext className="icon" /> > **Resend Activation Request**
    to resend the request or select another admin to notify.
:::

## Disable a campaign

You can disable any <StateLabel type="running" name="Running" /> campaign
if you no longer want its rules to be evaluated.
You can also disable <StateLabel type="scheduled" name="Scheduled" />
and <StateLabel type="expired" name="Expired" /> campaigns.

To disable a campaign:

1. In the **State** section of the [campaign dashboard][campaign dashboard], click **Disable Campaign**.
1. In the pop-up that appears, click **Disable**.

The campaign state changes to <StateLabel type="disabled" name="Disabled" />.

### Disable multiple campaigns

On the <Campaigns className="icon"/> **Campaigns** page, when you filter for
<StateLabel type="expired" name="Expired" /> campaigns,
you can also select and disable up to 50 of them in a single operation.

To disable multiple expired campaigns:

1. On the <Campaigns className="icon"/> **Campaigns** page,
   click the <StateLabel type="expired" name="Expired" /> filter.
1. Select one or more filtered campaigns, and click **Disable Expired Campaigns**.
1. In the pop-up that appears, click **Disable Expired Campaigns**.

The state of the campaigns you disabled changes to <StateLabel type="disabled" name="Disabled" />.

## Delete a campaign

You can
delete <StateLabel type="staged" name="Staged" />, <StateLabel type="disabled" name="Disabled" />,
and <StateLabel type="archived" name="Archived" /> campaigns at any time.

:::caution
- The campaign delete action cannot be undone.
- When you delete a campaign, any referral and coupon codes created in the campaign
  are also permanently deleted.
- After you delete a campaign, your customers can no longer use any coupon or
  referral codes they obtained through it.
:::

:::important
To delete an [active campaign](/docs/product/campaigns/overview.md#campaign-states),
first [disable it](#disable-a-campaign).
:::

To delete a campaign:

1. In the **State** section of the [campaign dashboard][campaign dashboard],
   click <ExtV className="icon" /> > **Delete Campaign**.
1. In the pop-up that appears, click **Delete**.

### Delete multiple campaigns

On the <Campaigns className="icon"/> **Campaigns** page,
when you filter for <StateLabel type="disabled" name="Disabled" /> campaigns,
you can also select and delete up to 50 of them
in a single operation.

To delete multiple disabled campaigns:

1. On the <Campaigns className="icon"/> **Campaigns** page,
   click the <StateLabel type="disabled" name="Disabled" /> filter.
1. Select one or more filtered campaigns, and click **Delete Disabled Campaigns**.
1. In the pop-up that appears, click **Delete Disabled Campaigns**.

## Archive a campaign

You can archive a campaign if you are not using it but do not want to delete it permanently.
The rules of <StateLabel type="archived" name="Archived" /> campaigns are not evaluated.

:::note
Only <StateLabel type="disabled" name="Disabled" /> campaigns
with at least one [rule][rules]
and <StateLabel type="staged" name="Staged" /> campaigns can be archived.
:::

To archive a campaign:

1. In the **State** section of the [campaign dashboard][campaign dashboard],
   click <ExtV className="icon" /> > **Archive Campaign**.
1. In the pop-up that appears, click **Archive**.

The campaign state changes to <StateLabel type="archived" name="Archived" />.
You can find it in the **[Archived][archived]** tab.

## Related pages

- [Manage campaign budgets](/docs/product/campaigns/settings/manage-campaign-budgets.md)
- [Create coupons and gift cards](/docs/product/campaigns/coupons/create-coupons.md)
- [Display campaigns](/docs/product/applications/display-campaigns.md)
- [Campaign insights](/docs/product/campaigns/analytics/campaign-insights.md)
- [Create templates](/docs/product/campaigns/templates/create-templates.md)

[campaign dashboard]: /docs/product/campaigns/overview.md#the-campaign-dashboard
[tags]: /docs/product/campaigns/settings/update-campaign-details.md
[application dashboard]: /docs/product/campaigns/analytics/application-dashboard.md
[staging-revisions-feature]: /docs/product/applications/manage-general-settings.md#campaign-staging-and-revisions
[schedule]: /docs/product/campaigns/settings/manage-campaign-schedule.md
[effects]: /docs/product/rules/effects/overview.md
[campaign-budgets]: /docs/product/campaigns/settings/manage-campaign-budgets.md
[settings]: /docs/product/campaigns/settings/overview.md
[rules]: /docs/product/rules/create-and-manage-rules.md
[revise-campaign]: /docs/product/campaigns/revise-campaigns.md
[archived]: /docs/product/applications/display-campaigns.md#list-campaigns
[testing-key]: /docs/product/applications/manage-api-keys.md#create-a-testing-api-key
[dry-requests]: /docs/dev/integration-api/best-practices.md#dry-requests
