Opening hours
For many entities, for example, accounts or contacts, you can configure opening hours. This can be useful when planning appointments using the route plan so that you don't plan to visit someone when they are not available. Edit an app project and select Opening Hours from the Project menu.
For each entity, you can configure multiple intervals of opening hours each day. The setting configured on the entity level in Woodford is the default value, used if the record does not have custom opening hours configured. To enable custom opening hours, select the field on the entity that contains the opening hours information.
Once you're done editing opening hours, click Save.
Custom field for opening hours
In order to configure opening hours per-record, you need to add a custom field to your entity. This field must be of the type single line of text and the recommended minimum length is 1000 characters.
To add fields to an entity, you need to change the data model. For example, for Resco Cloud, use the Admin Console. Select Data > Entities, go to the entity that needs custom opening hours (for example, account), and add a new field.
Once the field is created on the backend, go to Woodford and enable the field in your app project.
Opening hours in the app
Users of the mobile app can then modify the opening hours of a particular record.
Technical information
If you need to read or modify the opening hours in an external system, information about the exact syntax of the custom text field can help you get started. Opening hours are stored in JSON format in the following structure.
Tip | If you want to define one period of opening hours per day, use morningOpen and afternoonClose as shown in the Tuesday example. |
{
"periods": [
{
"periodId": 1,
"periodLabel": "Monday",
"morningOpen": "09:00",
"morningClose": "12:00",
"afternoonOpen": "12:30",
"afternoonClose": "17:00"
},
{
"periodId": 2,
"periodLabel": "Tuesday",
"morningOpen": "09:00",
"afternoonClose": "17:00"
},
{
"periodId": 3,
"periodLabel": "Wednesday",
"morningOpen": "09:00",
"morningClose": "12:00",
"afternoonOpen": "12:30",
"afternoonClose": "18:00"
},
{
"periodId": 4,
"periodLabel": "Thursday",
"morningOpen": "09:00",
"morningClose": "12:00",
"afternoonOpen": "12:30",
"afternoonClose": "17:00"
},
{
"periodId": 5,
"periodLabel": "Friday",
"morningOpen": "09:00",
"morningClose": "12:00",
"afternoonOpen": "12:30",
"afternoonClose": "17:00"
},
{
"periodId": 6,
"periodLabel": "Saturday",
"morningOpen": "10:00",
"morningClose": null,
"afternoonOpen": null,
"afternoonClose": "12:00"
},
{
"periodId": 0,
"periodLabel": "Sunday",
"morningOpen": "10:00",
"morningClose": null,
"afternoonOpen": null,
"afternoonClose": "12:00"
}
]
}