# Campaigns migration

Once your app has been released with Batch SDK, you will be able to migrate your push campaigns to Batch. The migration steps vary depending on the [migration type](https://doc.batch.com/getting-started/other/implementation-guides/migration/..#migration-types) you choose:

* If you chose the **Hot Swap** method, you need to migrate your campaigns as soon as possible since the new opt-in users are only reachable via Batch.
* For a **Staged Migration**, all users will still be reachable from both your previous provider and Batch, so you can migrate the campaigns gradually over days/weeks.

## Campaigns creation

For both migration types, you need to create in parallel:

1. A campaign targeting the imported tokens, **with** the previous provider's payload
2. A campaign targeting the rest of the userbase, **without** the previous provider's payload

### Targeting imported users

After we’ve completed your tokens import, a new filter will be available:

1. **Imported tokens only**, which are the manually imported tokens, not yet detected by our SDKs
2. **Collected tokens only**, which are the tokens already collected through the Batch SDK

<figure><img src="https://1464139620-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUIK868wiiK9XOVyETGZS%2Fuploads%2F2gfKhRr2RTJFrTlnOHuA%2FScreenshot%202025-03-24%20at%2010.42.47.png?alt=media&#x26;token=db9e9d25-8446-4782-a777-c89c763a6462" alt="Screenshot of the Batch dashboard showing the feature &#x22;Filter&#x22; from the targeting block with the description of the 2 options in a drop-down menu: &#x22;Collected tokens only&#x22; and &#x22;Imported tokens only&#x22; " width="434"><figcaption></figcaption></figure>

{% hint style="warning" %}
Refer to the [Targeting](https://doc.batch.com/getting-started/features/customer-engagement-platform/orchestration/targeting#targeting-collected-or-imported-push-tokens) section to know more about this segmentation feature.
{% endhint %}

There are a few things you need to keep in mind before targeting your newly imported users:

* The **Imported tokens only** filter is not targeted **by default** when you create a new campaign. Don't forget to select it the next time you want to send a notification.
* The first time you send a notification to your imported users, Batch will **clean** the inactive or invalid tokens that may come from your previous push provider. Depending on how many invalid tokens we find, the number of imported tokens will decrease a few days after the import.

{% hint style="danger" %}
If you select the **Imported tokens only** filter, you must include the previous provider's payload in your campaign to contact your users correctly (more details [here](https://doc.batch.com/getting-started/other/implementation-guides/migration/..#push-payload)).
{% endhint %}

### Campaigns statistics

The campaign statistics are provided by the Batch SDK. This is why you may notice that the campaign statistics are not available for campaigns that target users who don’t have Batch SDK.

## Imported tokens and APIs

The imported tokens can be targeted via the [Campaign API](https://app.gitbook.com/s/CL8wF0y1T2vLnm3yR2MW/api/cep/campaigns) (via "Filter push tokens" or through [Audiences](https://doc.batch.com/getting-started/features/customer-engagement-platform/profiles/audiences) if you have imported the Custom User ID with the push tokens).

Your API-scheduled notifications can be migrated in the same way as described above.

{% hint style="warning" %}
You can find more details in our [Data lifecycle](https://doc.batch.com/getting-started/features/customer-engagement-platform/profiles/import-tokens#data-lifecycle-when-importing-tokens-and-their-data) documentation.
{% endhint %}

{% hint style="danger" %}
Anytime you target the imported tokens (even when using the API), don't forget to **include the previous provider's payload**.
{% endhint %}
