### Example Automated Commerce Extensibility Setup Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/developer-agent/coding-tools.md This example demonstrates the interactive prompts and output during the automated setup of the Commerce Extensibility App for the checkout starter kit. It covers project selection, configuration, and tool installation. ```shell aio commerce extensibility app-setup 🚀 Adobe Commerce Extensibility App Setup ✔ Logged in 📁 Working directory: /Users/username/projects/my-commerce-project ✔ Which starter kit would you like to use? Checkout Starter Kit ✔ Enter a name for your project directory: my-extension ✔ Which coding agent would you like to install the skills for? Cursor 📦 Cloning Checkout Starter Kit... ✔ Repository cloned Using npm (package-lock.json found) ✔ Dependencies installed 📋 Current Adobe I/O Console configuration: Org: My Organization (1234567) Project: My Commerce Project (1234567890123456789) Workspace: Stage (9876543210987654321) ✔ Do you want to continue with this configuration? (Answer "No" to select a different org/project/workspace) No 🔧 Selecting Adobe I/O Console org, project, and workspace... ? Select Org: My Organization Org selected My Organization You are currently in: 1. Org: My Organization 2. Project: 3. Workspace: ? Select Project: My Commerce Project Project selected : My Commerce Project You are currently in: 1. Org: My Organization 2. Project: My Commerce Project 3. Workspace: ? Select Workspace: Stage Workspace selected Stage You are currently in: 1. Org: My Organization 2. Project: My Commerce Project 3. Workspace: Stage ✅ Console configured: Org: My Organization Project: My Commerce Project Workspace: Stage 🔐 Configuring workspace credentials and services... ✔ Workspace configuration loaded ✔ OAuth server-to-server credentials already configured ✔ All required services available in organization ✔ Subscribed to: Adobe Commerce as a Cloud Service 📋 Configuring Checkout Starter Kit... Creating .env from env.dist... ✔ Select tenant (type to search) My Commerce Instance: https://.api.commerce.adobe.com//graphql ✔ Commerce instance configured ✔ Enter the event prefix for your workspace: my-prefix ✔ Workspace IDs configured ✔ OAuth credentials configured ✔ Checkout Starter Kit configured 🔧 Installing Commerce Extensibility tools and agent skills... ✔ Commerce Extensibility tools installed 🎉 App setup complete! 📁 Project directory: /Users/username/projects/my-commerce-project/my-extension Next steps: 1. cd into your project directory 2. Restart your coding agent to load the Commerce Extensibility tools and skills ``` -------------------------------- ### Custom Installation Script with Error Handling Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/app-management/installation/customize.md Implement robust custom installation scripts by including error handling. This example demonstrates how to catch errors during database initialization and log them appropriately. ```javascript import { defineCustomInstallationStep } from "@adobe/aio-commerce-lib-app/management"; export default defineCustomInstallationStep(async (config, context) => { const { logger } = context; logger.info("Initializing database..."); try { if (!config.businessConfig?.schema) { throw new Error("Business configuration schema is required"); } logger.info(`Setting up database for ${config.metadata.displayName}`); // Database initialization logic await initializeDatabase(); logger.info("Database initialized successfully"); return { status: "success", message: "Database tables and indexes created", }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); logger.error(`Database initialization failed: ${errorMessage}`); throw error; } }); ``` -------------------------------- ### Complete app.commerce.config Example Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/app-management/define-app.md This example demonstrates a full `app.commerce.config` file, including metadata, business configuration schema, eventing, webhooks, and installation settings. Ensure correct imports from `@adobe/aio-commerce-lib-app/config`. ```javascript import { defineConfig } from "@adobe/aio-commerce-lib-app/config" export default defineConfig({ metadata: { id: "my-commerce-application", displayName: "My Commerce Application", description: "This is a description for my application", version: "1.0.0" }, businessConfig: { schema: [ { name: "api-name", label: "API name", type: "text", default: "", }, { name: "api-endpoint", label: "API Endpoint", type: "url", default: "https://api.example.com", }, { name: "api-key", label: "API Key", type: "password", }, { name: "level", label: "Risk Level", type: "list", options: [ { label: "Low", value: "low" }, { label: "Medium", value: "medium" }, { label: "High", value: "high" }, ], default: "medium", selectionMode: "single", }, ], }, eventing: { commerce: [ { provider: { label: "Commerce Events Provider", description: "A description for your Commerce Events provider.", }, events: [ { name: "observer.catalog_product_save_commit_after", fields: [{ name: "sku" }], label: "Product Save Commit After", description: "Used to react to a product save in Commerce", runtimeActions: ["my-package/handle-event"], priority: true, }, ], }, ], external: [ { provider: { label: "External Events Provider", description: "A description for your External Events provider.", }, events: [ { name: "external.sample_event", label: "External Sample Event", description: "An event reacting to something in an external system.", runtimeActions: ["my-package/handle-event"], }, ], }, ], }, webhooks: [ { label: "Product save webhook", description: "Notify an external system when a product is saved", category: "append", webhook: { webhook_method: "observer.catalog_product_save_after", webhook_type: "after", batch_name: "product_batch", hook_name: "notify_hook", method: "POST", url: "https://my-app.example.com/webhooks/product-save", }, }, ], installation: { messages: { preInstallation: "Do something before installation", postInstallation: "Do something after installation", }, customInstallationSteps: [ { name: "custom-step", description: "Run custom logic after installation", script: "./scripts/custom.js", }, ], }, }); ``` -------------------------------- ### Clone and Start Runtime Connector Source: https://github.com/adobedocs/commerce-extensibility/blob/main/README.md Clone the devsite-runtime-connector repository and start its development server for local setup. ```bash git clone https://github.com/aemsites/devsite-runtime-connector cd devsite-runtime-connector npm install npm run dev ``` -------------------------------- ### Clone and Start Code Server Source: https://github.com/adobedocs/commerce-extensibility/blob/main/README.md Clone the adp-devsite repository and start its development server for local setup. ```bash git clone https://github.com/AdobeDocs/adp-devsite cd adp-devsite npm install npm run dev ``` -------------------------------- ### Start Content Server Source: https://github.com/adobedocs/commerce-extensibility/blob/main/README.md Run this command to start the content server for local development. ```bash npm run dev ``` -------------------------------- ### Install Dependencies Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/admin-ui-sdk/app-registration.md Run `npm install` to install all project dependencies, including the newly added `@adobe/uix-guest`. ```bash npm install ``` -------------------------------- ### Deployment Output Example Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/webhooks/tutorial/index.md This is an example of the output you can expect after a successful deployment, showing deployed action URLs and static asset information. ```terminal ✔ Built 2 action(s) for 'application' ✔ Building web assets for 'application' ✔ Deployed 1 action(s) for 'application' ✔ Deploying web assets for 'application' ✔ All static assets for the App Builder application in workspace: application were successfully deployed to the CDN. Files deployed : * 2 HTML page(s) * 2 Javascript file(s) * 3 .map file(s) * 1 CSS file(s) Your deployed actions: web actions: -> [https://1234567-appbuilderforextens-stage.adobeio-static.net/api/v1/web/appbuilderforextensibility/testwebhook](https://1234567-appbuilderforextens-stage.adobeio-static.net/api/v1/web/appbuilderforextensibility/testwebhook) To view your deployed application: -> [https://1234567-appbuilderforextens-stage.adobeio-static.net/index.html](https://1234567-appbuilderforextens-stage.adobeio-static.net/index.html) To view your deployed application in the Experience Cloud shell: -> [https://experience.adobe.com/?devMode=true#/custom-apps/?localDevUrl=https://1234567-appbuilderforextens-stage.adobeio-static.net/index.html](https://experience.adobe.com/?devMode=true#/custom-apps/?localDevUrl=https://1234567-appbuilderforextens-stage.adobeio-static.net/index.html) skipping publish phase... Successful deployment ``` -------------------------------- ### Define Installation Messages Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/app-management/installation/customize.md Configure messages to display to users before and after the installation process. These messages help guide the user through any prerequisites or post-installation steps. ```javascript import { defineConfig } from "@adobe/aio-commerce-lib-app/config" export default defineConfig({ metadata: { // ... }, installation: { messages: { preInstallation: "This app requires configuration A & B to be completed before clicking Install.", postInstallation: "Configure your email settings to complete the setup.", }, }, }); ``` -------------------------------- ### Run Automated Commerce Extensibility Setup Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/developer-agent/coding-tools.md Execute this command to automate the setup of your Adobe Commerce extensibility workspace. Follow the interactive prompts to configure your Adobe Developer Console project, clone starter kits, and install necessary tools and agent skills. ```bash aio commerce extensibility app-setup ``` -------------------------------- ### Start Observability Message Queue Consumers Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/observability/installation.md Start consumers for processing observability data asynchronously. Use the --single-thread flag for basic setup. ```bash bin/magento queue:consumers:start commerce.observability.log --single-thread ``` ```bash bin/magento queue:consumers:start commerce.observability.metrics --single-thread ``` ```bash bin/magento queue:consumers:start commerce.observability.trace --single-thread ``` -------------------------------- ### Define a Custom Installation Step Script Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/app-management/installation/customize.md Create a custom installation script by exporting a default function using `defineCustomInstallationStep`. This function receives configuration and context, and should return a status object. ```javascript import { defineCustomInstallationStep } from "@adobe/aio-commerce-lib-app/management"; export default defineCustomInstallationStep(async (config, context) => { const { logger, params } = context; logger.info("Installation step started"); // Your installation logic here logger.info("Installation step completed"); return { status: "success", message: "Custom installation step completed", timestamp: new Date().toISOString(), }; }); ``` -------------------------------- ### Install and Use Node.js Version 22 Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/checkout/getting-started.md Use this command with Node Version Manager (nvm) to install and switch to Node.js version 22, a prerequisite for the checkout starter kit. ```bash nvm install 22 && nvm use ``` -------------------------------- ### Upgrade Commerce and Clear Cache (On-Premises) Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/observability/installation.md For on-premises installations, run setup upgrade and clear the cache after enabling the module. ```bash bin/magento setup:upgrade && bin/magento cache:clean ``` -------------------------------- ### Define Custom Installation Steps Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/app-management/installation/customize.md Specify custom scripts to run during the application installation. Scripts are executed sequentially and can be used for tasks like configuring webhooks or initializing databases. ```javascript import { defineConfig } from "@adobe/aio-commerce-lib-app/config" export default defineConfig({ metadata: { // ... }, installation: { messages: { preInstallation: "Please ensure all prerequisites are met before installation.", }, customInstallationSteps: [ { script: "./scripts/configure-webhooks.js", name: "Configure Webhooks", description: "Set up webhook endpoints for order notifications", }, { script: "./scripts/initialize-database.js", name: "Initialize Database", description: "Create required database tables and indexes", }, ], }, }); ``` -------------------------------- ### Install App Builder Dependencies Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/events/journaling-tutorial/runtime-action-code-journaling-api.md Install the required SDKs and libraries for App Builder projects before building and deploying. ```bash npm install @adobe/aio-sdk npm install @adobe/aio-lib-state npm install @adobe/aio-lib-ims ``` -------------------------------- ### Install Observability Module with Composer Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/observability/installation.md Use Composer to install the out-of-process observability module. Ensure you specify the correct version. ```bash composer require magento/module-out-of-process-observability=^1.1.0 --with-dependencies ``` -------------------------------- ### Install Compatible Admin UI SDK Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/checkout/getting-started.md When installing the Admin UI SDK, use this composer command to ensure compatibility with the checkout starter kit, requiring version 3.0 or higher. ```bash composer require "magento/commerce-backend-sdk": ">=3.0" ``` -------------------------------- ### Install Admin UI SDK for On-premises Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/admin-ui-sdk/installation.md Install the Admin UI SDK on an on-premises instance by adding the module to composer.json, updating dependencies, and then upgrading Commerce, reindexing, and clearing the cache. ```bash composer require "magento/commerce-backend-sdk": ">=1.0" ``` ```bash composer update ``` ```bash composer update magento/commerce-backend-sdk ``` ```bash bin/magento setup:upgrade ``` ```bash bin/magento indexer:reindex ``` ```bash bin/magento cache:clean ``` -------------------------------- ### Install Admin UI SDK for Cloud Infrastructure Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/admin-ui-sdk/installation.md Use this command to install or update the Admin UI SDK on a cloud instance. Ensure your composer.json file is updated before running composer update. ```bash composer require "magento/commerce-backend-sdk": ">=3.0" ``` ```bash composer require "magento/commerce-backend-sdk": ">=1.0" ``` ```bash composer update ``` ```bash composer update magento/commerce-backend-sdk ``` -------------------------------- ### Select Starter Kit Prompt Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/developer-agent/coding-tools.md Example prompt during the `tools-setup` process for selecting the desired starter kit. This choice configures the tooling for your project type. ```shell ? Which starter kit would you like to use? ❯ Integration starter kit Checkout starter kit ``` -------------------------------- ### Install Out-of-Process Shipping Methods Module Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/checkout/shipping-install.md Use this Composer command to install the necessary module for enabling out-of-process shipping methods in Adobe Commerce. Ensure you have completed the getting started and configuration steps. ```bash composer require magento/module-out-of-process-shipping-methods --with-dependencies ``` -------------------------------- ### Navigate to Starter Kit Directory Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/developer-agent/coding-tools.md Changes the current directory to the cloned starter kit. This is a prerequisite for running setup commands within the project. ```bash cd commerce-integration-starter-kit ``` ```bash cd commerce-checkout-starter-kit ``` -------------------------------- ### Navigate and Copy Environment File Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/integration/create-integration.md Change to the downloaded directory and copy the example environment file to create your .env file. ```bash cd && cp env.dist .env ``` -------------------------------- ### Debugger Output Example Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/events/tutorial/debugging.md This output is displayed in the terminal when the app starts in debug mode using `aio app dev`. ```terminal Debugger attached. Building the app... To view your local application: -> https://localhost:9080 To view your deployed application in the Experience Cloud shell: -> https://experience.adobe.com/?devMode=true#/custom-apps/?localDevUrl=https://localhost:9080 Your actions: web actions: -> https://https://localhost:9080/api/v1/web/{your-project-name}/{name-of-your-action} non-web actions: press CTRL+C to terminate the dev environment 2025-05-22T06:41:55.969Z [watcher] info: watching action files at... ``` -------------------------------- ### Select Package Manager Prompt Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/developer-agent/coding-tools.md Example prompt during the `tools-setup` process for choosing a package manager. Detects npm or Yarn, recommending npm for consistency. ```shell ? Which package manager would you like to use? ❯ npm yarn ``` -------------------------------- ### Get Event Providers Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/events/release-notes.md Retrieves information about the configured event provider. This is useful for understanding the current event handling setup. ```APIDOC ## GET /rest//V1/eventing/getEventProviders ### Description Retrieves information about the configured event provider. ### Method GET ### Endpoint /rest//V1/eventing/getEventProviders ### Parameters #### Path Parameters - **store_view_code** (string) - Required - The store view code for which to retrieve event provider information. ``` -------------------------------- ### Create and Navigate Project Directory Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/events/configure-commerce.md Use these bash commands to create a new project directory and navigate into it. ```bash mkdir myproject && cd myproject ``` -------------------------------- ### Enable API Integration Module Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/oope-modules/api-integration.md After installation, enable the `Magento_OopeApiIntegrations` module and run `setup:upgrade` to apply the changes to your Commerce instance. ```bash bin/magento module:enable Magento_OopeApiIntegrations bin/magento setup:upgrade ``` -------------------------------- ### Initialize App Builder Project Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/events/configure-commerce.md Bootstrap your application using `aio app init`. You will be prompted to select your organization, project, and the `@adobe/generator-app-events-generic` template. ```bash aio app init -w ``` -------------------------------- ### Compile DI for Magento 2.4.5 Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/checkout/tax-install.md Run this command if you encounter issues during the `magento setup:install` process for Adobe Commerce version 2.4.5. ```bash magento setup:di:compile ``` -------------------------------- ### List Tax Classes with Custom Attributes Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/checkout/tax-reference.md Retrieve a list of tax classes, including their custom attributes, using the GET /V1/taxClasses/search endpoint. This example demonstrates how to query for classes and the structure of the response. ```bash curl --request GET \ --url '/V1/taxClasses/search?searchCriteria[pageSize]=100' \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' ``` ```json { "items": [ { "class_id": 1, "class_name": "Retail Tax Class", "class_type": "CUSTOMER", "extension_attributes": {}, "custom_attributes": [ { "attribute_code": "tax_code", "value": "005" }, { "attribute_code": "tax_label", "value": "Retail" } ] } ], "search_criteria": { "filter_groups": [], "sort_orders": [], "page_size": 100, "current_page": 1 }, "total_count": 1 } ``` -------------------------------- ### Install Adobe I/O CLI Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/developer-agent/coding-tools.md Installs the latest Adobe I/O CLI globally. Ensure you have Node.js and npm installed. ```bash npm install -g @adobe/aio-cli ``` -------------------------------- ### Initialize App Builder Project with Yarn Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/app-management/initialize-app.md For Yarn classic (v1), install the library first and then use `yarn exec`. For Yarn Berry (v2+), use `yarn dlx` to pull directly from the remote registry. ```bash # For Yarn classic (v1), install first yarn add @adobe/aio-commerce-lib-app yarn exec aio-commerce-lib-app init # For Yarn Berry (v2+), pull directly from remote via `dlx` yarn dlx @adobe/aio-commerce-lib-app init ``` -------------------------------- ### Starter Kit Project Directory Structure Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/integration/structure.md This tree displays the hierarchical organization of the starter kit project, highlighting key directories like 'actions', 'scripts', and 'test'. It shows the nested structure for entity synchronization actions, including commerce and external event handling. ```tree |__ root | |__ actions | | |__ | | | |__ commerce | | | | |__ consumer | | | | |__ | | | |__ external | | | | |__ consumer | | | | |__ | |__ ingestion | | |__ webhook | |__ webhook | | |__ | |__ scripts | | |__ commerce-event-subscribe | | |__ onboarding | |__ test | |__ utils ``` -------------------------------- ### Webhook Payload Example Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/webhooks/hooks.md Example of a webhook payload containing shipping estimate details and address information. ```JSON { "subject": [], "result": [ { "carrier_code": "tablerate", "method_code": "bestway", "carrier_title": "Best Way", "method_title": "Table Rate", "amount": 15, "base_amount": 15, "available": true, "error_message": "", "price_excl_tax": 15, "price_incl_tax": 15 }, { "carrier_code": "flatrate", "method_code": "flatrate", "carrier_title": "Flat Rate", "method_title": "Fixed", "amount": 20, "base_amount": 20, "available": true, "error_message": "", "price_excl_tax": 20, "price_incl_tax": 20 } ], "cartId": "21", "address": { "street": "123 Test Road", "city": "Test City", "region_id": 12, "region": "California", "country_id": "US", "postcode": "90000", "firstname": "Test", "lastname": "Test", "company": "", "telephone": "1800000000", "save_in_address_book": 1, "region_code": "CA", "extension_attributes": [] } } ``` -------------------------------- ### Initialize App Builder Project with bun Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/app-management/initialize-app.md Use this command to initialize your App Builder project with bun. It uses the `bun x` command to execute the package. ```bash bun x @adobe/aio-commerce-lib-app init ``` -------------------------------- ### Example Payload for Nested Event Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/_includes/nested-event.md This is an example payload for the `observer.sales_order_invoice_save_after` event, which contains a nested `items` array. ```json { "event": { "data": { "value": { "order_id": "8", "store_id": "1", "customer_id": null, "billing_address_id": "16", "shipping_address_id": "15", "global_currency_code": "USD", "base_currency_code": "USD", "store_currency_code": "USD", "order_currency_code": "USD", "store_to_base_rate": "0.0000", "store_to_order_rate": "0.0000", "base_to_global_rate": "1.0000", "base_to_order_rate": "1.0000", "discount_description": null, "items": [ { "order_item_id": "8", "product_id": "22", "sku": "simple-product-2", "name": "Simple Product 2", "description": null, "price": 200, "base_price": "200.0000", "base_cost": null, "price_incl_tax": "200.0000", "base_price_incl_tax": "200.0000", "extension_attributes": {}, "weee_tax_applied": "[]", "weee_tax_applied_amount": null, "weee_tax_applied_row_amount": 0, "base_weee_tax_applied_amount": null, "base_weee_tax_applied_row_amnt": null, "weee_tax_disposition": null, "base_weee_tax_disposition": null, "weee_tax_row_disposition": 0, "base_weee_tax_row_disposition": 0, "qty": "3.000000", "invoice": {}, "parent_id": null, "store_id": "1", "row_total": 600, "base_row_total": 600, "row_total_incl_tax": 600, "base_row_total_incl_tax": 600, "tax_amount": 0, "base_tax_amount": 0, "discount_tax_compensation_amount": 0, "base_discount_tax_compensation_amount": 0, "base_weee_tax_applied_row_amount": 0 }, { "order_item_id": "9", "product_id": "21", "sku": "simple-product-1", "name": "Simple Product 1", "description": null, "price": 100, "base_price": "100.0000", "base_cost": null, "price_incl_tax": "100.0000", "base_price_incl_tax": "100.0000", "extension_attributes": {}, "weee_tax_applied": "[]", "weee_tax_applied_amount": null, "weee_tax_applied_row_amount": 0, "base_weee_tax_applied_amount": null, "base_weee_tax_applied_row_amnt": null, "weee_tax_disposition": null, "base_weee_tax_disposition": null, "weee_tax_row_disposition": 0, "base_weee_tax_row_disposition": 0, "qty": "5.000000", "invoice": {}, "parent_id": null, "store_id": "1", "row_total": 500, "base_row_total": 500, "row_total_incl_tax": 500, "base_row_total_incl_tax": 500, "tax_amount": 0, "base_tax_amount": 0, "discount_tax_compensation_amount": 0, "base_discount_tax_compensation_amount": 0, "base_weee_tax_applied_row_amount": 0 } ], "total_qty": 8, "subtotal": 1100, "base_subtotal": 1100, "subtotal_incl_tax": 1100, "base_subtotal_incl_tax": 1100, "grand_total": 1100, "base_grand_total": 1100, "discount_amount": 0, "base_discount_amount": 0, "tax_amount": 0, "base_tax_amount": 0, "discount_tax_compensation_amount": 0, "base_discount_tax_compensation_amount": 0, "base_cost": 0, "base_gift_cards_amount": 0, "gift_cards_amount": 0, "can_void_flag": false, "state": 2, "increment_id": "000000013", "entity_id": "13", "id": "13", "created_at": "2023-04-06 18:36:18", "updated_at": "2023-04-06 18:36:18" } } } } ``` -------------------------------- ### Compile Instance for New Classes Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/events/installation.md On-premise installation: Compile your instance to generate new classes after upgrading. ```bash bin/magento setup:di:compile ``` -------------------------------- ### Install API Integration Module Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/oope-modules/api-integration.md Install the `magento/module-oope-api-integrations` module using Composer. Ensure you have the correct version specified. ```bash composer require magento/module-oope-api-integrations=^1.0 ``` -------------------------------- ### Start local development server Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/developer-agent/best-practices.md Always test locally first using the `aio-app-dev` tool. This provides immediate feedback and allows for faster iteration cycles. ```bash aio-app-dev ``` -------------------------------- ### Initialize Webhooks Module (On-Premise) Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/webhooks/installation.md For on-premise installations, run this command to initialize the generated plugins for the webhooks module. ```bash bin/magento webhooks:generate:module ``` -------------------------------- ### Customer Event Payload Example Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/integration/send-data.md Example JSON payload for a customer event, including ID, created_at, and updated_at fields. ```JSON { "id": 1, "created_at":"2000-12-31 16:52:40", "updated_at":"2000-12-31 16:48:40" } ``` -------------------------------- ### Build and Deploy Application Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/app-management/build-deploy.md Use these commands to build and deploy your application. The `--force-build` and `--force-deploy` flags ensure a fresh build and deployment, while `--no-build` prevents a redundant build during deployment. ```bash aio app build --force-build ``` ```bash aio app deploy --force-deploy --no-build ``` -------------------------------- ### Initialize Commerce Checkout Starter Kit Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/checkout/getting-started.md Initialize your Adobe Developer Console project using the Commerce Checkout Starter Kit template. Replace `$GITHUB_PAT` with your GitHub personal access token. ```bash aio app init --repo adobe/commerce-checkout-starter-kit --github-pat $GITHUB_PAT ``` -------------------------------- ### Example Debug Tracer Error Output Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/events/tutorial/debugging.md This is an example of the error output you might see in the Debug Tracer when an action fails. ```json application error { "error": "server error" } ``` -------------------------------- ### Example Response: All Event Providers Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/events/api.md This is an example JSON response when retrieving all event providers. It lists details for each configured provider. ```json [ { "provider_id": "ad667bc6-1678-49ff-99fc-215d71ebf82f", "instance_id": "my_instance", "label": "my_provider", "description": "Provides out-of-process extensibility for Adobe Commerce", "workspace_configuration": "******" }, { "provider_id": "1902bc50-12345-41e8-955b-af4a9667823f", "instance_id": "my_instance_id", "label": "my_provider_2", "description": "Additional event provider", "workspace_configuration": "******" } ] ``` -------------------------------- ### Request Detailed Implementation Plan Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/developer-agent/best-practices.md Use this prompt when dealing with complex development tasks involving multiple components or integrations to break them down into manageable steps. ```shell Create a detailed implementation plan for this complex development. ``` -------------------------------- ### Select Coding Agent Prompt Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/developer-agent/coding-tools.md Example prompt during the `tools-setup` process for selecting a coding agent. Supports over 40 agents, with an 'Other' option for custom configurations. ```shell ? Which coding agent would you like to install skills for? ❯ Cursor Claude Code GitHub Copilot Windsurf Gemini CLI OpenAI Codex Cline ... ``` -------------------------------- ### Product Event Payload Example Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/integration/send-data.md Example JSON payload for a product event, including created_at, name, sku, and updated_at fields. ```JSON { "created_at":"2023-11-24 16:52:40", "name":"Test product name", "sku":"2_4_7_TestProduct", "updated_at":"2023-11-29 16:48:55" } ``` -------------------------------- ### Install Out-of-Process Tax Management Module Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/checkout/tax-install.md Use this command to install the `magento/module-out-of-process-tax-management` module for enabling out-of-process tax management in Adobe Commerce. ```bash composer require magento/module-out-of-process-tax-management --with-dependencies ``` -------------------------------- ### Clone Commerce Integration Starter Kit Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/developer-agent/coding-tools.md Clones the starter kit for building back-office integrations. Use this for backend-focused extensions. ```bash git clone git@github.com:adobe/commerce-integration-starter-kit.git ``` -------------------------------- ### Install payment module with Composer Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/starter-kit/checkout/payment-install.md Use this command to install the `magento/module-out-of-process-payment-methods` module, which is required to enable out-of-process payment methods in Adobe Commerce. ```bash composer require magento/module-out-of-process-payment-methods --with-dependencies ``` -------------------------------- ### Supported Webhooks Response Example Source: https://github.com/adobedocs/commerce-extensibility/blob/main/src/pages/webhooks/api.md This is an example of the response body when requesting supported webhooks for SaaS environments. It lists available event names. ```json [ { "name": "observer.sales_quote_add_item" }, { "name": "observer.checkout_cart_product_add_before" }, { "name": "observer.catalog_product_save_after" }, ... ] ```