Opening hours: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
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 '''[[App_projects#Project_menu|Project menu]]'''. | 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 '''[[App_projects#Project_menu|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 | 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'''. | Once you're done editing opening hours, click '''Save'''. | ||
[[File:Configure opening hours.png|600px]] | [[File:Configure opening hours.png|600px]] | ||
== 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 '''[[Admin_Console#Entities|Data > Entities]]''', go to the entity that needs custom opening hours (for example, account), and add a new field. | |||
[[File:Custom field for opening hours.png|600px]] | |||
Once the field is created on the backend, go to Woodford and [[App_projects#Managing_fields|enable the field in your app project]]. | |||
== Technical information == | == Technical information == | ||
Revision as of 09:10, 13 July 2021
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.
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:
{
"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"
}
]
}