CustomfieldAvailability
A CustomfieldAvailability configures in what saleschannels a custom field is available (during the checkout).
It can also further refine the availability based on a script written in JavaScript.
More information about writing order scripts can be found here.
Fields
Field | Description |
---|---|
saleschannels int[] (required) | The custom field will be available for these saleschannels. It this is empty the custom field will not be available. Example value:[ 14 ] |
script string (required) | A Javascript that needs to return a boolean. It has the current order available. Example value:"return order.tickets.length>3;" |
usescript bool (required) | Indicates if the script will be used. Example value:true |
Example
1{
2 "saleschannels": [ 14 ],
3 "script": "return order.tickets.length>3;",
4 "usescript": true
5}