Schedule Objects
A Schedule Object is a type of App Object with a pre-defined structure intended to capture all relevant information pertaining to a scheduled appointment. Schedule Objects are used in tandem with a Scheduler Web Control; when a Schedule Object is associated with a scheduler, all relevant information collected by users from the scheduler will be automatically inserted into that Schedule Object in AirData.
Schedule Structure
A Schedule Object must contain the following six properties:
session_id (
string
) - indicates the Journey that the appointment is associated with. This corresponds the Session ID (designated session.id) automatically assigned as a session-level variable at the start of each Journey.start_time (
DateTime
) - refers to the beginning date and time of the appointment.end_time (
DateTime
) - refers to the ending date and time of the appointment.recurrence (
number
)- indexes the block of time selected for the appointment. Count begins at 0 and on the first occurrence of a potential appointment window, as defined by the Time Slots that make up the Availability Schedule tied to the associated Scheduler Web Control.calendar_event_id (
string
) - serves as an identifier for the Time Slot (as defined in the Calendar Builder – note that this is not the same as the selected block of time which is indicated by recurrence) that defined the selected appointment block.calendar_id (
string
) - serves as an identifier for the particular instance of Scheduler Web Control used to make the appointment. This becomes particularly relevant in cases a Journey contains multiple schedulers associated with the same Schedule Object.
Application of Schedule Objects
To create a new Schedule Object, go to AirData Builder and:
Click the '+' icon to the right of the App Objects section in the Tree.
Select Add Schedule from the menu that appears.
Schedule Objects are used in tandem with a Scheduler Web Control, automatically saving selected appointments to AirData. Sometimes, it is useful to save that data locally as well, so that it can be easily be referenced at future points within the application flow. To do this:
Create a local variable in the Variable Tree. The Type of this variable should correspond to the Schedule Object. (The following example references a global variable called
appointment
.)
Examine the Scheduler Web Control and toggle to the Actions tab in the Inspector. Use the **Set Variable ** Action to set the Schedule Object variable to the value associated with the Scheduler Web Control. Within the Event associated with the Scheduler Web Control, that's accessible as
value
.
Reference this Schedule Object variable as you would any other object, using dot notation to reference individual properties. For instance, say you want to remind users of the appointment time they selected, you might reference the
start_time
property like so:
The FORMAT_DATETIME function converts the referenced DateTime in to a more legible format.
Last updated