Shopware icon

Shopware

Shopware

Actions778

Promotion → Update Promotion

AI-generated

Overview

This node operation updates an existing promotion in the Shopware system. It allows users to modify various attributes of a promotion such as its name, active status, validity period, redemption limits, priority, exclusivity, codes, customer restrictions, and associated rules and discounts. This operation is useful for managing promotional campaigns dynamically, ensuring that promotions reflect current marketing strategies and business rules.

Use Case Examples

  1. Updating a promotion's active status to disable it temporarily.
  2. Changing the validity period of a promotion to extend or shorten its availability.
  3. Modifying the maximum number of redemptions allowed globally or per customer.
  4. Adjusting the priority or exclusivity settings to control how promotions are applied in combination with others.

Properties

Name Meaning
Id Identifier for the promotion, required to specify which promotion to update.
Response Data format for response; can be empty if no specific format is provided.
Name Name of the promotion.
Active Boolean flag indicating if the promotion is active.
Valid From Start date/time from which the promotion is valid.
Valid Until End date/time until which the promotion is valid.
Max Redemptions Global Maximum number of times the promotion can be redeemed globally.
Max Redemptions Per Customer Maximum number of times the promotion can be redeemed per customer.
Priority Priority level of the promotion, affecting its application order.
Exclusive Boolean flag indicating if the promotion is exclusive and cannot be combined with others.
Code Code associated with the promotion for redemption.
Use Codes Boolean flag indicating if codes are used for the promotion.
Use Individual Codes Boolean flag indicating if individual codes are used.
Individual Code Pattern Pattern used for generating individual codes.
Use Set Groups Boolean flag indicating if set groups are used.
Customer Restriction Boolean flag indicating if there are customer restrictions.
Prevent Combination Boolean flag indicating if the promotion prevents combination with others.
Order Count Number of orders related to the promotion.
Orders Per Customer Count JSON object representing orders per customer count.
Exclusion Ids JSON array of IDs that are excluded from the promotion.
Custom Fields JSON object for custom fields related to the promotion.
Created At Creation timestamp of the promotion.
Updated At Last update timestamp of the promotion.
Translated JSON object containing translated fields for the promotion.
Setgroups JSON array representing set groups associated with the promotion.
Sales Channels JSON array representing sales channels associated with the promotion.
Discounts JSON array representing discounts associated with the promotion.
Individual Codes JSON array representing individual codes associated with the promotion.
Persona Rules JSON array representing persona rules associated with the promotion.
Persona Customers JSON array representing persona customers associated with the promotion.
Order Rules JSON array representing order rules associated with the promotion.
Cart Rules JSON array representing cart rules associated with the promotion.
Order Line Items JSON array representing order line items associated with the promotion.

Output

JSON

  • id - Identifier of the updated promotion.
  • name - Name of the updated promotion.
  • active - Active status of the updated promotion.
  • validFrom - Start date/time of the updated promotion's validity.
  • validUntil - End date/time of the updated promotion's validity.
  • maxRedemptionsGlobal - Maximum global redemptions allowed.
  • maxRedemptionsPerCustomer - Maximum redemptions allowed per customer.
  • priority - Priority level of the promotion.
  • exclusive - Exclusivity status of the promotion.
  • code - Code associated with the promotion.
  • useCodes - Flag indicating if codes are used.
  • useIndividualCodes - Flag indicating if individual codes are used.
  • individualCodePattern - Pattern for individual codes.
  • useSetGroups - Flag indicating if set groups are used.
  • customerRestriction - Flag indicating customer restrictions.
  • preventCombination - Flag indicating if combination with other promotions is prevented.
  • orderCount - Number of orders related to the promotion.
  • ordersPerCustomerCount - Orders per customer count as JSON.
  • exclusionIds - List of exclusion IDs.
  • customFields - Custom fields as JSON.
  • createdAt - Creation timestamp.
  • updatedAt - Last update timestamp.
  • translated - Translated fields as JSON.
  • setgroups - Set groups as JSON.
  • salesChannels - Sales channels as JSON.
  • discounts - Discounts as JSON.
  • individualCodes - Individual codes as JSON.
  • personaRules - Persona rules as JSON.
  • personaCustomers - Persona customers as JSON.
  • orderRules - Order rules as JSON.
  • cartRules - Cart rules as JSON.
  • orderLineItems - Order line items as JSON.

Dependencies

  • an API key credential for Shopware

Troubleshooting

  • Ensure the 'Id' property is provided and correctly identifies the promotion to update, otherwise the update will fail.
  • Verify that JSON properties (e.g., 'ordersPerCustomerCount', 'exclusionIds', 'customFields', etc.) are valid JSON strings to avoid parsing errors.
  • Check API credentials and base URL configuration to ensure successful connection to the Shopware API.
  • If the promotion update does not reflect changes, confirm that all required fields are correctly set and that the API user has sufficient permissions.

Discussion