Important
Customization is needed to correctly map fields from Commerce Optimizer to the Google Product Input. See the Customization section below.
- Commerce Optimizer Product Update:
com.adobe.commerce.storefront.events.product.aco - Commerce Optimizer Price Update:
com.adobe.commerce.storefront.events.price.aco
Some fields required by Google Merchant Center are not readily available in Commerce Optimizer. This application provides a product transformer transformers/product.js which contains functions to perform mapping from a Commerce Optimizer product to the Google Product Input format, but will likely require customizations to retrieve and construct these values correctly.
The following functions need to be customized:
getProductUrl: A basic function is provided to use theskufield from the Commerce Optimizer product and map to the template provided in thestore.urlTemplatemarket configuration variable (ie.https://mystore.com/products/{sku}). Customize this function to correctly construct your canonical product URLs so Google can correctly index your PDPs.transformPrice: A basic function is provided to retrieve the price returned from the Commerce Optimizer API. Customize this function if you have custom price functionality on top of the price returned by Commerce Optimizer.getAvailability: A basic function is provided to map theinStockattribute of the Commerce Optimizer product to the Google Product Availability enum. Customize this function to correctly pull product availability from your inventory management system.getShippingInfo: A basic function is provided to mapshippingMethod,shippingPriceandshippingCurrency(if present as customer attributes) from the Commerce Optimizer product to the Google Product Input's requiredshippingfield. Customize this function to pull shipping information as required.
This application 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 Google Merchant Center synchronization application.
Run the following command to install the AIO CLI.
npm install -g @adobe/aio-cli- Clone this repository:
git clone git@github.com:adobe-commerce/aco-google-merchant-center.git.
- 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 the Add service button.
- In the dropdown, select API.
- Select the I/O Events 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 Management API
- Click the Download all button in the top right of the Developer Console to download the Workspace JSON file
and save it locally (do not commit to source control). This file will be used to configure
the Adobe authorization environment variables via the
aio app use --mergeCLI command.
-
Copy the
env.exampleto 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.
- Google Merchant Center credentials
- Place your Google service account JSON file at
./google-creds.json - Run the helper script to add the credentials to your
.envfile:Or specify a custom path:./google-creds-to-env.sh
./google-creds-to-env.sh /path/to/creds.json - Verify
.envcontainsGOOGLE_CREDS_JSON={...}with your service account JSON
- Place your Google service account JSON file at
- Commerce Optimizer configuration
- ACO_API_BASE_URL: The base URL of the Commerce Optimizer API (ie.
https://na1-sandbox.api.commerce.adobe.com). - ACO_TENANT_ID: The Commerce Optimizer tenant identifier to synchronize with Google Product Feed.
- ACO_API_BASE_URL: The base URL of the Commerce Optimizer API (ie.
Complete the required configuration for mapping Commerce data to Google country/language markets by following the instructions in the ./config/markets/README.md documentation.
Complete the required configuration for mapping Commerce custom attributes to Google required fields by following the instructions in the ./config/attributeMapping/README.md documentation.
Run the following command:
npm installRun the following command to deploy your app 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.
See the following App Builder documentation for more info:
- Log in to the Developer Console.
- Navigate into the desired workspace (ie Stage).
- Subscribe to the Commerce Saas Catalog Events.
- Click the Add service button.
- In the dropdown, select Event.
- Select the Commerce Saas Catalog Events (beta) card.

- Click Next.
- Select the Instance ID you wish to subscribe to. This will be your Commerce Tenant ID.

- Click Next.
- Choose which events to subscribe to. Select Product Events ACO/CCDM and Price Events ACO/CCDM.

- Click Next.
- Select the OAuth Server-to-Server credential to add this event registration to.
- Click Next.
- Give the event registration a name.
- Click Next.
- Under How to receive events select Option 2 for Runtime action
- In the dropdown, select the
aco-google-merchant-center/catalogruntime action.
- Click Save configured events.
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}To run your actions locally use the aio app dev option. The app will run on localhost:9080 by default.
For more information about the local development, see here.
After starting the local server, you can send a test event via curl or any other HTTP client. Event payload examples can be found in the example_event_payloads directory.
For more information about testing this application with mock events, see the README inside the example_event_payloads directory.
If require-adobe-auth is true in app.config.yaml, an Authorization header with your Dev Console project's access token will need to be provided in the test event call.
An access token can be generated in your Developer Console in the Project's Credentials section.
curl -k -X POST https://localhost:9080/api/v1/web/aco-google-merchant-center/catalog \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {ims_access_token}" \
-d '{
"specversion": "1.0",
"type": "com.adobe.commerce.storefront.events.product.ccdm",
"source": "urn:uuid:fb58963f-d2e7-4ab4-83da-b6ff15b8ebc0",
"id": "23f76cef-9f14-44b1-bbd0-29995789c98e",
"time": "2025-12-17T12:00:00.000Z",
"datacontenttype": "application/json",
"data": {
"instanceId": "XdAHsRLZSusTtmCu3Kzobk",
"items": [
{
"sku": "bol-mam-tir-prm-2014",
"operation": "create",
"sources": [{ "locale": "en-US" }]
}
]
}
}'You should see a response like the example below. Logs will be output to the console.
{
"type": "com.adobe.commerce.storefront.events.product.ccdm",
"response": "Processed 1 item(s) across 1 market(s) for tenant: XdAHsRLZSusTtmCu3Kzobk"
}- Run
aio app testto run unit tests for ui and actions. - Run
aio app test --e2eto run e2e tests.
aio app deployto build and deploy all actions on Runtime and static files to CDN.aio app undeployto undeploy the app.
- 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 follow the instructions here
