​Delay in "end" action

You can schedule a delay for the end of a chat. The delay will be unscheduled if the visitor types a message/ sends a message/ agents join the chat/  chat is handed off to the agent. The minimum delay that can be set is 30 seconds and the maximum is 10800 seconds(3 hours).

Use Case:

​Context Handler function:

Copiedresult = Map();
response = Map();
response.put("action", "end");
response.put("delay", "30");
response.put("replies",["Ok, I'll be ending this chat soon anytime now"]);
prompt = Map();
prompt.put("param_name", "delay");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;

Execution Function:

Copiedresult = Map();
response = Map();
response.put("action", "end");
response.put("delay", "30");
response.put("replies",["Ok, I'll be ending this chat soon anytime now"]);
result.put("data", response);
return result;

Output: