### Install Dependencies Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/customer/custom-mass-action/README.md Installs the necessary project dependencies using npm. ```bash npm install ``` -------------------------------- ### Install Dependencies Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/product/custom-mass-action/README.md Installs the necessary project dependencies using npm. ```bash npm install ``` -------------------------------- ### Onboarding Script Output Example Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/order-bidirectional-integration-sample-prj/README.md Example output from the onboarding script, showing the IDs for commerce, backoffice, and email providers. These IDs are crucial for configuring the Adobe Commerce instance and sending events to the App builder project. ```json [ { "key": "commerce", "id": "THIS IS THE ID OF COMMERCE PROVIDER", "instanceId": "THIS IS THE INSTANCE ID OF COMMERCE PROVIDER", "label": "Commerce Provider" }, { "key": "backoffice", "id": "THIS IS THE ID OF BACKOFFICE PROVIDER", "instanceId": "THIS IS THE INSTANCE ID OF BACKOFFICE PROVIDER", "label": "Backoffice Provider" }, { "key": "email", "id": "THIS IS THE ID OF EMAIL PROVIDER", "instanceId": "THIS IS THE INSTANCE ID OF EMAIL PROVIDER", "label": "Email Provider" } ] ``` -------------------------------- ### Install npm Dependencies Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/order-bidirectional-integration-sample-prj/README.md Installs the necessary Node.js dependencies for the starter kit project. This is a prerequisite for configuring and running the project. ```bash npm install ``` -------------------------------- ### Install Dependencies Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-mass-action/README.md Installs the necessary project dependencies using npm. ```Bash npm install ``` -------------------------------- ### Navigate to Mock Response Example Source: https://github.com/adobe/adobe-commerce-samples/blob/main/api-mesh/README.md This command navigates into the 'mock-response' directory, likely containing a specific API Mesh example. ```bash cd mock-response ``` -------------------------------- ### Run Local Development Server Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/product/custom-grid-columns/README.md Starts the local development server for testing the application. ```bash aio app run ``` -------------------------------- ### Start Local Development Server Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/menu/custom-menu/README.md Starts the local development server for testing the Adobe Commerce Admin UI SDK application. ```bash aio app dev ``` -------------------------------- ### Run Local Development Server Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/product/custom-mass-action/README.md Starts the local development server for testing the Adobe Commerce extension. ```bash aio app run ``` -------------------------------- ### Install Dependencies Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/product/custom-grid-columns/README.md Installs the necessary project dependencies using npm. ```bash npm install ``` -------------------------------- ### Install Dependencies Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-view-button/README.md Installs the necessary project dependencies using npm. ```bash npm install ``` -------------------------------- ### Install Dependencies Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-grid-columns/README.md Installs the necessary project dependencies using npm. ```bash npm install ``` -------------------------------- ### Run Local Development Server Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-mass-action/README.md Starts the local development server for testing the Adobe Commerce extension. ```Bash aio app run ``` -------------------------------- ### Run Local Development Server Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/customer/custom-mass-action/README.md Starts the local development server for testing the Adobe Commerce application. ```bash aio app run ``` -------------------------------- ### Install Dependencies Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/menu/custom-menu/README.md Installs the necessary dependencies for the Adobe Commerce Admin UI SDK application. ```bash npm install ``` -------------------------------- ### Run Local Development Server Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-grid-columns/README.md Starts the local development server for testing the application. ```bash aio app run ``` -------------------------------- ### Navigate to API Mesh Examples Directory Source: https://github.com/adobe/adobe-commerce-samples/blob/main/api-mesh/README.md This command changes the current directory to the 'api-mesh-examples' folder within the cloned repository. ```bash cd api-mesh-examples ``` -------------------------------- ### Install Dependencies Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-fees/README.md Installs the necessary Node.js dependencies for the project. This is a standard step for most Node.js applications. ```bash npm install ``` -------------------------------- ### Install Dependencies Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/banner-notification/custom-mass-actions/README.md Installs the necessary project dependencies using npm. ```bash npm install ``` -------------------------------- ### Install Dependencies Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/banner-notification/custom-order-view-button/README.md Installs the necessary project dependencies using npm. ```bash npm install ``` -------------------------------- ### Run Local Development Server Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-view-button/README.md Starts the local development server for testing the application using the Adobe CLI. ```bash aio app run ``` -------------------------------- ### Run Local Development Server Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/banner-notification/custom-mass-actions/README.md Starts the local development server for testing the Adobe Commerce extension. ```bash aio app run ``` -------------------------------- ### Run Local Development Server Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/banner-notification/custom-order-view-button/README.md Starts the local development server for testing the application. ```bash aio app run ``` -------------------------------- ### Run Local Development Server Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-fees/README.md Starts a local development server for testing the Adobe Commerce extension. This allows for rapid iteration during development. ```bash aio app run ``` -------------------------------- ### Example Commerce Event Payload Source: https://github.com/adobe/adobe-commerce-samples/blob/main/events/commerce-customer-login/README.md This JSON object represents an example payload received from an Adobe Commerce customer login event. It includes customer details like first name and last name, along with metadata about the Commerce edition, version, and store. ```json { "data": { "key": "4fbbb851-285f-4733-a3b4-77556e019691", "value": { "customer": { "firstname": "John", "lastname": "Doe" } }, "source": "evergreen.evergreen_staging", "_metadata": { "commerceEdition": "Adobe Commerce + B2B", "commerceVersion": "2.4.6-p4", "eventsClientVersion": "1.5.0", "storeId": "1", "websiteId": "1", "storeGroupId": "1" } }, "id": "f7813962-c119-401c-aa8c-266421aa1053", "source": "urn:uuid:420ba332-4e1c-4373-8e23-81175c9e79fd", "specversion": "1.0", "type": "com.adobe.commerce.observer.customer_login", "datacontenttype": "application/json", "time": "2024-06-04T16:05:04.542Z", "event_id": "7c9ae597-f382-49bc-85b7-3a2b4da6e0bf", "recipient_client_id": "531f2f763b2f4c34b03001d8bf2bd4df" } ``` -------------------------------- ### GraphQL Mesh Configuration for Chain Mutations Source: https://github.com/adobe/adobe-commerce-samples/blob/main/api-mesh/chain-mutations/README.md This JSON configuration defines the API Mesh setup, including sources for GraphQL APIs (like Adobe Commerce), additional type definitions for custom mutations, and references to resolver files that implement the mutation logic. It requires environment variables for the Commerce endpoint. ```json { "meshConfig": { "sources": [ { "name": "Commerce", "handler": { "graphql": { "endpoint": "{{env.COMMERCE_ENDPOINT}}" } } } ], "additionalTypeDefs": "\n type AddProductsToCartAndSetShippingMethodOutput { cartId: String! } extend type Mutation { addProductsToCartAndSetShippingMethod( cartId: String! product: CartItemInput! ): AddProductsToCartAndSetShippingMethodOutput } ", "additionalResolvers": ["./resolver.js"] } } ``` -------------------------------- ### Configure API Mesh with GraphQL and REST Sources Source: https://github.com/adobe/adobe-commerce-samples/blob/main/api-mesh/commerce-rest-and-graphql/README.md This JSON configuration defines an API Mesh setup that integrates with both Adobe Commerce GraphQL and REST endpoints. It specifies the sources and their respective handlers, enabling unified access to different commerce APIs. ```json { "meshConfig": { "sources": [ { "name": "CommerceGraphql", "handler": { "graphql": { "endpoint": "{{env.COMMERCE_GRAPHQL_ENDPOINT}}" } } }, { "name": "CommerceREST", "handler": { "openapi": { "source": "{{env.COMMERCE_REST_ENDPOINT}}" } } } ] } } ``` -------------------------------- ### Deploy Adobe I/O Project Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/order-bidirectional-integration-sample-prj/README.md Deploys the runtime actions for the starter kit project to Adobe I/O Runtime. This makes the project's backend services available. ```bash aio app deploy ``` -------------------------------- ### Clone Adobe Commerce Integration Starter Kit Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/README.md Clones the Adobe Commerce integration starter kit repository from GitHub using Git. This is the initial step to begin customizing the starter kit. ```bash git clone git@github.com:adobe/commerce-integration-starter-kit.git ``` -------------------------------- ### Execute Onboarding Script Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/order-bidirectional-integration-sample-prj/README.md Runs the onboarding script to generate IO Events providers and registrations for a starter kit project. If the Adobe I/O Events for Adobe Commerce module is version 1.6.0 or greater, it also auto-configures the module. The output provides provider IDs necessary for further configuration. ```bash npm run onboard ``` -------------------------------- ### Use Adobe I/O Project Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/order-bidirectional-integration-sample-prj/README.md Connects the local starter kit project with the selected Adobe Developer Console project. The 'm' option merges configurations. ```bash aio app use # Choose the option 'm' (merge) ``` -------------------------------- ### Navigate to Cloned Directory Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/README.md Changes the current directory to the cloned Adobe Commerce integration starter kit repository. This is necessary to access and modify the starter kit files. ```bash cd commerce-integration-starter-kit ``` -------------------------------- ### Override Starter Kit Files Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/README.md Copies files from a specific sample folder to the root of the cloned starter kit directory. This action overrides the default starter kit files with the chosen sample's customizations. ```bash cp -r /* . ``` -------------------------------- ### Build Application Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/menu/custom-menu/README.md Builds the Adobe Commerce Admin UI SDK application, preparing it for deployment. ```bash aio app build ``` -------------------------------- ### Select Adobe I/O Project Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/order-bidirectional-integration-sample-prj/README.md Enables the user to choose a specific Adobe Developer Console project. This is necessary to associate the local project with the correct cloud environment. ```bash aio console project select ``` -------------------------------- ### Select Adobe I/O Project Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/product/custom-mass-action/README.md Selects the correct Adobe I/O project and workspace for the application. ```bash aio app use ``` -------------------------------- ### Select Adobe I/O Workspace Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/order-bidirectional-integration-sample-prj/README.md Facilitates the selection of a workspace within the chosen Adobe Developer Console project. This targets the deployment to a specific environment. ```bash aio console workspace select ``` -------------------------------- ### Login to Adobe I/O CLI Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/order-bidirectional-integration-sample-prj/README.md Logs the user into the Adobe I/O command-line interface. This is required for subsequent commands to interact with Adobe Developer Console projects. ```bash aio login ``` -------------------------------- ### Login to Adobe I/O Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/product/custom-mass-action/README.md Logs the user into their Adobe I/O account using the Adobe I/O CLI. ```bash aio auth:login ``` -------------------------------- ### Deploy Adobe Commerce Extension Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/product/custom-mass-action/README.md Deploys the Adobe Commerce extension to the selected project and workspace. ```bash aio app deploy ``` -------------------------------- ### Deploy Application Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/menu/custom-menu/README.md Deploys the built Adobe Commerce Admin UI SDK application to the Adobe Commerce environment. ```bash aio app deploy ``` -------------------------------- ### Login to Adobe I/O Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/product/custom-grid-columns/README.md Logs the user into their Adobe I/O account using the AIO CLI. ```bash aio auth:login ``` -------------------------------- ### Deploy Application Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/product/custom-grid-columns/README.md Deploys the Adobe Commerce application after configuration. ```bash aio app deploy ``` -------------------------------- ### Select Adobe Commerce Project Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/customer/custom-mass-action/README.md Selects the correct Adobe Commerce project and workspace for the application. ```bash aio app use ``` -------------------------------- ### Select Adobe I/O Organization Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/order-bidirectional-integration-sample-prj/README.md Allows the user to select the Adobe Developer Console organization to work with. This command is part of the Adobe I/O CLI workflow. ```bash aio console org select ``` -------------------------------- ### Deploy Adobe Commerce Application Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/customer/custom-mass-action/README.md Deploys the Adobe Commerce application. ```bash aio app deploy ``` -------------------------------- ### Clone API Mesh Samples Repository Source: https://github.com/adobe/adobe-commerce-samples/blob/main/api-mesh/README.md This command clones the Adobe API Mesh samples repository from GitHub to your local machine. ```git git clone https://github.com/adobe/adobe-commerce-samples.git ``` -------------------------------- ### Login to Adobe I/O Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-mass-action/README.md Logs the user into their Adobe I/O account using the Adobe I/O CLI. ```Bash aio auth:login ``` -------------------------------- ### Select Adobe Commerce Project Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/menu/custom-menu/README.md Selects the appropriate Adobe Commerce project and workspace for the current context. ```bash aio app use ``` -------------------------------- ### Deploy Adobe Commerce Application Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-mass-action/README.md Deploys the application to the selected Adobe Commerce project and workspace. ```Bash aio app deploy ``` -------------------------------- ### Configure Commerce I/O Events Source: https://github.com/adobe/adobe-commerce-samples/blob/main/events/commerce-customer-login/README.md This XML configuration defines the Adobe Commerce I/O Events to listen for. It specifies the `observer.customer_login` event and the customer first name and last name fields to be extracted from the payload. ```xml ``` -------------------------------- ### Select App Builder Project Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/product/custom-grid-columns/README.md Allows selection of the correct Adobe Commerce project and workspace within App Builder. ```bash aio app use ``` -------------------------------- ### Login to Adobe I/O Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/customer/custom-mass-action/README.md Logs the user into their Adobe I/O account. ```bash aio auth:login ``` -------------------------------- ### Deploy Application Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-view-button/README.md Deploys the application to Adobe Commerce using the Adobe CLI. ```bash aio app deploy ``` -------------------------------- ### Select Adobe Commerce Project Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-mass-action/README.md Selects the target Adobe Commerce project and workspace for the application. ```Bash aio app use ``` -------------------------------- ### Subscribe to Commerce Events Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/order-bidirectional-integration-sample-prj/README.md Command to automatically subscribe to Commerce events using a configuration file. This is applicable if the Adobe Commerce instance Adobe I/O Events for Adobe Commerce module version is 1.6.0 or greater. ```bash npm run commerce-event-subscribe ``` -------------------------------- ### Activate Event Ingestion Webhook Source: https://github.com/adobe/adobe-commerce-samples/blob/main/starter-kit/customize-ingestion-webhook/README.md This bash command activates the event ingestion webhook by sending a POST request with JSON payload to the Adobe Commerce integration starter kit API. It includes sample data for a customer creation event. ```bash curl --request POST \ --url https://${PROJECT_NAMESPACE}.adobeioruntime.net/api/v1/web/ingestion/webhook \ --header 'Content-Type: application/json' \ --data '{ \ "data": { \ "uid": "${UUID}", \ "event": "external_provider.customer_created.v1.0", \ "value": { \ "PersonFirstName": "Test", \ "PersonLastName": "Customer", \ "PersonMiddleName": "AC", \ "PrimaryContactEmail": "${UNIQUE_EMAIL_ADDRESS}", \ "CustomerGroupId": "30", \ "SalesCurrencyCode": "USD", \ "PrimaryContactPhone": "555-555-1234", \ "PartyType": "Person", \ "AddressStreet": "1 Test Street", \ "AddressCountryRegionISOCode": "US", \ "AddressZipCode": "00210", \ "AddressCity": "Portsmouth", \ "AddressState": "NH", \ "AddressLocationRoles": "Invoice", \ "AddressDescription": "Test Billing", \ "DeliveryAddressStreet": "2 Test Avenue", \ "DeliveryAddressCountryRegionISOCode": "US", \ "DeliveryAddressZipCode": "00210", \ "DeliveryAddressCity": "Portsmouth", \ "DeliveryAddressState": "NH", \ "DeliveryAddressDescription": "Test Delivery" \ } \ } \ }' ``` -------------------------------- ### Login to Adobe I/O Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-grid-columns/README.md Logs the user into their Adobe I/O account using the Adobe I/O CLI. ```bash aio auth:login ``` -------------------------------- ### Login to Adobe I/O Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-view-button/README.md Logs the user into their Adobe I/O account via the Adobe CLI. ```bash aio auth:login ``` -------------------------------- ### Create API Mesh Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/product/custom-grid-columns/README.md Creates an API mesh configuration using a mesh.json file. ```bash aio api-mesh:create mesh.json ``` -------------------------------- ### Configure API Mesh with Commerce and Catalog Sources Source: https://github.com/adobe/adobe-commerce-samples/blob/main/api-mesh/commerce-and-catalog/README.md This JSON configuration sets up API Mesh with two sources: Adobe Commerce and Adobe Commerce Catalog Service. It specifies GraphQL endpoints, headers for operations and schema building, and uses a `filterSchema` transform to manage schema conflicts between the two services. ```JSON { "meshConfig": { "sources": [ { "name": "CommerceAPI", "handler": { "graphql": { "endpoint": "{{env.COMMERCE_ENDPOINT}}", "useGETForQueries": true, "operationHeaders": { "Content-Type": "application/json", "Store": "{context.headers['store']}", "Authorization": "context.headers['Authorization']" } } }, "transforms": [ { "filterSchema": { "mode": "bare", "filters": [ "Query.!category", "Query.!customerOrders", "Query.!products", "Query.!categories", "Query.!urlResolver", "Query.!wishlist", "Query.!categoryList", "Mutation.!setPaymentMethodAndPlaceOrder", "Mutation.!addBundleProductsToCart", "Mutation.!addConfigurableProductsToCart", "Mutation.!addDownloadableProductsToCart", "Mutation.!addSimpleProductsToCart", "Mutation.!addVirtualProductsToCart", "Mutation.!createCustomer", "Mutation.!updateCustomer" ] } } ] }, { "name": "CatalogAPI", "handler": { "graphql": { "endpoint": "{{env.CATALOG_ENDPOINT}}", "useGETForQueries": true, "schemaHeaders": { "Content-Type": "application/json", "x-api-key": "{{env.CATALOG_API_KEY}}" }, "operationHeaders": { "Content-Type": "application/json", "Magento-Environment-Id": "{context.headers['magento-environment-id']}", "Magento-Website-Code": "{context.headers['magento-website-code']}", "Magento-Store-View-Code": "{context.headers['magento-store-view-code']}", "Magento-Store-Code": "{context.headers['magento-store-code']}", "Magento-Customer-Group": "{context.headers['magento-customer-group']}", "x-api-key": "{context.headers['x-api-key']}", "Authorization": "context.headers['Authorization']" } } } } ] } } ``` -------------------------------- ### Deploy Adobe I/O Application Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/banner-notification/custom-order-view-button/README.md Deploys the application to Adobe I/O. ```bash aio app deploy ``` -------------------------------- ### Authenticate with Adobe I/O Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/menu/custom-menu/README.md Authenticates the user with their Adobe I/O account, which is required for deploying and managing applications. ```bash aio auth:login ``` -------------------------------- ### Select Adobe Commerce Project Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-fees/README.md Sets the active Adobe Commerce project and workspace for the Adobe CLI. This ensures subsequent commands target the correct environment. ```bash aio app use ``` -------------------------------- ### Deploy Application Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-grid-columns/README.md Deploys the Adobe Commerce application after configuration updates. ```bash aio app deploy ``` -------------------------------- ### Select Adobe Commerce Project Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-view-button/README.md Selects the correct Adobe Commerce project and workspace for the application using the Adobe CLI. ```bash aio app use ``` -------------------------------- ### Select Adobe Commerce Project Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-grid-columns/README.md Allows the user to select the correct Adobe Commerce project and workspace for the current context. ```bash aio app use ``` -------------------------------- ### Configure Environment Variables Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/menu/custom-menu/README.md Updates the .env file with PaaS values required for data display in tables, including base URL, consumer key, secret, and access tokens. ```bash COMMERCE_BASE_URL= COMMERCE_CONSUMER_KEY= COMMERCE_CONSUMER_SECRET= COMMERCE_ACCESS_TOKEN= COMMERCE_ACCESS_TOKEN_SECRET= ``` -------------------------------- ### Resolver Logic for Adding Products and Setting Shipping Source: https://github.com/adobe/adobe-commerce-samples/blob/main/api-mesh/chain-mutations/README.md This JavaScript file contains the implementation for the `addProductsToCartAndSetShippingMethod` mutation. It handles adding products to the cart and conditionally setting the shipping method to 'Free Shipping' if the cart's total quantity meets a specified threshold (e.g., 5 or more items). ```javascript // resolver.js // This file would contain the actual JavaScript logic for the mutation. // Example structure: module.exports = { Mutation: { addProductsToCartAndSetShippingMethod: async (_, { cartId, product }, { context }) => { // Logic to add product to cart using Commerce API // ... // Fetch cart details to check quantity // ... const cart = await context.commerce.getCart(cartId); // Check if quantity is >= 5 and set free shipping if (cart.total_qantity >= 5) { // Logic to set shipping method to 'freeshipping' // ... } return { cartId }; } } }; ``` -------------------------------- ### Deploy Adobe Commerce Application Source: https://github.com/adobe/adobe-commerce-samples/blob/main/admin-ui-sdk/order/custom-fees/README.md Deploys the configured Adobe Commerce application to the Adobe I/O environment. This makes the extension available for use. ```bash aio app deploy ```