Core policies
Version:
The Core plugin contributes configuration policies that define behavior for the functionality provided by the plugin.
Note
Do not extend or inherit from out-of-the-box policies; instead, create your own.
You can change the values of default policies by modifying the PolicySet JSON or the Environment JSON, depending on where the policy is defined, and then re-running Bootstrap.
The following policies can be configured through the Core plugin.
| Policy | Description | Properties / Default Values |
|---|---|---|
ControllerMethodRolesPolicy | Defines which user roles have access to the different service routes. | ControllerMethodRegularExpression<br>AuthorizedRoles \ List<string> |
KnownMessageCodePolicy | Defines the code for messages added to entities. | Pricing `"Pricing"<br><br>Promotions\"Promotions"` |
ListNamePolicy | Defines the naming convention for entity lists. | Prefix \ "List"Suffix \ "ByDate"Separator \ "-" |
MaxLengthPolicy | Defines the maximum length allowed for text properties. | MaxLengthAllow \ 0 |
MinMaxValuePolicy | Defines the minimum and maximum value for decimal properties. | MaxAllow \ 0MinAllow \ 0 |
PaginationPolicy | Defines settings for pagination. | PageSize \ 10PageSizeOptions \ List<int> { 5, 10, 25, 100 } |
ApprovalStatusPolicy | Defines the status names that are part of the approval processes. | Draft \ "Draft"Approved ` "Approved"<br><br>ReadyForApproval \"ReadyForApproval"` |
EntityCachingPolicyNote The EntityMemoryCachingPolicy is deprecated as of Sitecore XC release 9.2. | Defines the cache policy for entities. | EntityFullName = string.EmptyAllowCaching \ falsePriority ` string.Empty<br><br>Expiration \ 300000<br><br>AbsoluteExpirationRelativeToNow\null<br><br>SlidingExpiration\null<br><br>HasNegativeCaching \ false<br><br>CacheName = string.Empty<br><br>EntityIdPrefix=true` |
KnownResultCodes | Defines the result codes for command requests and messages. | Error \ "Error"Warning \ "Warning"Information \ "Information"ValidationError \ "ValidationError" |
LocalizeEntityComponentPolicy | Defines which entity component properties can be localized. | Path <br>Properties <br>ActionView <br>IsItemComponent \ false |
LocalizeEntityPolicy | Defines which entity properties can be localized. | Type <br>Properties <br>ActionView <br>ComponentsPolicies \ Enumerable.Empty<LocalizeEntityComponentPolicy> |
EnvironmentInitializationPolicy | Defines which artifact should be initialize for an environment. | InitialArtifactSets \ List<string> |
GlobalCurrencyPolicy | Defines global currency settings. | DefaultCurrencySet ` string.Empty` |
LocalizedTermsCachePolicy | Defines the cache policy for localized terms. | Expiration \ 300000AllowCaching \ trueCacheName ` "LocalizedTerms"` |
MinionBossPolicy | Defines settings for a minion boss. | FullyQualifiedName <br>WakeupInterval <br>ItemsPerBatch \ 10SleepBetweenBatches \ 500Children \ List |
MinionPolicy | Defines settings for a minion. | ListsToWatch <br>FullyQualifiedName <br>WakeupInterval <br>ItemsPerBatch \ 10SleepBetweenBatches \ 500 |
NodeHeartBeatPolicy | Defines the behavior of the context node. | LogHeartBeats \ false |
PerformancePolicy | Defines performance settings. | WriteCounters \ trueCountersVersion \ string.Empty |
PluginPolicy | Defines settings for a plugin. | Plugin \ string.EmptyIcon \ string.Empty |
KnownServiceRoutesPolicy | Defines the service routes. | CommerceOps \ "commerceops"Shops \ "api"Authoring \ "api" |
TransactionsPolicy | Defines settings for transactions. | TransactionalityEnabled \ trueTransactionTimeOut \ 60 (this represents seconds)AsyncFlowOption \ TransactionScopeAsyncFlowOption.Enabled |
ValidationPolicy | Defines validation settings for entities. | TypeFullName \ string.Empty |
RedirectOnCreationPolicy | Determines whether a Business Tools user is redirected to the a new entity instance upon creation. | Presence of this policy in the authoring environment configuration .json file implements the action to redirect the business user to the newly created entity instance. |
IgnorePublishedPolicy | Determines whether a request for an entity in a given environment applies without regards to the entity's publishing workflow state, that is, whether or not the entity is published to the Content Delivery role. | Presence of this policy in an environment configuration allows the environment to see all entities - unpublished or published. The IgnorePublishedPolicy policy is present in the default CommerceAuthoring and CommerceMinions environment .json files. The policy also affects entity caching and indexing processes.When the Business Tools send a request to the Commerce Engine for an entity, the publishing status of the entity is ignored, and the request targets the latest version of the entity. Commerce engine minions process entities whether published or unpublished. This policy is not used in the Shops environments. Requests to the Commerce Engine from storefronts always target published entities. |
Note
Do not extend or inherit from out-of-the-box policies; instead, create your own.
You can change the values of default policies by modifying the PolicySet JSON or the Environment JSON, depending on where the policy is defined, and then re-running Bootstrap.
If you have suggestions for improving this article, let us know!