# Create a stores-based campaign

> After you link stores to your campaign, you can define rules to offer discounts to customers who spend in these stores.

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

Let's imagine our Application contains stores located in several European cities.
We want to give customers a 10% discount when they purchase from stores in a
specific location, for example Hamburg. To do this, we
[create a standard campaign](/docs/product/campaigns/create-and-manage-campaigns.md#create-a-campaign-from-scratch)
with a [promotion rule](/docs/product/rules/overview.md#promotion-rules).

:::note
  Add stores to your Application programmatically using
the [Create store](/management-api#tag/Stores/operation/createStore) endpoint.
:::

## Link stores to the campaign

Let's create a standard campaign and link stores to our campaign to ensure that it's
evaluated only for stores located only in Hamburg.

1. In your Application, click **Create Campaign** > **From scratch** >
**Standard campaign**.
1. Under **Store-based campaign evaluation**, click **Specific stores** and select
stores located in Hamburg to link to your campaign.
1. Fill in all the other required campaign details and click **Create Campaign**.

You can also edit the list of stores linked to your campaign in the campaign's
 <Settings className="icon" /> **Settings** > **Stores** > **Edit Stores** section.

## Award a discount for stores in a specific location

Let's [build a rule](/docs/product/rules/create-and-manage-rules.md#create-a-promotion-rule)
to issue a 10% [discount on the session total](/docs/product/rules/effects/use-effects.md#discount-session-total)
for stores in a specific location.

Talon.One evaluates our campaign for only these stores, and we want to offer a
discount on all purchases. This means we don't need to set any
[conditions](/docs/product/rules/conditions/available-conditions.md) for this rule.

:::important
The `storeIntegrationId` of a linked store must be passed at checkout time
(when the [customer session](/docs/dev/concepts/entities/customer-sessions.md) closes). This
ensures that the checkout is happening in a store based in Hamburg.
:::

Let's name the rule `Hamburg store campaign`. It has one condition and one effect.

### Condition

**Always trigger effects.**

### Effect

**Discount session total**:
- **Name** is `10% off`
- **Discount value** is `[Session.Total]*10%`

## Related pages

- [Evaluate stores-based campaigns](/docs/product/applications/evaluation-order-for-rules-and-filters.md#evaluate-stores-based-campaigns)
- [Display stores](/docs/product/applications/display-stores.md)
