Sitecore AI Content Migration – Create transfer and chunks from source environment

To understand the end to end flow for migrating the content between environments, please see this blog post – Link

Pre-requisite – Automation Client and JWT Token

Before starting you will need the JWT token for the request to be made to the Content Transfer API. You should be Sitecore Admin or owner.

To generate the Automation client and token see this blog post – Link

Step 1 – Create Transfer

Used in source environment

Request-

Http Method – POST

URL – https://your-xmc-instance.sitecorecloud.io/sitecore/api/content/transfer/v1/transfers

Headers

Authorization – Bearer token

Payload

{
  "Configuration": {
    "DataTrees": [
      {
        "ItemPath": "/sitecore/content/Home",
        "Scope": "ItemAndDescendants",
        "MergeStrategy": "OverrideExistingItem"
      }
    ],
    "Database": "master"
  },
  "TransferId": "1ec8122c-a25e-49b0-a0fb-bd47dfccdf8b"
}

Response

202 – Accepted

Note the Transfer ID – 1ec8122c-a25e-49b0-a0fb-bd47dfccdf8b

Transfer ID will be used in next API request.

Step 2 – Get Content Transfer

Used in source environment

Get content transfer status or wait for the transfer to be ready

Request

Http Method – GET

Url- https://your-xmc-instance.sitecorecloud.io/sitecore/api/content/transfer/v1/transfers/{transferId}/status

Example – https://your-xmc-instance.sitecorecloud.io/sitecore/api/content/transfer/v1/transfers/1ec8122c-a25e-49b0-a0fb-bd47dfccdf8b/status

Headers

Authorization – token

Payload– Not Applicable

Response

{
    "State": "Completed",
    "ChunkSetsMetadata": [
        {
            "ChunkSetId": "d71458d7-db08-4a74-a125-0d7d4eabf491",
            "ChunkCount": 1,
            "TotalItemCount": 2
        }
    ]
}

Note the chunkSetId – d71458d7-db08-4a74-a125-0d7d4eabf491

Step 3 – Retrieve a chunk

Used in source environment

Method- Get

Url – https://your-xmc-instance.sitecorecloud.io/sitecore/api/content/transfer/v1/transfers/{transferID}/chunksets/{chunksetID}/chunks/{chunkID}

Example – https://your-xmc-instance.sitecorecloud.io/sitecore/api/content/transfer/v1/transfers/1ec8122c-a25e-49b0-a0fb-bd47dfccdf8b/chunksets/d71458d7-db08-4a74-a125-0d7d4eabf491/chunks/0

Headers

Authorization – token

Payload – Not applicable

Response-

Save chunk –

Save response to file (response.bin)

Delete the transfer

Used in source environment

Method – Delete

Url – https://your-xmc-instance.sitecorecloud.io/sitecore/api/content/transfer/v1/transfers/{transferID}

Example- https://your-xmc-instance.sitecorecloud.io/sitecore/api/content/transfer/v1/transfers/1ec8122c-a25e-49b0-a0fb-bd47dfccdf8b

Headers

Authorization – token

Payload – Not applicable

Response

202 Accepted

Summary of API’s

HTTP MethodAPI EndpointPurpose
POST/sitecore/api/content/transfer/v1/transfersCreate a new content transfer.
GET/sitecore/api/content/transfer/v1/transfers/{transferId}/statusRetrieve the status of a specific transfer.
GET/sitecore/api/content/transfer/v1/transfers/{transferId}/chunksets/{chunksetId}/chunks/{chunkId}Download or retrieve a specific chunk from a chunk set.
DELETE/sitecore/api/content/transfer/v1/transfers/{transferId}Delete or cancel a specific transfer.

References

https://developers.sitecore.com/changelog/sitecoreai/01072026/content-transfer-api-and-item-transfer-api-now-available

https://doc.sitecore.com/sai/en/developers/sitecoreai/deploying-sitecoreai/migrating-content-between-sitecoreai-environments.html#alternatives-to-other-package-designer-tasks

https://api-docs.sitecore.com/sai/content-transfer-api

https://api-docs.sitecore.com/sai/item-transfer-api

A Modern Approach to Sitecore Content Migration Using the Content Transfer API and Item Transfer API

Effective 7 July 2026, the Package Designer is no longer available in Sitecore AI. As a result, creating and installing Sitecore packages through the Sitecore Client is no longer supported.

