Skip to main content
All CollectionsAdminStudio settings
Outfit pairing rules (coming soon)
Outfit pairing rules (coming soon)
Ha Ngan Nguyen avatar
Written by Ha Ngan Nguyen
Updated over a week ago

If you are a multi-brand retailer, you often have to face the hard task of following agreements on which brands you can combine in outfits. With Outfit paring rules in Creative Force, the outfit combinations will be validated right at the creation time, allowing you to update them and avoid further mistakes.

Outfit pairing rules is an add-on feature, please contact your CSM for further details.

Once the feature is enabled on your account, you can go to Studio Settings -> Clients -> Edit -> Styling settings. By default, this feature is disabled on the Client.

From here, click Add Pairing Rules, you will then see the Pairing rules editor appear. You can add as many rules as you want.

Pairing rules validation

Once the rules are made, you will then see if the outfits are created correctly from various places within the CF system.

In Gamma

Within the Outfit creation box.

Within the Styling tab on the product slide-in.

If the rules are not met, you will see an invalid alert.

In Kelvin

Pairing rules editor

You can now define the rules in YAML in the editor. After you've applied your rules, you can download it to your local machine for additional editing. If there are errors, detailed messages will guide you to resolve them, you must correct the rules before saving them. When adding rules directly to the editor, syntax validation will happen continuously.

This rule can be edited and you will need to save changes to update the pairing rules. The system will keep a version history, showing when and by whom changes were made. The version history date time will be displayed according to the user’s time zone settings.

1. Detailed Error Reporting for YAML validation

  • Detailed error messages will be shown if YAML validation fails.

  • If possible, the line number causing the error will be displayed to help with the troubleshooting.

2. Handling Property Name Changes

  • If a property name doesn’t exist during import, an error will be shown.

3. Handling Deleted Properties

  • If a property is deleted, the rule will be skipped. The latest version will remove the rule, but the history will keep the old name.

YAML Structure Examples

1. Rule Logic

  • Definition: Each rule set consists of a primary section and a secondary section. Each section contains a list of rules, and each rule contains comparisons.

  • Comparison Logic: Comparisons are made between properties of the primary and secondary products.

Note:

  • The rule only validates secondary products

  • When using the following operators withInDay, withInMonth, withInYear the property datatype must be Datetime or Date

  • Primary condition, Sections and Rules cannot be null

2. Structure Reference

  • Operators:

    • Equal: the value must be an exact match

    • In: the value can be one of the values in the list

    • withInDay: the value must be in DateTime or Date format

    • withInMonth: the value must be in DateTime or Date format

    • withInYear: the value must be in DateTime or Date format

  • Special Values:

    • THE_SAME_PRIMARY: The value of the secondary product in a property is the same as the primary product.

  • Keywords:

    • primary: Rule of the primary product

    • secondary: Rule of secondary product

    • sections: OR logical operation in a rule

    • rules: AND logical operation in a rule

    • property: Name of Product Property

    • operation: List of supported operators

    • value: The value of the property and type can be a string value

    • withInBefore, withInAfter: Number of time unit value, compatible when the operator is (withInDay, withInMonth, withInYear)

    • anchor: Boolean value true/false. We use this rule to identify secondary products in case invalid rule. For this case, we will find the first non-anchor rules that don’t match the condition and show them to the users

Note:

  • YAML is case-sensitive

  • YAML is whitespace-sensitive, and indentation defines the structure but does not accept tabs for indentation

  • Empty lines are ignored

  • Comments are preceded by an octothorpe #

  • List of markdown elements supported: Heading, Bold, Italic, Blockquotes (single), Lists (Order/Unorder), Code block, Link

3. Full Example in YAML

outfitRules:
- name: MadeUpBrand pairing rules
primary:
sections:
- rules:
- property: Brand
operator: Equal
value: MadeUpBrand
secondary:
sections:
- rules:
- property: Department Name
operator: Equal
value: ACCESSORIES
anchor: true
- property: Brand
operator: IN
value:
- THE_SAME_PRIMARY
- AnotherMadeUpBrand
- property: Launch Date
operator: withInMonth
withInBefore: 1
withInAfter: 1

Did this answer your question?