Booking Appointment Type and optional resources - smbc-digital/form-builder GitHub Wiki
Appointment Type
This object contains the AppointmentId or AppointmentIdKey, and any Optional resources and the Env it is associated with.
Appointment Type object
Property | Type | Required | Default Value | Description |
---|---|---|---|---|
Environment | string | ✔️ | ❌ | Environment |
AppointmentIdKey | string | ✔️ unless AppointmentId set | ❌ | QuestionId of the previous question the AppointmentId is being sourced from - Must be provided if not using a previous question answer |
AppointmentId | string | ✔️ unless AppointmentIdKey set | ❌ | Unique Id for Appointment type - Must be provided here if not being sourced from a question via AppointmentIdKey |
OptionalResources | Array[OptionalResources] | ❌ | ❌ | Optional list of resources for appointment |
AppointmentTypes example
{
"Type": "Booking",
"Properties": {
"AppointmentTypes": [
{
"Environment": "int",
"AppointmentId": "000000000000-0000-0000-0000-000000000000"
},
{
"Environment": "qa",
"AppointmentId": "000000000000-0000-0000-0000-000000000000"
}
]
}
}
Optional Resources property expects an array of BookingResource object which requires a ResourceId and Quanity supplied
Optional Resource object
Property | Type | Required | Default Value | Description |
---|---|---|---|---|
ResourceId | Guid | ✔️ | ❌ | Id for Resource |
Quantity | int | ✔️ | ❌ | Quantity |
{
"Type": "Booking",
"Properties": {
"AppointmentTypes": [
{
"Environment": "int",
"AppointmentId": "000000000000-0000-0000-0000-000000000000",
"OptionalResources": [
{
"ResourceId": "0000000-0000-0000-000-000000000000",
"Quantity": 1
}
]
}
]
}
}
Appointment Id Sourced from the previous answer
The AppointmentTypes array will need to include 'AppointmentIdKey' field to match the question id to retrieve the element appointment id value.
{
"Type": "Booking",
"Properties": {
"AppointmentTypes": [
{
"Environment": "int",
"AppointmentIdKey": "questionid"
}
]
}
}