Update or deactivate an automation configuration

Learn how to update or deactivate an automation configuration.

Learn how to update the content and trigger conditions of an existing automation configuration, and how to deactivate a configuration without deleting it.

Prerequisites

To complete this tutorial, you need:

Step 1. Get the current state of the automation configuration

The updateAutomationConfiguration operation performs a full replacement of the configuration. Any fields or store entries that you omit from the request body are removed from the configuration.

To avoid accidentally overwriting or deleting existing data, first call the getAutomationConfiguration operation, specifying the automationId and marketplaceIds for the configuration you want to update. Use the response as the starting point for your update.

Step 2. Update the automation configuration

Call the updateAutomationConfiguration operation, specifying the automationId, the marketplaceIds query parameter, and a request body that contains the complete desired state:

  • automationDisplayName: To update, provide a new display name. Add the value from the response in Step 1 to reuse the existing value.
  • automationStatus: Set to ACTIVE to keep the configuration active, or DEACTIVATED to stop it from activating without deleting it.
  • marketplaceAutomations: Provide the complete list of store-specific entries you want the configuration to have.
🚧

Caution

The marketplaceAutomations entries you provide replace all of the configuration's existing Amazon store entries. Any store that you omit from the list is removed from the configuration. To keep a store's existing automation details and trigger conditions, include its complete, unmodified entry in the request body.

Updates take effect immediately. If the request contains auto-response text that isn't permitted, the request is rejected with a 422 error. If the updated trigger conditions overlap with another ACTIVE automation configuration in the same Amazon store, the request is rejected with a 409 error.