Managing string list attributes with collections
Attributes are what you build promotion rules on in the Rule Builder. A String List attribute holds a set of allowed values, for example a list of payment types or store locations, which then appear as options when you create a rule.
Inline values and Collections do the same job, they just differ in scale. Use inline values for a handful of options you are happy to manage by hand. Use a Collection for anything long, changeable, or reused across attributes.
Choosing a value source for a String List attribute
When you set a String List attribute you now pick one of two value sources:
| Value source | What it does |
|---|---|
| Enter values inline | Type or paste values straight into the form. You can paste in bulk, up to a maximum of 30 values. |
| Use a Collection | Point the attribute at a Collection you have already built in Settings. |
Inline values are capped at 30. Once your list needs to go beyond that, build a Collection instead. There is no way to exceed 30 inline.
Creating a Collection
- Go to Settings in the left-hand menu, then Collections. Any Collections created previously are listed here.
- Select Create a Collection.
- Give it a title.
- Choose a data source. You have three options: Upload a file, Comma separated values, or Line separated values.
- Add your values. A Collection holds a single column of data, so enter one value per entry.
- Select Create. Your Collection now appears in the Collections list and is available to any String List attribute.
Using a Collection in an attribute
- Go to Attributes, then Add attribute.
- Choose the entity the attribute belongs to, for example Product, Customer, Shipping, Order or Payment.
- Give the attribute a name and description.
- Set the Type to String List.
- Under value source, select Use a Collection.
- Pick your Collection from the dropdown.
- Finish setting up the attribute and save.
Editing a Collection
Collections are easy to keep up to date, and any change flows through to every attribute using it.
- Go to Settings > Collections.
- Open the relevant Simple List Collection.
- Go to Details.
- Add, edit or delete values as needed.
How it looks in the Rule Builder
When you build a promotion and add a rule using an attribute backed by a Collection, for example a qualification rule on location, every value in the Collection appears as a dropdown for you to select from. That means no retyping and no risk of typos when defining rules.