Shopware icon

Shopware

Shopware

Actions778

Promotion Discount → Create Promotion Discount

AI-generated

Overview

This node operation creates a new Promotion Discount in the Shopware system. It is useful for automating the addition of discounts to promotions, allowing users to specify various discount parameters such as the discount type, value, scope, and associated promotion ID. This can be applied in e-commerce workflows to dynamically manage promotional discounts based on business rules.

Use Case Examples

  1. Automatically create a percentage discount for a specific promotion during a marketing campaign.
  2. Add a fixed value discount to a promotion when certain conditions are met in an order processing workflow.

Properties

Name Meaning
Response Data format for the response, either basic or detailed information about the created promotion discount.
Id Unique identifier for the promotion discount to be created.
Promotion Id Identifier of the promotion to which this discount belongs.
Scope Scope of the discount, defining where or how it applies.
Type Type of the discount, e.g., percentage or fixed amount.
Value Numeric value of the discount.
Consider Advanced Rules Boolean flag to consider advanced rules in discount application.
Max Value Maximum value the discount can reach.
Sorter Key Key used for sorting discounts.
Applier Key Key used to apply the discount.
Usage Key Key defining usage constraints or identifiers.
Picker Key Key used for picking or selecting the discount.
Created At Timestamp when the discount was created.
Updated At Timestamp when the discount was last updated.
Promotion JSON object representing the promotion details associated with the discount.
Discount Rules JSON array defining the rules that govern the discount application.
Promotion Discount Prices JSON array defining prices related to the promotion discount.

Output

JSON

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

Dependencies

  • An API key credential for Shopware Admin API

Troubleshooting

  • Ensure all required fields (Id, Promotion Id, Scope, Type, Value) are provided to avoid validation errors.
  • If the API returns authentication errors, verify the Shopware Admin API credentials are correctly configured.
  • For JSON fields (Promotion, Discount Rules, Promotion Discount Prices), ensure the JSON is well-formed to prevent parsing errors.

Discussion