For many years, the Package Designer was one of the most widely used, simplest, and most reliable methods for transferring content between Sitecore environments. However, Sitecore has long provided an alternative through the Sitecore CLI, which supports content serialization and deployment in a more modern, automation-friendly manner.

With the removal of the Package Designer, organizations are encouraged to adopt the Sitecore CLI and the newer Content Transfer and Item Transfer APIs for moving content between Sitecore AI environments.

With the content transfer API uses chunked streaming there is no need to break large migrations into multiple smaller packages formelry we used to do this with the zip package. With the new approach a .raif file is created with the no manual file download or upload.

            SOURCE ENVIRONMENT
      +--------------------------------+
      |   Sitecore CM (Source)         |
      |                                |
      |  Content Transfer API          |
      +---------------+----------------+
                      |
            1. Create Transfer
                      |
                      ▼
              Transfer Service
                      |
            2. Export Content
                      |
                      ▼
             Chunk Set Created
                      |
            3. Download Chunks
                      |
                      ▼
           -----------------------
       Content Transfer (Chunked Streaming)
           -----------------------
            4. Upload Chunks
                      |
                      ▼
            DESTINATION ENVIRONMENT
      +--------------------------------+
      |  Content Transfer API          |
      +---------------+----------------+
                      |
           5. Complete Chunk Set
                      |
                      ▼
            RAIF File Generated
                      |
           6. Verify Blob Exists
             GET /sources/blobs
                      |
                      ▼
             Item Transfer API
                      |
           7. Start Import
                      |
                      ▼
           Import Processing
                      |
                      ▼
          Sitecore Master Database
                      |
                      ▼
           Content Available

Sitecore CDP – Guest Data Extensions

Guest data extensions enable your organization to store any additional information around customer interactions, beyond the predefined Sitecore CDP guest attributes

While creating Guest the response provide the gust ref. Using this reference we can add data extension to the guest. See screen below to get the various ways to get gust referece-

You can also get the ref from portal for the respective guest (set the debug mode)-

Go to Portal and Guest page. Search the gust with name-

Click on the settings button (only available in debug mode). Note the reference of guest.

Create Data Extension for Guest-

https://{{apiEndpoint}}/{{restApiVersion}}/25aef18c-8a29-46f0-9dd5-0ab3994025ee/extExt

Ext – is the extension key

Request-

Ensure request is sent using Basic Auth where User Name is the Client Key and Password is Api Token. Take the credentials from portal (API Access menu option).

Response-

Check the extension data in portal, under properties tab-

You can create multiple gust extension for given guest, although it is recommended to have one-

cURL code snippet-

curl --location --request POST 'https://api.boxever.com/v2/guests/25aef18c-8a29-46f0-9dd5-0ab3994025ee/extExt' \
--header 'Authorization: Basic <<Enter Toekn>>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "key": "default",
    "isPremiumClient": true
}'

C# code snippet-

var client = new RestClient("https://api.boxever.com/v2/guests/25aef18c-8a29-46f0-9dd5-0ab3994025ee/extExt");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic <<Enter Token>>");
request.AddHeader("Content-Type", "application/json");
var body = @"{
" + "\n" +
@"    ""key"": ""default"",
" + "\n" +
@"    ""isPremiumClient"": true
" + "\n" +
@"}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Python code snippet-

import http.client
import json

