Shopware icon

Shopware

Shopware

Actions778

Promotion Discount → Update Promotion Discount

AI-generated

Overview

This node operation updates an existing Promotion Discount in the Shopware system. It allows users to modify various attributes of a promotion discount such as its identifier, associated promotion ID, scope, type, value, and advanced rules consideration. Additionally, it supports updating complex nested JSON structures like promotion details, discount rules, and promotion discount prices. This operation is useful for managing and customizing promotional discounts dynamically within an e-commerce platform using Shopware's API.

Use Case Examples

  1. Updating the value and type of a specific promotion discount by its ID.
  2. Modifying the discount rules and associated promotion details for a promotion discount.

Properties

Name Meaning
Id Identifier for the promotion_discount, used to specify which discount to update.
Response Data format for the response; can be left empty if no specific format is required.
Promotion Id Identifier of the promotion associated with the discount.
Scope Defines the scope of the promotion discount.
Type Type of the promotion discount.
Value Numerical value representing the discount amount or percentage.
Consider Advanced Rules Boolean flag indicating whether to consider advanced rules in the discount application.
Max Value Maximum value limit for the discount.
Sorter Key Key used for sorting the promotion discounts.
Applier Key Key used to apply the promotion discount.
Usage Key Key representing usage constraints or identifiers.
Picker Key Key used for picking or selecting the discount.
Created At Timestamp of when the promotion discount was created.
Updated At Timestamp of the last update to the promotion discount.
Promotion JSON object containing detailed nested information about the promotion, including exclusions, set groups, sales channels, and related entities.
Discount Rules JSON array defining the discount rules, including areas and conditions that govern the discount application.
Promotion Discount Prices JSON array specifying prices related to the promotion discount, including nested promotion and currency details.

Output

JSON

  • id - Identifier of the updated promotion discount.
  • promotionId - Identifier of the associated promotion.
  • scope - Scope of the promotion discount.
  • type - Type of the promotion discount.
  • value - Value of the promotion discount.
  • considerAdvancedRules - Flag indicating if advanced rules are considered.
  • maxValue - Maximum value of the discount.
  • sorterKey - Sorting key for the discount.
  • applierKey - Key used to apply the discount.
  • usageKey - Usage key for the discount.
  • pickerKey - Picker key for the discount.
  • createdAt - Creation timestamp.
  • updatedAt - Last update timestamp.
  • promotion - Detailed promotion information as a JSON object.
  • discountRules - Discount rules as a JSON array.
  • promotionDiscountPrices - Promotion discount prices as a JSON array.

Dependencies

  • Shopware API with appropriate credentials

Troubleshooting

  • Ensure the 'Id' property is correctly set to the promotion discount you want to update; otherwise, the update will fail.
  • Verify that the JSON structures for 'Promotion', 'Discount Rules', and 'Promotion Discount Prices' are correctly formatted to avoid parsing errors.
  • Check API credentials and permissions to ensure the node can successfully communicate with the Shopware API.
  • If SSL issues occur, consider enabling the 'Ignore SSL Issues' option in request settings or verify the SSL certificate validity.

Discussion