Optionally, add resolvers to define where an attribute pulls information from.
Add an attribute and configure the attribute's general settings.
-
Add a resolver to the attribute:
-
In the Resolvers section, do one of the
following:
- Click + Add Resolver.
- Click + Add Parent Resolver.Note:
This is an optional shortcut that resolves the attribute against its parent. You can add a parent resolver if the attribute has a parent and doesn’t already have a parent resolver. If you add a parent resolver, skip step 1c.
- Optional:
Update the Resolver Name.
By default, the name is a combination of the resolver type and associated information, such as the attribute name for an Attribute resolver.
-
Select a Resolver type.
For more information about resolver types, see Resolvers.
-
In the Resolvers section, do one of the
following:
- Optional:
To invoke a resolver only under certain conditions, add conditions to the resolver:
-
Click the hamburger menu next to the Resolver
Name and select Add
Condition.
Tip:
You can remove a condition the same way.
-
To add a comparison to the condition, click +
Comparison.
-
Select an attribute to use in the comparison, select a comparator, and
then enter a constant or click the Switch to
Attribute (
) icon to select an attribute.
When you select an attribute, you can select a property that’s grayed out to generate an attribute that resolves against the parent attribute’s JSON schema. If the property is nested, generate an attribute for the property above first, and then generate an attribute for the child property.
-
To nest a comparison under another comparison, click +
Group.
Subgroups allow more permutations in comparisons. To remove nesting while keeping the comparison, click Ungroup.
- To select a named condition, click + Named Condition, select a condition, and then select is True or is False.
-
To combine multiple conditions, named conditions, or groups, select one
of the following options:
- All: Invokes the resolver when all of the conditions are true. This is like adding an AND Boolean operator between conditions.
- Any: Invokes the resolver when at least one of the conditions is true. This is like adding an OR Boolean operator between conditions.
- None: Invokes the resolver when none of the conditions are true. This is like adding a NOT Boolean operator.
-
Click the hamburger menu next to the Resolver
Name and select Add
Condition.
-
Add processors to transform the value returned by the resolver.
For details, see Adding processors to an attribute.
Tip:Icons next to the Resolver Name field indicate at a glance whether a resolver has conditions, processors, or both.
You can copy resolvers defined in an attribute by selecting Make Copy from the hamburger menu of that resolver. Copying a resolver also copies any processors or conditions defined in that resolver.