conn = http.client.HTTPSConnection("api.boxever.com")
payload = json.dumps({
  "key": "default",
  "isPremiumClient": True
})
headers = {
  'Authorization': 'Basic <<Entert Token>>',
  'Content-Type': 'application/json'
}
conn.request("POST", "/v2/guests/25aef18c-8a29-46f0-9dd5-0ab3994025ee/extExt", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Javascript code snippet-

var settings = {
  "url": "https://api.boxever.com/v2/guests/25aef18c-8a29-46f0-9dd5-0ab3994025ee/extExt",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Authorization": "Basic <<Enter Token>>",
    "Content-Type": "application/json"
  },
  "data": JSON.stringify({
    "key": "default",
    "isPremiumClient": true
  }),
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Similarly you can update and delete guest extension data. See the links here

Update guest data extension-

https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform–data-model-2-1/using-the-update-guest-data-extension-function-in-sitecore-cdp-rest-api.html

Delete guest data extension-

https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform–data-model-2-1/using-the-delete-guest-data-extension-function-in-sitecore-cdp-rest-api.html

Reference-

https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform–data-model-2-1/sending-additional-guest-data-to-sitecore-cdp-using-rest-api.html

https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform–data-model-2-1/sitecore-cdp-guest-extensions-data-model-for-rest-api.html

Loading

Evaluating CDP vendor capabilities

Evaluating a CDP platform is very crucial. An informed decision has to be taken while selecting a CDP platform based on necessary information from various stakeholders in an organization.

Feedback from peers or other factors may influence the preferences for certain vendors. Understanding business goals and required use cases and scenarios better uunderstands which platforms better suits your organization.

The following steps could help you to choose a CDP platform based on the inputs from the team players that better fits the organization goals.

Process for evaluating vendor capabilities-

Reference – CDP Institute

Understanding business goals for evaluating CDP vendor

All businesses has the priorities between teams, departments, timelines, systems and success metrics. A list of company objectives can be acquired by series of interviewsbetween various stakeholders including leadership groups, key team members and partners. Also a technical features or requirements come into play for theses stake holders.

While acquiring a CDP platform you have to also see if you have team and process in place to support the initiactive along side the technology.

These are some of the business goals that a company should consider while acquiring the CDP platform-

Conslidating Customer Data– Collecting a customer data from various sources such as email, website, social media and purchase history and unifing the customer profile that can be used for better decision making, customer segmentation and personalization.

Improving marketing & advertising performance – More targeted and relevant marketing and advertising campaigns can be created by better understanding customer preferences and behaviours abd their needs.

Personalize customer expereinces – Creating a personalized expereince for the customers across various cahnnels by a CDP with the collected data to increase the customer loyalty, satisfaction and retention.

Increase Sales – Business can identify cross sell and up-sell opportunities using insights provided by CDP where a customer is interested in an offer or service which results in incresed customer statisfaction and loylaity, ultimately increasing sales.

Offer strongest match products or services to customer – Business can identify and offer services a customer are most likely interested in product and services using CDP. This helps in customer retention and increase in revenue.

Avaliability of data – Another factor to consider is to see if the data taht will used in the CDP originates in the organization.

Although the choosen CDP platform best fits for the business goals it mainly the people and proccess makes a biger difference in determining the success or failure of the CDP implementaion. Understaing which people, departments or teams will need access to platform and theis usage is crucial before acquiring the CDP platform. Apart from thsi training s to the teams invloved and how their day to day work changes with thew new platform should be given including the tehcnology team for security and technical support.

Hence here are some of the CDP requirements needs to be considered-

CDP platform integrates with the comapny systems – CDP can integrate with other ssytems such as CRM, narketing automation and ecommerce platforms to get the complete view of customer and enable seamless data flow across different departments.

Real-time data processing is possible – Business should be able to respond to customer quickly on their behaviour and personlaised expereince . CDP should be able to process this seamlessly.

Able to structure organization data – Data in the organization may not be structured and come from multiple channels. CDP should be able to organize data in a structured way.

Audience Segmentation – Based on customer location, behaviour and interests, CDP should be able to segment the data. These helps in creating a targetd campaigns and peronlaized messages that relates to specific groups or customers.

Customer journey orchestration – Customer journey orchestration (CJO) is the process of coordinating a customer’s experience in real-time, and driving the customer’s individualized experiences from their first interaction with your brand through purchase and lifetime support.

Data Exports to marketing & advertising platforms – CDP can export customer data to marketing and advertising platforms such as Google Ads, Facebook. This helps in creating an effective campaigns and reach customers across different channels.

Compliance specifically security and privacy – CDP ensures GDPR and CCPA compliance. This helps to build trusts with customers that their personal data is secured and compiant. This avoids any legal issues.

Sitecore CDP allows you to collect, connect and activate customer dataacross all the digital channels for the organization

Creating authorization for automation client in Sitecore AI

This guide explains how to create and configure authorization for an automation client in Sitecore AI. It covers the prerequisites, steps to register or configure the client, generating the required credentials, assigning appropriate permissions, and validating authentication. By following this guide, you will enable automation tools, scripts, or external applications to securely authenticate with Sitecore AI APIs while adhering to security best practices and the principle of least privilege.

Create the Client credetntials

To generate the environment specific client credentitals select the project and the environment the Client ID and secret to be created for.

Client ID and secret is deplayed. Client secret cannot be shown again, so note this for future use.

Generating JWT token for automation client

Url – https://auth.sitecorecloud.io/oauth/token

client_id – Use your client id

client_secret – use your client secret

audience – https://api.sitecorecloud.io

Use following cuRL command to run the get the token for this client-

curl --location 'https://auth.sitecorecloud.io/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: __cf_bm=LMWhyHFoTdNlwF2MqFxH9AVUQ3FleNAC2Tc3dis4aE8-1784278799.3461177-1.0.1.1-dsinakNmEeHaipvn0cpRI9_Q9p7BQc6JpaI8UYtd24vUJibuJ5xg8GMigR12QLFPl4Sttk1A193_e4mqNdj_Y_23zXG5kHynOcDPJnkuTJu2e9Z.iRZnF5TDBaHSWHjw; did=s%3Av0%3Ae990257e-954d-4c0b-9885-648b225b8582.gnfIQeI146L5TXZF13lXJ%2FSKo%2BQ0L4PDj0xUdYVyqyo; did_compat=s%3Av0%3Ae990257e-954d-4c0b-9885-648b225b8582.gnfIQeI146L5TXZF13lXJ%2FSKo%2BQ0L4PDj0xUdYVyqyo' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=xmcloud.cm:admin' \
--data-urlencode 'client_id=YOUR_CLIENT_ID' \
--data-urlencode 'client_secret=YOUR_CLIENT_SECRET' \
--data-urlencode 'audience=https://api.sitecorecloud.io'

This should generate the JWT token for you to use this to perform automation-

Version issues with Sitecore Graphql Search Query

In this blog post we saw how to use Sitecore Grpahql Search query to filter the items.

But search query has issues with results getting same items with different version in Preview mode. This works fine for the published item (edge) as a single version of item is published.

I created a new version of the same item-

Using the same query

# Write your query or mutation here

query SearchQuery($pageSize: Int = 10, ) {
  search(
    where: {
      AND: [
        {
          name: "_path"
          value: "{B08684BB-3CB0-4DFE-A378-054E26ECC5AE}"
          operator: CONTAINS
        }
        { name: "ProductId", value: "bali-power-bank-3000mah" }
      ]
    }
    first: $pageSize
  ) {
    total
    results {
      id
      name
      version
      url {
        path
      }
	... on Product{
        productId{value}
        productFeature{value}
      }
    }
  }
}

See the output results in same item with versions available in Sitecore-

{
  "data": {
    "search": {
      "total": 2,
      "results": [
        {
          "id": "8716FE4AD58345589AB04369C39F5CC0",
          "name": "bali-power-bank-3000mah",
          "version": 2,
          "url": {
            "path": "/Data/Commerce-Data/Product-Data/bali-power-bank-3000mah"
          },
          "productId": {
            "value": "bali-power-bank-3000mah"
          },
          "productFeature": {
            "value": "UPDATE - official-camera - Product Feature. JIGA power bank is a high-quality battery pack, with all-day powerThe power bank can charge your phone at least 3-5 times,the perfect partner for gamers, camping and business trips."
          }
        },
        {
          "id": "8716FE4AD58345589AB04369C39F5CC0",
          "name": "bali-power-bank-3000mah",
          "version": 1,
          "url": {
            "path": "/Data/Commerce-Data/Product-Data/bali-power-bank-3000mah"
          },
          "productId": {
            "value": "bali-power-bank-3000mah"
          },
          "productFeature": {
            "value": "official-camera - Product Feature. JIGA power bank is a high-quality battery pack, with all-day powerThe power bank can charge your phone at least 3-5 times,the perfect partner for gamers, camping and business trips."
          }
        }
      ]
    }
  }
}

See the highlighted fields in result. Same ID, multiple result set with different versions. Unfortunately, there is no option here to get the latest version. Sitecore has clarified this and raised a bug for same as of October 2025. this might be resolved in future. The related public reference number is DEVEX-2992.

How to solve this issue- This needs to be handled in headless app.

Headless app needs to filter this for each item and should pick only latest version from the result set for the same item.

function GetLatestVersion(products: ProductResult[]) 
{ 
  if (products.length === 0) 
  { return null; } 
  const latestVersions = Object.values( products.reduce<Record<string,        ProductResult>>((acc, item) => { 
  const existing = acc[item.id]; 
  if (!existing || item.version > existing.version) 
  { 
    acc[item.id] = item; 
  } 
  return acc; 
}, 
{})); 
 return latestVersions; 
}

This should only provide the latest version of item.

Loading

XMCloud Graphql Search query

To search items in Sitecore you can use Graphql search query. It uses where conditions which can have AND and OR operators on any fields in an item.

See below examples for using search query.

I have following list of items in Sitecore-

I want to search by ProductId. This item has only one version.

Use below search query-

query SearchQuery($pageSize: Int = 10, ) {
  search(
    where: {
      AND: [
        {
          name: "_path"
          value: "{B08684BB-3CB0-4DFE-A378-054E26ECC5AE}"
          operator: CONTAINS
        }
        { name: "ProductId", value: "bali-power-bank-3000mah" }
      ]
    }
    first: $pageSize
  ) {
    total
    results {
      id
      name
      version
      url {
        path
      }
      ... on Product{
        productId{value}
        productFeature{value}
      }
    }
  }
}

We used the where condition with the AND operator.

AND operator has _path and ProductId for searching a secific product or a list of products matching the search criteria.

Here the value of _path is the folder/path where you want to make the query. It is always good to provide the path to increase the performance of search.

ProductId is the field in item to search on. You can also apply more filters here, for example template you want to search.

Output of the above query-

{
  "data": {
    "search": {
      "total": 1,
      "results": [
        {
          "id": "8716FE4AD58345589AB04369C39F5CC0",
          "name": "bali-power-bank-3000mah",
          "version": 1,
          "url": {
            "path": "/Data/Commerce-Data/Product-Data/bali-power-bank-3000mah"
          },
          "productId": {
            "value": "bali-power-bank-3000mah"
          },
          "productFeature": {
            "value": "official-camera - Product Feature. JIGA power bank is a high-quality battery pack, with all-day powerThe power bank can charge your phone at least 3-5 times,the perfect partner for gamers, camping and business trips."
          }
        }
      ]
    }
  }
}

Loading

Sitecore Personalize – Create Fullstack Interactive Experience

Run interactive expereince using the friendlyID attribute. When the expereinces are created in Sitecore CDP an ID is created for the experience. Use this ID to run an experiemnet.

How to create a fullstack experience in Sitecore CDP-

In the menu option click on Experiences => Full stack

This should show the list of existing experiences . Click on Create Experience

Select Interactive Experimence option-

Provide a name and note the ID –

Click on the Configure API response option-

Create a json response. Use “Copy Path as Freemaker” to copy the field name. In this case guest.title, guest.firstname etc.

One variant

You can have only one variant in an experience. Optionally, choose who will receive this experience using the audience filter. If you want to have multiple variants, create an experiment instead.

Click Save and “Preview API” to test the response

Note: dont forget to Save before testing the response.

Search for the guests. See how to create guests here <<enter blog details>>

Response for the guest that is searched. Back to “Interactive Expereience”

Error- if you receive this error. I had to add “” to the field names-

Run the Expereince immediately or schedule-

Experience is now live and the performance can be tracked in “Operational” Tab

At this point of time there are no executions. Check the “Operational” tab-

See this Full Stack Experiences list-

Next run the Experience in Postman or from the Web Site.

Loading

Sitecore Personalize – Run Fullstack Experience using Rest API endpoint

Continuing with the post – Sitecore Personalize – Create Fullstack Experience

In earlier post created a new Fullstack experience named- pastoral grill experience and ID for same was “”

Get the ID of the expereince in “Details” tab and a code snippet to run this in frontend. But in this post will see how to interact using rest api endpoint.

Send request to Rest API to recieve response-

https://{{apiEndpoint}}/{{restApiVersion}}/callFlows

See here API target endpoint to be used based on region-

https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform–data-model-2-1/walkthrough–preparing-to-integrate-with-sitecore-cdp.html

https://doc.sitecore.com/cdp/en/developers/sitecore-customer-data-platform–data-model-2-1/base-url-of-sitecore-cdp-apis-for-v2-1-data-model.html

Request and Response-

clientKey- I have client key as a ennvironment variable. See how to find Client Key

pointOfSale- Enter your configured point of sale. See how to create or get POS

friendlyId- Fullstack/Web Epxerience friendly id. See how to get interactive experience id

In the operational tab there is a spike at the time the request was sent-

Loading