OrderfeeScriptContext

More info about order fees can be found here.

Fields

FieldDescription
cacheable
bool

If set to true the query will be cached for 60 seconds. If not set the query will be executed again every time a script is executed.

key
string 
(required)

The name of the variable that will be added to the script environment.

Example value:"cnt"
query
string 
(required)

The query that will be executed on the public data model. The result will be available in the script environment.

Example value:"select count(*) as nbr from tm.ticket where orderid={1}"

Example

1{
2    "cacheable": false,
3    "key": "cnt",
4    "query": "select count(*) as nbr from tm.ticket where orderid={1}"
5}