---
title: "Guest migration data model"
slug: "guest-migration-data-model"
abstract: "Describes the standard data model for guest migration (Sitecore CDP Batch API)."
---
# Guest migration data model

When you create a batch file, ensure that you include all [required attributes](https://doc.sitecore.com/cdp/en/developers/api/batch-api/batch-api-guest/batch-file-formatting-requirements.html#UUID-4499e082-be7d-9ebb-4936-c178936c1e06_para-idm1903351877649584) in addition to any attributes from the following table:

| Attribute | Description | Type | Example(s) | Required/optional |
| --- | --- | --- | --- | --- |
| `ref` | A unique ID of the record that the organization generates for the purpose of identification outside of Sitecore CDP. | string UUID | `"888E80C5-370E-4EE8-80D7-3A89DC064509"` | Required |
| `schema` | The type of record contained in the `value` field that is being imported. | string | `"migration"` | Required |
| `mode` | Supports migration of guest entities including orders, browsing history, and flow execution history. | string | `"guest"` | Required |
| `value` | The container for the `migrateFrom` and `migrateTo` attributes. | container | N/A | Required |
| `migrateFrom` | The container for the `identifiers` array for the guest record. | container | N/A | Required |
| `identifiers` | The container for the `provider` and the `id` for the guest that is being migrated. | container | N/A | Required |
| `provider` | The provider of the `identifier`. | string | `"IDENTITY_SYSTEM"` | Required |
| `id` | The unique ID of the `identifier`. | string | `"BX_201504"` | Required |
| `migrateTo` | The container for the `identifiers` array for the guest record. | container | N/A | Required |

```json
{
   "ref":"888E80C5-370E-4EE8-80D7-3A89DC064509",
   "schema":"migration",
   "mode":"guest",
   "value":{
      "migrateFrom":{
         "identifiers":[
            {
               "provider":"IDENTITY_SYSTEM",
               "id":"BX_201504"
            }
         ]
      },
      "migrateTo":{
         "identifiers":[
            {
               "provider":"IDENTITY_SYSTEM",
               "id":"BX_201505"
            }
         ]
      }
   }
}

```