Expand my Community achievements bar.

Adobe Summit 2025: AEP & RTCDP Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.
SOLVED

AEP/RT_CDP : Schema migration to preprod environment

Avatar

Level 2

Hi Team,

 

in ABC named schema, i have fieldgroup 123 and identity PQR

I have already moved fieldgroup to preprod environment and identity is already created in Preprod

I have created package for this schema where fieldgroup and identity is already present.

 

Concern is for identity when i try to import package in preprod environment and click on modules that either needs to be created or existing can be use. 

I am able to use for fieldgroup but i am not able to see identity which is present in preprod and because of which i am not able to select.

 

i know other way is to create each field in stage but do we have any option where i can see identity and select as ues Existing?

 

Any help would be appreciated?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi @Parth1 ,

 

In AEP, when importing a package:

Field groups are matched by their meta:altId or display name.

Identities, however, are tied directly to fields inside the schema, and must match exactly in terms of:

Field name (e.g., _id, email)

Identity type (email, ECID, etc.)

Namespace ID

xdm:identity flag

Data type (string, integer, etc.)

If any of these differ (even slightly), AEP won’t surface the identity field as "existing", and you won’t be able to reuse it in the UI.

 

Solutions:

Option 1: Rebuild schema by referencing existing field group with the identity
Go to Schemas > Create Schema

  • Add your existing Field Group (123) that contains the identity (PQR)
  • If the identity is embedded in the field group, it will be pulled in and automatically recognized.
  • This avoids the "can't select identity" issue during package import.

Option 2: Modify the Package JSON (Advanced)

  • Open the exported package (typically JSON)
  • Look for the identity section like:
    "xdm:personID": {
    "type": "string",
    "xdm:identity": true,
    "meta:xdmType": "string",
    "meta:xdmField": true
    }
  • Ensure that the identity definition:
    • Matches exactly what's already in Preprod
    • Uses the correct identity namespace and xdm:identity: true flag

  • Then re-import the updated package.

Option 3: Use Experience Platform API

If you’re comfortable with APIs, you can:

  • GET the schema from Preprod

  • Check identity definition
  • PATCH or PUT to adjust the new schema to use the same identity field reference

In AEP, even if an identity is already in Preprod, you must define the identity in each schema that uses it. It’s not a global reusable identity like a field group - it must be declared per schema.

 

That’s why it’s not "selectable" - it's not reused like a field group; it must be re-declared exactly.

 

 

View solution in original post

5 Replies

Avatar

Correct answer by
Level 4

Hi @Parth1 ,

 

In AEP, when importing a package:

Field groups are matched by their meta:altId or display name.

Identities, however, are tied directly to fields inside the schema, and must match exactly in terms of:

Field name (e.g., _id, email)

Identity type (email, ECID, etc.)

Namespace ID

xdm:identity flag

Data type (string, integer, etc.)

If any of these differ (even slightly), AEP won’t surface the identity field as "existing", and you won’t be able to reuse it in the UI.

 

Solutions:

Option 1: Rebuild schema by referencing existing field group with the identity
Go to Schemas > Create Schema

  • Add your existing Field Group (123) that contains the identity (PQR)
  • If the identity is embedded in the field group, it will be pulled in and automatically recognized.
  • This avoids the "can't select identity" issue during package import.

Option 2: Modify the Package JSON (Advanced)

  • Open the exported package (typically JSON)
  • Look for the identity section like:
    "xdm:personID": {
    "type": "string",
    "xdm:identity": true,
    "meta:xdmType": "string",
    "meta:xdmField": true
    }
  • Ensure that the identity definition:
    • Matches exactly what's already in Preprod
    • Uses the correct identity namespace and xdm:identity: true flag

  • Then re-import the updated package.

Option 3: Use Experience Platform API

If you’re comfortable with APIs, you can:

  • GET the schema from Preprod

  • Check identity definition
  • PATCH or PUT to adjust the new schema to use the same identity field reference

In AEP, even if an identity is already in Preprod, you must define the identity in each schema that uses it. It’s not a global reusable identity like a field group - it must be declared per schema.

 

That’s why it’s not "selectable" - it's not reused like a field group; it must be re-declared exactly.

 

 

Avatar

Level 2

Currently moving ahead with option 1 which i was across but thanks for it.

 

I do want to know about option 2, how can we move import JSON file ?

i am not able to see any documentation for uploading JSON file.

 

Thanks.

Avatar

Level 4

Hi @Parth1 ,

 

Once the JSON has been modified, you can upload or import it back into AEP via the API.

 

Use the PUT /schemas/{schemaId}/schema-package endpoint to update an existing schema package. If you are creating a new package, you would use the POST /schemas/{schemaId}/schema-package endpoint.

 

Steps to upload via API:

  • First, make sure you have authentication tokens to authenticate API calls.
  • Use the POST or PUT method to import your JSON file into the AEP Schema Registry.

 

Example API Call (using curl for demonstration):

curl -X POST \
https://platform.adobe.io/data/core/schemas/{schemaId}/schema-package \
-H "Authorization: Bearer <your_access_token>" \
-H "x-api-key: <your_api_key>" \
-F "file=@/path/to/your/modified_schema_package.json"

 

Replace:

  • {schemaId}: The schema ID you want to update.

  • <your_access_token>: The token you obtained through Adobe OAuth.

  • <your_api_key>: The API key from your AEP integration.

Note: Ensure that the endpoint you're using is correct and matches the method you're invoking (POST or PUT).

 

Some helpful links:

https://experienceleague.adobe.com/en/docs/experience-platform/xdm/api/schemas

https://experienceleague.adobe.com/en/docs/experience-platform/xdm/api/overview

 

Also, do accept the solution if earlier or current answer worked for you so that anyone else also facing something similar can directly go to the right response.

 

Thanks

Avatar

Level 2

Basically its only API. its not uploading JSON way we used to import package in Adobe campaigns standard.

 

Thank you so much, i have already marked correct answer.

 

if i get to chance work on API then i will try above solution also.

Avatar

Level 4

Hi @Parth1 ,

 

Feel free to give it a try whenever you get a chance, and share your feedback afterward.

 

Thanks & Regards