Schedule and Time Configuration
Learn how to configure business hours, timezone and time condition handling in your treble conversations.
Introduction
It’s very common for businesses to need to send or receive messages from their customers at specific times. For example, if you have a fast food business, you can send messages to your customers during your business opening hours, or if your business is a pharmacy, you might only want to receive messages from your customers on business days.
Treble allows you to configure business hours, timezone and time condition handling in your conversations. This allows you to send and receive messages from your customers at specific times or even on specific days of the week.
Examples of time condition use cases
- Business hours: If you have a fast food business, you can send messages to your customers during your business opening hours, or if your business is a pharmacy, you might only want to receive messages from your customers on business days.
- Agent group change based on schedule: If your business handles different agent groups based on schedule, you can configure business hours for each agent group.
- Seasonal promotions: If you have a clothing store, you can schedule special offers only during weekends or on specific dates like Black Friday, sending promotional messages only during those periods.
- Delivery service with specific hours: A restaurant can configure to only receive orders via WhatsApp during their operating hours (12:00 PM - 10:00 PM) and send order confirmations only when the kitchen is active.
- Technical support by shifts: A technology company can configure different agent groups based on day and time: basic support agents during the week (9:00 AM - 5:00 PM), specialized agents on weekends, and a 24/7 emergency system for premium customers.
Time condition configuration - Business hours example
To configure time conditions, you must follow these steps:
Create or edit a conversation
Go to the “Conversations” section and click the “Create Conversation” button. You can also edit an existing conversation by clicking the “Edit” button of the conversation you want to edit.
Conditional block
To configure time conditions, you must add a conditional block. Click the button, scroll down and select the Conditions block by clicking on the block.
The conditional block is an advanced block that has many possibilities. If you want to know more about the conditional block, you can read:
Conditional block
Learn more about the conditional block.
Configure the conditional block
Once you’ve added the conditional block, you’ll double-click on the conditional block. This will open the left menu. In the first field of Question Type you’ll select ⏰ Time condition.
Configure timezone
Since we’re configuring a time-based condition, we must also configure the timezone. To do this, at the top you’ll click the Settings button and select Timezone. Here, choose the timezone you want. In this case, we’ll select America/New_York, but make sure to select the one that corresponds to your country.
Configure time conditions
Now, we can configure the time conditions. To do this, click again on the conditional block and you’ll find the Set conditions section. Here, you’ll see a default time condition that you can edit. In turn, you can add more time conditions by clicking the Add condition button.
Edit the time interval fields to fit your business hours. In this case, we’ll configure business hours from 9:00 AM to 5:00 PM. We can also add another time condition so that business hours are from 10:00 AM to 6:00 PM.
Configure each path according to the time condition
Finally, you’ll see that the conditions block already allows you to configure each path according to the time condition. To do this, you can add the message blocks you want to be sent in each time condition.
In all conditional blocks in Treble, it’s always necessary to connect the output of the In all other cases path to a message block. We recommend analyzing your time condition configuration to ensure each path is correctly configured.
You have successfully configured business hours for your conversation. This will allow your conversation flow to behave differently during business hours and closing hours.
Agent group change example based on schedule
To configure an agent group change based on schedule, follow the steps from the previous section. When you already have the time conditions configured, you can add an agent block to change the agent group based on the time condition.
Add an agent block
Learn how to transfer the conversation flow to a specific agent.
Time configuration - Specific days of the week
In the previous sections, you learned how to configure business hours and time conditions. Now, let’s learn how to configure paths in your conversation flow based on specific days of the week. To do this, we’ll go back to creating or editing a conversation and add a conditional block.
Treble handles a native variable called weekday
that allows you to configure paths in your conversation flow based on the day of the week. This variable is an integer that goes from 1 to 7, where 1 is Monday and 7 is Sunday.
The list of days of the week is as follows:
Number | Day |
---|---|
1 | Monday |
2 | Tuesday |
3 | Wednesday |
4 | Thursday |
5 | Friday |
6 | Saturday |
7 | Sunday |
Now, let’s configure a path in our conversation flow based on the day of the week. To do this:
- We’ll add a conditional block and configure the path based on the day of the week.
- Double-click on the conditional block and you’ll find the left menu. We’ll now compare the
weekday
variable with the day of the week number. - Write the word
weekday
in the variable name, change the operator to Equal to and write the day of the week number. - Done! Now, you can add the message blocks you want to be sent in each time condition.
Agent group change example based on business days and weekends
In this example, you can see how we configured for Monday to Friday (weekday
between 1 and 5) a basic support agent team and for weekends we use the conditional block option of in all other cases a specialized agent team.
Mixed example of business hours and specific days of the week
In this example, you can see how we configured for Monday to Friday (weekday
between 1 and 5) an agent team for morning business hours and another for afternoon support. For weekends (weekday
between 6 and 7) a specialized agent team.
Here we combine the use of time conditions and specific days of the week.
You have successfully configured business hours and specific days of the week for your conversation! Now you can experiment with different time configurations for business hours and specific days of the week.