Important
Installation of the custom ACO SFCC Cartridge is required: int_adobe_commerce_optimizer.
The ACO SFCC Starter Kit runs on top of App Builder.
Also see App Builder Architecture.
See App Builder Getting Started documentation.
Follow the steps below to install and configure the ACO SFCC Starter Kit.
Run the following command to install the AIO CLI.
npm install -g @adobe/aio-cli- Clone the ACO SFCC Starter Kit Repo (this repository).
- Clone the ACO SFCC Cartridges Repo.
- Follow the instructions in the ACO SFCC Cartridges Repo README to install and enable the custom cartridge on your SFCC instance.
- Log in to the Developer Console.
- Click on Create project from template.
- Select App Builder.
- Give your project a name and a title.
- Click Save.
- Select the Stage workspace.
- Add the required API services to your new App Builder project.
- Click Add service.
- In the dropdown, select API.
- Select the Adobe Commerce Optimizer Ingestion card.
- Click Next.
- Click Next.
- Select the checkbox next to the Default - Cloud Manager profile.
- Click Save configured API
- Repeat the above steps for the following APIs to add them to your credential:
- I/O Events
- I/O Management API
- Click the Download all button in the top right of the Developer Console to download the Workspace JSON file
and save it as
workspace.jsonin the./scripts/onboarding/configdirectory. This file will be used to configure theIO_*environment variables.
-
Copy the
env.distto a new.envfile. -
Run the following commands to connect your starter kit with the App Builder project configured above.
aio login aio console org select # Search for and select the organization that your Developer Console project belongs to. aio console project select # Search for and select the Developer Console project created above. aio console workspace select # Search for and select the desired workspace (ie. Stage). aio app use --merge # Confirm the highlighted project matches the one configured above. # This command will update your .env file with AIO related environment variables.
- ACO Configuration
- ACO_TENANT_ID: You ACO instance ID found in CCM.
- ACO_REGION: The region your ACO instance is deployed in (ie. na1 or eu1).
- ACO_ENVIRONMENT_TYPE: The type of ACO instance (sandbox or production).
- ACO_STOREFRONT_URL: The URL of your ACO site. Optional.
- Auth Credentials
- OAUTH_CLIENT_ID: Found in Dev Console in the credential configured above.
- OAUTH_CLIENT_SECRET: Found in Dev Console in the credential configured above.
- OAUTH_TECHNICAL_ACCOUNT_ID: Found in Dev Console in the credential configured above.
- OAUTH_TECHNICAL_ACCOUNT_EMAIL: Found in Dev Console in the credential configured above.
- OAUTH_ORG_ID: Found in Dev Console in the credential configured above.
- IO_CONSUMER_ID: Found in the JSON file downloaded from Dev Console. Corresponds to key project.org.id
- IO_PROJECT_ID: Found in the JSON file downloaded from Dev Console. Corresponds to key project.id
- IO_WORKSPACE_ID: Found in the JSON file downloaded from Dev Console. Corresponds to key project.workspace.id.
- SFCC Configuration
- SFCC_API_BASE_URL: The base URL of your SFCC instance’s SCAPI endpoint.
- SFCC_REALM_ID: Your SFCC instance’s Realm ID.
- SFCC_INSTANCE_ID: Your SFCC instance’s instance ID.
- SFCC_ORGANIZATION_ID: Your SFCC instance’s organization ID.
- SFCC_SITE_URL: The URL of the frontend of your SFCC site. Optional.
- SFCC_ADMIN_SITE_URL: The URL of the Business Manager backend of your SFCC site. Optional.
- SFCC_SITE_ID: The id of the SFCC site to sync.
- SFCC_LOCALES_TO_SYNC: A comma separated list of the locales to sync (ie. en-US,fr).
- SFCC Credentials
- SFCC_AUTH_URL: The URL of the SFCC OAuth endpoint (ie. https://account.demandware.com/dwsso/oauth2/access_token).
- SFCC_CLIENT_ID: The ID of the SFCC Admin API client.
- SFCC_CLIENT_SECRET: The client secret associated with the SFCC Admin API client above.
Run the following command:
npm installRun the following command to deploy your starter kit to your Developer Console project:
aio app deployTip
Run the aio app deploy command with --force-build --force-deploy flags to force a clean build.
Run the following command to onboard the App Builder actions from your starter kit to your Developer Console project:
npm run onboardAfter the onboard command has completed, validate that the actions have been successfully deployed to the your Developer Console project.
The ACO SFCC Starter Kit App Builder application provides a series of Runtime Actions.
Action are defined in the app.config.yaml file.
Asynchronous actions run in a non-blocking context in the App Builder Runtime. They have a max timeout of 3 hours.
This action performs a full synchronization of all products, price books, and prices for the configured SFCC Site ID and locales.
Location: actions/full
Entities Syncronized:
- Metadata
- Products
- Categories
- Price Books
- Prices
This action retrieves recent changes that have been made in SFCC since the last full or delta sync action and synchonizes them with Commerce Optimizer.
By default, this action is scheduled to run every hour (cron: 15 * * * *) at 15 minutes past the hour using the
App Builder Cron action configuration.
Please adjust this schedule to align with the
SFCC job configuration
and to best fit your catalog data update frequency in the App Configuration File.
Example:
triggers:
everyHour:
feed: /whisk.system/alarms/alarm
inputs:
cron: 15 * * * *
trigger_payload:
type: sfcc.delta.sync
data: {}
rules:
everyHourRule:
trigger: everyHour
action: delta-backoffice/consumerLocation: actions/delta
Entities Syncronized:
- Products
- Categories
- Price Books
- Prices
This action retrieves all price books in SFCC and syncronizes them with Commerce Optimizer.
Location: actions/price-book
Entities Syncronized:
- Price Books
This action reads all metadata defined in the data/metadata.js file and synchonized them with
Commerce Optimizer for each locale configured in the SFCC_LOCALES_TO_SYNC environment variable.
Location: actions/metadata
This action retrieves all categories in SFCC and syncronizes them with Commerce Optimizer.
Location: actions/category
Entities Syncronized:
- Categories
Note
Only letters, numbers, and hyphens are allowed in ACO category slugs.
While syncronizing, the SFCC category ids are sanitized to remove special characters. Example:
parent_cat/child_cat_1/child_cat_2/child_cat_3 becomes parentcat/childcat1/childcat2/childcat3
This action retrieves product data for the provided SKUs (SFCC product IDs) from SFCC and synchronizes them with Commerce Optimizer.
Location: actions/product
Synchronous actions run in a blocking context in the App Builder Runtime. They have a max timeout of 60 seconds and are executed from the provided UI.
This action invokes an asynchronous action (like Full Sync) so that it can run in the background instead of the synchronous web context.
Location: actions/spa/ingestions
This action retrieves the timestamps or all of the last executed sync actions and serves the purpose of providing the context of when the sync actions were last executed successfully. These values are pulled from AIO state.
Location: actions/spa/last-sync-timestamps
This action retrieves the metadata that will be syncronized during the Metadata Sync action. To customize the synchronized metadata, edit the data/metadata.js file.
Location: actions/spa/list-metadata
This action retrieves syncronized product details from the Commerce Optimizer Storefront API. This can be executed for a given SKU, price book, and locale from the provided UI in order to validate syncronized data. This validation performs the same storefront query that would be executed on a PDP page.
Location: actions/spa/storefront
This action performs a simple authenticated API call to one of the custom SCAPI endpoints. This validation ensures the sync actions can communicate with SFCC.
Location: actions/spa/connectivity/salesforce
This action performs a call to one of the Commerce Optimizer ingestion endpoints using the ACO TS SDK. This validation ensures the sync actions can communicate with Commerce Optimizer using the SDK.
Location: actions/spa/connectivity/aco
See the following App Builder documentation for more info:
aio rt logs --tailList all runtime actions that have been activated.
aio rt activation listView the logs for a specific activation_id.
aio rt logs ${activation_id}See App Builder App State Docs.
In order to improve the behavior of the ACO SFCC Starter Kit sync actions, the following state keys are used:
lastSyncTimestamplastFullSyncRunlastDeltaSyncRunlastPriceBookSyncRunlastMetadataSyncRunlastSpecificProductsSyncRunfullSyncInProgressdeltaSyncInProgress
The lastSyncTimestamp key tracks the last time a full sync or delta sync operation retrieved data from SFCC and is
used as the starting point from which to retrieve SFCC data in future delta sync operations.
- Key:
lastSyncTimestamp - Example Value:
2025-07-24T00:13:45.341Z - Type: ISO 8601 String
The lastFullSyncRun key tracks the last time a full sync was successfully finished.
- Key:
lastFullSyncRun - Example Value:
2025-07-24T00:13:45.341Z - Type: ISO 8601 String
The lastDeltaSyncRun key tracks the last time a delta sync was successfully finished.
- Key:
lastDeltaSyncRun - Example Value:
2025-07-24T00:13:45.341Z - Type: ISO 8601 String
The lastPriceBookSyncRun key tracks the last time a price book sync was successfully finished.
- Key:
lastPriceBookSyncRun - Example Value:
2025-07-24T00:13:45.341Z - Type: ISO 8601 String
The lastMetadataSyncRun key tracks the last time a metadata sync was successfully finished.
- Key:
lastMetadataSyncRun - Example Value:
2025-07-24T00:13:45.341Z - Type: ISO 8601 String
The lastCategorySyncRun key tracks the last time a category sync was successfully finished.
- Key:
lastCategorySyncRun - Example Value:
2025-07-24T00:13:45.341Z - Type: ISO 8601 String
The lastSpecificProductsSyncRun key tracks the last time a specific product sync was successfully finished.
- Key:
lastSpecificProductsSyncRun - Example Value:
2025-07-24T00:13:45.341Z - Type: ISO 8601 String
The fullSyncInProgress key indicates if an existing full sync action is already in progress. If this value is true
and another full sync or a delta sync operation if requested, it will be skipped.
- Key:
fullSyncInProgress - Example Value:
true - Type: Boolean
The deltaSyncInProgress key indicates if an existing delta sync action is already in progress. If this value is true
and another delta sync or a full sync operation if requested, it will be skipped.
- Key:
deltaSyncInProgress - Example Value:
false - Type: Boolean
aio app state get lastSyncTimestampaio app state delete lastSyncTimestampaio app devto start your local Dev server- App will run on
localhost:9080by default
By default the UI will be served locally but actions will be deployed and served from I/O Runtime.
- Run
aio app testto run unit tests for ui and actions - Run
aio app test --e2eto run e2e tests
See App Builder Deployment Overview.
aio app deployto build and deploy all actions on Runtime and static files to CDNaio app undeployto undeploy the app
Run the following command to register your events with your Dev Console Project:
npm run onboardSee App Builder Configuration Files.
You can generate this file using the command aio app use.
# This file must **not** be committed to source control
## please provide your I/O Runtime credentials
# AIO_RUNTIME_AUTH=
# AIO_RUNTIME_NAMESPACE=- Main configuration file that defines an application's implementation.
- More information on this file, application configuration, and extension configuration can be found here
- You have two options to resolve your actions' dependencies:
-
Packaged action file: Add your action's dependencies to the root
package.jsonand install them usingnpm install. Then set thefunctionfield inapp.config.yamlto point to the entry file of your action folder. We will usewebpackto package your code and dependencies into a single minified js file. The action will then be deployed as a single file. Use this method if you want to reduce the size of your actions. -
Zipped action folder: In the folder containing the action code add a
package.jsonwith the action's dependencies. Then set thefunctionfield inapp.config.yamlto point to the folder of that action. We will install the required dependencies within that directory and zip the folder before deploying it as a zipped action. Use this method if you want to keep your action's dependencies separated.
-
While running your local server (aio app dev), both UI and actions can be debugged, to do so open the vscode debugger
and select the debugging configuration called WebAndActions. Alternatively, there are also debug configs for only UI
and each separate action.
To use typescript use .tsx extension for react components and add a tsconfig.json and make sure you have the below
config added:
{
"compilerOptions": {
"jsx": "react"
}
}

