- Marketplace SDK concepts
Marketplace SDK packages
The Marketplace SDK is modular, allowing you to build robust and maintainable apps with optimized bundle sizes. You can install only the packages you need for the functionalities you want to develop. This topic describes the purpose of every required and optional SDK package so you can choose the ones you need for your application.
Here's an overview of all the SDK packages:
Required packages
client
The client package is required for all Marketplace apps. It connects your app to Sitecore, allowing the two to securely communicate. The SDK connects your app by loading it in Sitecore inside a sandboxed iframe. The iframe and its parent window securely communicate using the web browser's PostMessage API.
After initializing client, you can start making queries and mutations that do not require access to product-specific APIs.
Optional packages
All optional packages require the client package.
Optional packages give your app API access to specific Sitecore products or capabilities and are only required when your app is configured to use those APIs. Each optional package corresponds to a Sitecore product or capability that the Marketplace is compatible with.
Note the following about API requests:
- When using the Marketplace SDK built-in authorization, the SDK automatically authorizes your requests to all the Sitecore APIs your Marketplace app has access to, with no manual authorization required.
- All requests to Sitecore APIs must contain the Context ID of your SitecoreAI environment, which you can retrieve from the application context.
- Requests to Sitecore APIs only work in the SitecoreAI environments where your app is installed.
xmc
The xmc package provides type-safe interfaces for interacting with SitecoreAI APIs. You only need this package if you select SitecoreAI APIs during app configuration. Use it to integrate SitecoreAI functionalities into your app. The module supports the following APIs:
-
Authoring and Management GraphQL API - manage SitecoreAI content using GraphQL.
-
Sites REST API - manage SitecoreAI sites, site collections, jobs, languages, and more.
-
Pages REST API - manage SitecoreAI pages and page data.
-
Agent REST API - connect AI clients or enterprise systems to perform business-level actions in Sitecore, such as building pages, adding components, or uploading assets. The Agent API powers the Marketer MCP.
-
Search Configuration REST API - retrieve the configuration for your SitecoreAI search sources. The search configuration defines how content items are indexed and made searchable. For example, which fields you can search against, which fields you can use for filtering, and what data will be returned in search results.
ImportantFeature availability for the Search Configuration REST API is part of a phased rollout. Your organization may not have access to this functionality yet. It will become available when your environment is included in the rollout.
After initializing xmc, you can make API requests in the following ways:
- From the client side - start making queries and mutations that require access to SitecoreAI APIs.
- From the server side - if your app architecture supports server-side API calls to SitecoreAI APIs, you can use the experimental functions to access SitecoreAI APIs directly from the server.
ai
The ai package provides type-safe interfaces for interacting with AI skills APIs. AI skills APIs provide LLM-powered capabilities grounded in SitecoreAI data. You only need this package if you select AI skills APIs during app configuration. Use it to integrate AI functionalities into your app. The module supports the following APIs:
- Brand Review API - using AI-powered analysis, evaluate whether input content and assets comply with the guidelines defined in a brand kit. The API analyzes input content provided in the request, such as text, images, and metadata, by comparing it against brand kit sections to ensure alignment with tone of voice, visual identity, legal requirements, and accessibility standards.
After initializing ai, you can make API requests in the following ways:
- From the client side - start making mutations that require access to AI skills APIs.
- From the server side - if your app architecture supports server-side API calls to AI skills APIs, you can use the experimental functions to access AI skills APIs directly from the server.