https://retellai.com/?utm_source=discord&utm_medium=seo logo
Call Transfer Only During Office Hours
# 📒・feature-requests
j
Customers might want to transfer a call to a human outside of office hours - the Call Transfer function should only be available during a set of customisable hours, like Synthflow does. This helps their expectations and prevents calls at crazy times
u
You can add a dynamic variable for the current time and instruct the agent to only transfer when within hours.
e
@.sahbak that isnt reliable at all i've found
s
just make a webhook to a python script or make.com, webhook sends time, convert to timezone of your user, check current time, if time falls in between business hours return is_within_hous == true Than transfer is_within_hours == false, than don't try transfer
m
@swek94 I've tried that as well, but if you insist or say that it is during opening hours it will still transfer
r
the way i have it set up is a conversation flow that uses a script to determine current time, if current time falls within the equation then it warm transfers, otherwise it cold transfers. maybe something like that could help you
s
than you are doing something wrong, it works for me, here's a screenshot. yours will be somthing like tool had a result {"within_business_hours":"yes"} tool had a result {"within_business_hours":"no"} If yes connect to a transfer node, if no choose other path
you will probably have to work with a python script, you retrieve the time when the http request was sent out to your script, pull business day and hours and time zone out of a database that stores the info for the particular client. Compare, if time of webhook request is within business hours return within_business_hours":"yes" is not within business hours "within_business_hours":"no"
a new conversation flow of mine has to have this functionality, i'll build it, if i fail or it works i'll let you know. probably be done within 7 days, it's not my focus at the moment
m
@swek94 makes sense, I think that'll work. Unfortunately I'm only working with Single Prompt agents
r
Ah that's why
I have something similar except with a Google Script checking the time.
s
i got it working on my end in parameters { "type": "object", "properties": { "client_id": { "type": "string", "description": "{{client_id}}", "required": [ "client_id" ] } } } my python service (message.txt)