Shopware icon

Shopware

Shopware

Actions778

Rule Condition → Update Rule Condition

AI-generated

Overview

This node operation updates a Rule Condition in the Shopware system. It is useful for modifying existing rule conditions by specifying their identifier and providing updated details such as type, rule ID, script ID, parent ID, value, position, custom fields, timestamps, and nested rule structures. This operation is beneficial in scenarios where business logic or conditions need to be dynamically adjusted within Shopware workflows or automation rules.

Use Case Examples

  1. Updating a discount rule condition by changing its type and associated rule ID.
  2. Modifying a parent rule condition to include new child conditions or update existing ones.
  3. Adjusting the position or value of a rule condition to change its evaluation order or criteria.

Properties

Name Meaning
Id Identifier for the rule_condition, required to specify which rule condition to update.
Response Data format for response, used to specify the response format if needed.
Type Type of the rule condition, required to define the condition type.
Rule Id Identifier of the associated rule, required to link the condition to a specific rule.
Script Id Identifier for the script associated with the condition, optional.
Parent Id Identifier of the parent rule condition, optional for hierarchical conditions.
Value JSON object representing the value or parameters of the rule condition.
Position Numeric position of the rule condition, used to order conditions.
Custom Fields JSON object for any custom fields associated with the rule condition.
Created At Timestamp string indicating when the rule condition was created.
Updated At Timestamp string indicating when the rule condition was last updated.
Rule JSON object representing the nested rule structure associated with the condition.
App Script Condition JSON object representing the app script condition details related to the rule condition.
Parent JSON object representing the parent rule condition structure.
Children JSON array representing child rule conditions nested under this condition.

Output

JSON

  • id - Identifier of the updated rule condition.
  • type - Type of the updated rule condition.
  • ruleId - Identifier of the associated rule.
  • scriptId - Identifier of the associated script.
  • parentId - Identifier of the parent rule condition.
  • value - Value or parameters of the rule condition.
  • position - Position of the rule condition.
  • customFields - Custom fields associated with the rule condition.
  • createdAt - Creation timestamp of the rule condition.
  • updatedAt - Last update timestamp of the rule condition.
  • rule - Nested rule structure associated with the condition.
  • appScriptCondition - App script condition details related to the rule condition.
  • parent - Parent rule condition structure.
  • children - Child rule conditions nested under this condition.

Dependencies

  • Shopware API with appropriate credentials

Troubleshooting

  • Ensure the 'Id' property is provided and correctly identifies an existing rule condition to update.
  • Verify that required fields such as 'Type' and 'Rule Id' are included and valid.
  • Check JSON formatting for properties like 'Value', 'Custom Fields', 'Rule', 'App Script Condition', 'Parent', and 'Children' to avoid parsing errors.
  • Confirm that the API credentials have sufficient permissions to update rule conditions in Shopware.
  • If SSL issues occur, consider enabling the 'Ignore SSL Issues' option or verify the SSL certificate validity.

Discussion