When does a conversation close occur in Treble?

In Treble, conversation flows (conversations) are “closed” when any of the following actions occur:

The customer responds to any final message block.

Imagine that conversations in Treble are like a tree with many branches. Each time a customer makes a decision, it’s like choosing a branch to follow. At the end of each branch, there’s a leaf. When the customer reaches a leaf and responds to the last message, the conversation closes. It’s as if the customer had reached the end of their path in the tree, having explored all available options in that direction. For example, in the following image, the customer closes the conversation by responding to any of message blocks #1, #2, #4, or #5. But not by responding to message block #3, because this message is not final. Conversation closed So, for a conversation to close, the customer must respond to a final message block, even if that last message can be a farewell message or a thank you message? Yes, for a conversation to close, the customer must respond to a final message block. Treble cannot infer that the customer wants to close the conversation.

You have configured automatic conversation closure after X minutes of starting the conversation.

In Treble, there are two similar but distinct concepts:
  • WhatsApp session duration: This is the time that elapses from when the customer starts a conversation with your WhatsApp Business API line and is a 24-hour window that expires when your customer stops interacting with your line.
  • Treble session: This is how Treble knows which conversation is interacting with the customer. By default, a Treble session does not expire, meaning your customer may stop interacting with your WhatsApp Business API line and that may cause the WhatsApp session to expire, but the Treble session does not. This allows your customer to interact with the same conversation again even if they reconnect a few days later.
However, you may want a conversation to close automatically after X minutes of starting the conversation. For this, you can configure automatic conversation closure in your account settings section.

Configure automatic conversation closure

To configure automatic conversation closure, you must follow these steps:
  1. Sign in to your Treble account at

    https://app.treble.ai/login

  2. Go to the Settings section in the navigation menu.
  3. Then click on Conversations in the navigation menu.
  4. Go to the Deactivate after inactivity time option and configure the time in minutes.
  5. Ready! Now, when a conversation has no activity for X minutes, it will close automatically.
Configure automatic conversation closure

Conversation close webhook

Now that you know when a conversation close occurs in Treble, we present the conversation close webhook. The webhook will be triggered when a conversation close occurs in Treble.

How to configure the conversation close webhook?

To configure the conversation close webhook, you must follow these steps:
  1. Enter Treble.ai through the following URL:

    https://app.treble.ai

  2. Go to the Settings section and select Webhooks.
  3. You will see a Webhook URL field. This is the endpoint to which the HTTP request will be sent.
  4. Enter your webhook URL in the Webhook URL field.
  5. Click the Session close update button to enable this type of notifications
  6. Click Save.
  7. Ready! Now, when a conversation close occurs in Treble, the webhook will be triggered.
Configure conversation close webhook