Object scripts
An object script is one that monitors changes to an objects and runs asynchronously after the action has been carried out.
The scripts can be set up in the script manifest like:
{
"name": "CreateBooking",
"description":"Called when a booking is created",
"type":"Bookings",
"actions": ["after_create"],
"log_type": "Tail",
"enabled": true,
"handler": "create_booking"
}
The type
is always the object name and the actions
are the callbacks to trigger on
A full list of currently supported types and actions is:
Type | Actions | |
---|---|---|
Bookings | after_create, after_update, after_delete | A customer appointment booking record |
Clients | after_create, after_update | A customer record |
Calendar Slot | create_calendar_entry, delete_calendar_entry, move_calendar_entry, update_calendar_entry | A Timeslot in a staff members or resources calendar |
EventChain | after_create, after_update | A single or series of events has been created or updated |
Slot | after_create, after_update | A staff timeslot - which could be a booking or an occurrence of an event |
Updated over 3 years ago