DeliveryRequestTemplateInstance
The DeliveryRequestTemplateInstance
will define that a certain DeliveryRequestTemplate
should be created for EditorialObjects matching a certain filter.
Property Reference
This is a table of the properties of a DeliveryRequestTemplateInstance
object. Some properties are discussed in more detail below.
Field Name | Required | Type | Description | Format |
---|---|---|---|---|
created |
✘ |
Date |
The time when this resource was created |
date-time |
createdBy |
✘ |
String |
The request or process that created this resource |
|
id |
✔ |
Long |
The id of this resource |
int64 |
lastUpdated |
✘ |
Date |
The time when this resource was last updated |
date-time |
modifiedBy |
✔ |
String |
The request or process responsible for the last update of this resource |
|
objectType |
✘ |
String |
The data model type or class name of this resource |
|
overrideProperties |
✘ |
Object |
||
query |
✘ |
ObjectFilter |
||
template |
✘ |
DeliveryRequestTemplate |
||
templateContext |
✘ |
String |
||
templateGroup |
✘ |
DeliveryRequestTemplateGroup |
||
templateHandle |
✘ |
String |
||
version |
✔ |
Long |
The version of this resource, used for Optimistic Locking |
int64 |
query
The query property determines
whether the Editorial Object fulfils the condition for creating a DeliveryRequestInstance
.
overrideProperties
The DeliveryRequest
is created using the values defined in the template,
after which some properties can be overwritten by the values in overrideProperties
.
Expressions are supported by prefixing the property with @.
Then the value of the property is evaluated with the expression engine. The objects available for use in these expressions are listed in the table below.
object | Description |
---|---|
|
the production in which the DeliveryRequest will be created |
|
the settings of the production |
|
the editorialObject the DeliveryRequest will be attached to (optional) |
|
the account of the production |
|
the settings of the account |
|
the list of production participants
|
|
If the bootstrap task has input
one can use |
More Examples
Example 1
Below you can see a DeliveryRequestTemplateInstance
which defines that for each EditorialObject
which has a custom field productType
with value "Series"
, there should exist a DeliveryRequest
based on the DeliveryRequestTemplate
with handle
"seasonVisuals"
.
{
query: {
key: 'editorialObject.customFields.productType.value',
values: [
'Series'
],
},
templateHandle: 'seasonVisuals',
templateContext: 'EditorialObject',
overrideProperties: {
volumeAccessQuery: {
key: 'handle',
'@values': [
'context.parameters.volumeAccessHandle'
],
},
},
}
The query property determines
whether the Editorial Object fulfils the condition for creating a DeliveryRequestInstance
.
{
query: {
key: 'editorialObject.customFields.productType.value',
values: [
'Series'
],
},
...
}
The Editorial Object must have a custom field called productType
with value 'Series'.
If this is the case, a DeliveryRequest
will be created based on the template given by seasonVisuals
for this Editorial Object.
The overrideProperties
is used to set certain fields of the request based on properties of the EditorialObject or the context.
Example 2
Below you can see a DeliveryRequestTemplateInstance
which defines that for each EditorialObject
which has a custom field productType
with value "Series"
, there should exist a DeliveryRequest
based on the DeliveryRequestTemplate
with handle
"seasonMetadata"
.
The overrideProperties
are used here to set the description
of the DeliveryRequest
, as well as set the defaultValue
of some of the form fields.
{
query: {
key: 'editorialObject.customFields.productType.value',
values: [
'Series'
],
},
templateHandle: 'seasonMetadata',
templateContext: 'EditorialObject',
overrideProperties: {
'@description': "'Please provide the season-level metadata for '+ editorialObject.customFields.episodeTitle.value",
formFieldDefaultValues: {
productionHouse: {
'@value': 'editorialObject.customFields.productionHouse.value',
},
externalReference: {
'@value': 'editorialObject.customFields.externalReference.value',
},
},
},
}