You are here:
Any Context Scope
The any context scope enables you to create context
mappings that can be used across all root context scopes. For example,
instead of creating separate context mappings to evaluate the status field
across orders, quotes, and opportunities, you can use any
context scope to evaluate the status for all root entities, including orders
and quotes. You can also specify any as the entity for
second-level context scopes, enabling you to evaluate information in
accounts and contracts across all root entities.
While the any context scope allows more flexibility and
efficiency when defining context mappings, in some cases, when you know that
the value can come from only on sObject, you might want to explicitly
specify that object as the root scope entity. By doing so, you limit the
number of fields that are retrieved and stored in the session cache. When
the context scope is Order.Account, the rules engine retrieves fields from
the account sObject only. If the context scope is Any.Account, the rules
engine retrieves fields from all root entities: Order, Opportunity, Quote,
and Asset. For example, the Originating Channel field
only exists on the Order object. If you specify Any as the root entity for
Originating Channel, the system will look across all root entities even
though it only exists on Order, which is not an efficient design.
