Represents the details of a context definition that describe
the relationship between the node structures within a context.
Where possible, we changed noninclusive terms to align with our
company value of Equality. We maintained certain terms to avoid any effect on
customer implementations.
Parent Type
This type extends the
Metadata metadata type
and inherits its
fullName field.
File Suffix and Directory Location
ContextDefinition components have the suffix .contextDefinition and are stored in the contextDefinitions folder.
Version
ContextDefinition components are available in API version 59.0 and later.
Special Access Rules
Enable Context Service to access the ContextDefinition metadata type.
Fields
| clonedFrom |
- Field Type
- string
- Description
- The name of the context definition that's used to clone the current context definition.
|
| contextDefinitionVersions |
- Field Type
- ContextDefinitionVersion[]
- Description
- Version of the context definition.
|
| contextTtl |
- Field Type
- int
- Description
-
Duration to persist the data, which is loaded in the run-time context instances
created by this context definition, in the
cache.
- The default value is 10 minutes.
|
| description |
- Field Type
- string
- Description
- Description of the context definition.
|
| inheritedFrom |
- Field Type
- string
- Description
- Name of the parent context definition that's used to
derive the current context definition.
|
| inheritedFromVersion |
- Field Type
- string
- Description
- Version number of the parent definition that's used to
derive the current context definition.
|
| isProtected |
- Field Type
- boolean
- Description
- Auto-generated value that doesn’t impact the behavior of the metadata type.
|
| masterLabel |
- Field Type
- string
- Description
-
Required.
User-friendly name for the context definition, which is defined when the context definition is
created.
|
| title |
- Field Type
- string
- Description
-
Required.
Name of the context definition.
|
ContextDefinitionVersion
Represents details about the context definition version. Only one version can be active at a
time.
| contextMappings |
- Field Type
- ContextMapping[]
- Description
- Mapping of attributes and nodes to related objects.
|
| contextNodes |
- Field Type
- ContextNode[]
- Description
- Details of the structure of the nodes within the context.
|
| endDate |
- Field Type
- string
- Description
- Date and time when the context definition version becomes inactive.
|
| isActive |
- Field Type
- boolean
- Description
- Indicates whether the context definition version is
active (true) or
not (false).
- The default value is false.
|
| startDate |
- Field Type
- string
- Description
-
Required.
Date and time when the context definition version becomes active.
|
| versionNumber |
- Field Type
- int
- Description
-
Required.
Version number of the context definition.
|
ContextMapping
Represents the mapping of attributes and nodes to related objects.
| contextMappingIntents |
- Field Type
- ContextMappingIntent[]
- Description
- Purpose associated to a context mapping.
|
| contextNodeMappings |
- Field Type
- ContextNodeMapping[]
- Description
- Mapping of the node in the context and values in the
input schema.
|
| default |
- Field Type
- boolean
- Description
- Indicates whether the mapping for a context definition
version is default (true) or not (false).
- The default value is false.
|
| description |
- Field Type
- string
- Description
- Description of the context mapping.
|
| inheritedFrom |
- Field Type
- string
- Description
- Name of the parent mapping that's used to derive the
current mapping.
|
| title |
- Field Type
- string
- Description
-
Required.
Name of the context mapping.
|
ContextMappingIntent
Represents the purpose associated to a context mapping.
| mappingIntent |
- Field Type
- ContextMappingIntentType (enumeration of type string)
- Description
-
Required.
Specifies the purpose that's used to identify the type of context
mapping required.
Valid values are:
- Hydration
- Association
- Persistence
- Translation
|
ContextNodeMapping
Represents the relationship between the node in the context and values in the input schema.
| contextAttributeMappings |
- Field Type
- ContextAttributeMapping[]
- Description
- Mapping of the attribute defined in the context and the values in the related
objects.
|
| contextNode |
- Field Type
- string
- Description
- Context node record associated with the context node mapping.
|
| inheritedFrom |
- Field Type
- string
- Description
- Name of the parent context node mapping that's used to derive the current context node
mapping.
|
| mappedContextDefinition |
- Field Type
- string
- Description
- API name of the context definition for existing context-to-context mappings.
|
| object |
- Field Type
- string
- Description
- Name of the object used for the mapping.
|
ContextAttributeMapping
Represents the relationship between the attributes defined in the context and the values in the
related objects.
| contextAttrHydrationDetails |
- Field Type
- ContextAttrHydrationDetail[]
- Description
- Details of the SOQL (database) queries that fetch data for a chosen attribute from the
input schema.
|
| contextAttribute |
- Field Type
- string
- Description
- Context attribute record associated with the context attribute mapping.
|
| contextInputAttributeName |
- Field Type
- string
- Description
-
Required.
Name of the input attribute.
|
| ctxAttrHydrationCtxs |
- Field Type
- CtxAttrHydrationCtx[]
- Description
- Query that fetches data for a chosen attribute from the input schema for
context-to-context mapping.
|
| inheritedFrom |
- Field Type
- string
- Description
- Name of the parent context attribute mapping that's used
to derive the current context attribute mapping.
|
ContextAttrHydrationDetail
Represents the SOQL (database) queries that fetch data for a chosen attribute from the input
schema.
| contextAttrHydrationDetails |
- Field Type
- ContextAttrHydrationDetail[]
- Description
- Details of the query that fetches the data for the specific query attribute.
|
| inheritedFrom |
- Field Type
- string
- Description
- Name of the parent context attribute hydration detail
that's used to derive the current context attribute
hydration detail.
|
| objectName |
- Field Type
- string
- Description
-
Required.
Name of the object used for the attribute hydration detail.
|
| queryAttribute |
- Field Type
- string
- Description
-
Required.
The SOQL query that is the source of the hydration.
|
CtxAttrHydrationCtx
Represents the queries that fetch data for a chosen attribute from the input schema
for context-to-context mapping.
| contextQueryAttribute |
- Field Type
- string
- Description
-
Required.
Attribute in context definition that's
the source of context hydration.
|
| inheritedFrom |
- Field Type
- string
- Description
- Name of the parent context attribute hydration detail
that's used to derive the current context
attribute.
|
ContextNodeAttrDictionary
Represents the relationship between a context node and the context attribute dictionary.
| contextAttrDictIdentifier |
- Field Type
- string
- Description
-
Required.
Developer name of the context attribute
dictionary.
|
| contextNodeTagPrefix |
- Field Type
- string
- Description
-
Required.
Tag prefix of the context node that's
used to create the unique identifier of the parent
context node.
|
ContextNode
Represents details of the structure of the nodes within the context. Each node can have other
nodes related to them and attributes to describe the object. You can also define a
hierarchy for the nodes.
| canonicalNode |
- Field Type
- string
- Description
- Canonical node that's associated with the context node.
|
| contextAttributes |
- Field Type
- ContextAttribute[]
- Description
- Details of the attribute used to describe the context
node.
|
| contextNodeAttrDictionaries |
- Field Type
- ContextNodeAttrDictionary[]
- Description
- Facilitates relationships between context node mapping and context dictionary.
Additionally, it records the relationship between
context node and context dictionary.
|
| contextTags |
- Field Type
- ContextTag[]
- Description
- Unique identifier of the attribute or node.
|
| displayName |
- Field Type
- string
- Description
- Display name of the context node.
|
| inheritedFrom |
- Field Type
- string
- Description
- Name of the parent context node that's used to derive
the current context node.
|
| title |
- Field Type
- string
- Description
-
Required.
Name of the context node.
|
| transposable |
- Field Type
- boolean
- Description
- Indicates whether the data in the Context Node record
can be converted to field names (true) or not (false).
- The default value is false.
|
ContextAttribute
Represents details of an attribute used to describe a context node. Each node can have one or
many associated attributes.
| contextTags |
- Field Type
- ContextTag[]
- Description
- Shortened name of the attribute or node.
|
| dataType |
- Field Type
- ContextAttributeDataType
(enumeration of type string)
- Description
-
Required.
Type of data that's stored in the context attribute.
Valid
values are:
- boolean
- currency
- date
- datetime
- number
- percent
- picklist
- reference
- string
|
| domainSet |
- Field Type
- string
- Description
- List of node references to show the parent-child relationship between the nodes in a
definition.
|
| fieldType |
- Field Type
- ContextAttributeFieldType
(enumeration of type string)
- Description
-
Required.
List of node references to depict the parent-child relation between
the nodes in a definition.
Valid values
are:
- aggregate
- input
- inputoutput
- output
|
| inheritedFrom |
- Field Type
- string
- Description
- Name of the parent attribute that's used to derive the
current attribute.
|
| key |
- Field Type
- boolean
- Description
- Indicates whether the attribute is a key attribute in
the node (true) or
not (false).
- The default value is false.
|
| title |
- Field Type
- string
- Description
-
Required.
Name of the context attribute.
|
| value |
- Field Type
- boolean
- Description
- Indicates whether the attribute identifies as a value in
a node (true) or
not (false).
- The default value is false.
|
ContextTag
Represents a unique identifier of an attribute or node instead of a fully qualified tag
structure name.
| title |
- Field Type
- string
- Description
-
Required.
Name of the context tag.
|
| inheritedFrom |
- Field Type
- string
- Description
- Name of the parent context tag that's used to derive the
current context tag.
|
Declarative Metadata Sample Definition
The following is an example of a ContextDefinition component.
The following is an example package.xml that
references the previous definition.