From 519731eb9f915d2988a211a92afa762428294fee Mon Sep 17 00:00:00 2001 From: sangeeta1911 Date: Sat, 4 Jul 2026 18:19:09 +0530 Subject: [PATCH 1/5] docs: add use case combining Label the incoming message and Open a ticket for AI fallback Answers the Discord question in #550 on how to auto-label AI-unhandled queries and escalate them to a human agent ticket. Co-Authored-By: Claude Sonnet 5 --- .../16. Open a ticket with a human agent.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md b/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md index bd9a5f1d2c..f48338d6a5 100644 --- a/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md +++ b/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md @@ -175,6 +175,22 @@ Once a ticket is created, users can make edits by utilizing the `Add Remark` opt image +## Use Case: Escalating unanswered AI queries to a human agent + +If you're using an AI Assistant to answer contact questions (see [File Search Using OpenAI Assistants](https://glific.github.io/docs/docs/Integrations/Filesearch%20Using%20OpenAI%20Assistants/)), some questions will fall outside what it can answer. `Label the incoming message` and `Open a ticket with a human agent` can be combined to automatically flag and route these to your team. + +1. Capture the contact's question with a `Wait for Response` node, then call your AI Assistant as usual. + +2. In your AI Assistant's Instructions, ask it to always reply with one clear, consistent phrase when it can't answer, for example "I'm not able to help with that yet." This gives the flow something reliable to check for. + +3. Add a [Split by a result in the flow](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Split%20By/Result%20in%20the%20Flow/) node on the assistant's response (e.g. `@results.gptresponse.message`). Create a branch matching that fallback phrase, or use the `Other` branch to catch anything that isn't one of the assistant's expected answers. + +4. On that branch, add a [Label the incoming message](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Label%20the%20incoming%20message) node and enter a label such as `AI_unhandled`. No other `Wait for Response` node runs between the contact's original question and this point, so the label still lands on that original question rather than on the AI's reply. + +5. Right after the label node, add an `Open a ticket with a human agent` node, following the steps above. Use `@results.` as the Ticket Body so the ticket shows the contact's original question, and assign it to the relevant staff member or queue. + +This way, every query the AI can't resolve is labeled `AI_unhandled` and immediately handed off as a ticket, so you can report on how often the assistant falls back and make sure nothing gets missed. + ## Best Practices - Always assign tickets to the right staff to ensure faster resolution. From 323dfb2aa77da3fc9d4c879d2af64c26abeb9459 Mon Sep 17 00:00:00 2001 From: sangeeta1911 Date: Sat, 4 Jul 2026 18:30:54 +0530 Subject: [PATCH 2/5] docs: update Last Updated date and drop backticks in new use case section Co-Authored-By: Claude Sonnet 5 --- .../16. Open a ticket with a human agent.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md b/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md index f48338d6a5..cf72041d2e 100644 --- a/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md +++ b/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md @@ -3,7 +3,7 @@ 5 minutes read Level: Advanced - Last Updated: October 2025 + Last Updated: July 2026 @@ -177,19 +177,19 @@ Once a ticket is created, users can make edits by utilizing the `Add Remark` opt ## Use Case: Escalating unanswered AI queries to a human agent -If you're using an AI Assistant to answer contact questions (see [File Search Using OpenAI Assistants](https://glific.github.io/docs/docs/Integrations/Filesearch%20Using%20OpenAI%20Assistants/)), some questions will fall outside what it can answer. `Label the incoming message` and `Open a ticket with a human agent` can be combined to automatically flag and route these to your team. +If you're using an AI Assistant to answer contact questions (see [File Search Using OpenAI Assistants](https://glific.github.io/docs/docs/Integrations/Filesearch%20Using%20OpenAI%20Assistants/)), some questions will fall outside what it can answer. Label the incoming message and Open a ticket with a human agent can be combined to automatically flag and route these to your team. -1. Capture the contact's question with a `Wait for Response` node, then call your AI Assistant as usual. +1. Capture the contact's question with a Wait for Response node, then call your AI Assistant as usual. 2. In your AI Assistant's Instructions, ask it to always reply with one clear, consistent phrase when it can't answer, for example "I'm not able to help with that yet." This gives the flow something reliable to check for. -3. Add a [Split by a result in the flow](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Split%20By/Result%20in%20the%20Flow/) node on the assistant's response (e.g. `@results.gptresponse.message`). Create a branch matching that fallback phrase, or use the `Other` branch to catch anything that isn't one of the assistant's expected answers. +3. Add a [Split by a result in the flow](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Split%20By/Result%20in%20the%20Flow/) node on the assistant's response (e.g. @results.gptresponse.message). Create a branch matching that fallback phrase, or use the Other branch to catch anything that isn't one of the assistant's expected answers. -4. On that branch, add a [Label the incoming message](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Label%20the%20incoming%20message) node and enter a label such as `AI_unhandled`. No other `Wait for Response` node runs between the contact's original question and this point, so the label still lands on that original question rather than on the AI's reply. +4. On that branch, add a [Label the incoming message](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Label%20the%20incoming%20message) node and enter a label such as AI_unhandled. No other Wait for Response node runs between the contact's original question and this point, so the label still lands on that original question rather than on the AI's reply. -5. Right after the label node, add an `Open a ticket with a human agent` node, following the steps above. Use `@results.` as the Ticket Body so the ticket shows the contact's original question, and assign it to the relevant staff member or queue. +5. Right after the label node, add an Open a ticket with a human agent node, following the steps above. Use @results. as the Ticket Body so the ticket shows the contact's original question, and assign it to the relevant staff member or queue. -This way, every query the AI can't resolve is labeled `AI_unhandled` and immediately handed off as a ticket, so you can report on how often the assistant falls back and make sure nothing gets missed. +This way, every query the AI can't resolve is labeled AI_unhandled and immediately handed off as a ticket, so you can report on how often the assistant falls back and make sure nothing gets missed. ## Best Practices From 8d958303846fa393f1a416c64ed688450ec5d9dc Mon Sep 17 00:00:00 2001 From: sangeeta1911 Date: Sun, 5 Jul 2026 21:26:16 +0530 Subject: [PATCH 3/5] docs: fix MDX build error from unescaped angle brackets Removing backticks around @results. left raw angle brackets, which MDX parsed as an invalid JSX tag and failed the build. Restore backticks around just this placeholder. Co-Authored-By: Claude Sonnet 5 --- .../2. Flow Actions/16. Open a ticket with a human agent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md b/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md index cf72041d2e..7f9d89a009 100644 --- a/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md +++ b/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md @@ -187,7 +187,7 @@ If you're using an AI Assistant to answer contact questions (see [File Search Us 4. On that branch, add a [Label the incoming message](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Label%20the%20incoming%20message) node and enter a label such as AI_unhandled. No other Wait for Response node runs between the contact's original question and this point, so the label still lands on that original question rather than on the AI's reply. -5. Right after the label node, add an Open a ticket with a human agent node, following the steps above. Use @results. as the Ticket Body so the ticket shows the contact's original question, and assign it to the relevant staff member or queue. +5. Right after the label node, add an Open a ticket with a human agent node, following the steps above. Use `@results.` as the Ticket Body so the ticket shows the contact's original question, and assign it to the relevant staff member or queue. This way, every query the AI can't resolve is labeled AI_unhandled and immediately handed off as a ticket, so you can report on how often the assistant falls back and make sure nothing gets missed. From 585ab80bdda92a85af22af4346bfc02dd875204f Mon Sep 17 00:00:00 2001 From: sangeeta1911 Date: Wed, 22 Jul 2026 12:05:57 +0530 Subject: [PATCH 4/5] docs: address review feedback on AI fallback use case - Wrap @results.gptresponse.message in code formatting and clarify that gptresponse is the result name of the Call a Webhook node used to call the assistant - Make explicit that the fallback check runs on the Success exit of the Call a Webhook node, before the assistant's reply is sent to the contact, and add guidance on handling the Failure exit Co-Authored-By: Claude Sonnet 5 --- .../16. Open a ticket with a human agent.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md b/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md index 7f9d89a009..2d0b7af3c6 100644 --- a/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md +++ b/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md @@ -179,15 +179,21 @@ Once a ticket is created, users can make edits by utilizing the `Add Remark` opt If you're using an AI Assistant to answer contact questions (see [File Search Using OpenAI Assistants](https://glific.github.io/docs/docs/Integrations/Filesearch%20Using%20OpenAI%20Assistants/)), some questions will fall outside what it can answer. Label the incoming message and Open a ticket with a human agent can be combined to automatically flag and route these to your team. -1. Capture the contact's question with a Wait for Response node, then call your AI Assistant as usual. +1. Capture the contact's question with a Wait for Response node. -2. In your AI Assistant's Instructions, ask it to always reply with one clear, consistent phrase when it can't answer, for example "I'm not able to help with that yet." This gives the flow something reliable to check for. +2. Call your AI Assistant with a Call a Webhook node, giving it a result name such as `gptresponse`. Like any Call a Webhook node, this has separate `Success` and `Failure` exits. -3. Add a [Split by a result in the flow](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Split%20By/Result%20in%20the%20Flow/) node on the assistant's response (e.g. @results.gptresponse.message). Create a branch matching that fallback phrase, or use the Other branch to catch anything that isn't one of the assistant's expected answers. +3. In your AI Assistant's Instructions, ask it to always reply with one clear, consistent phrase when it can't answer, for example "I'm not able to help with that yet." This gives the flow something reliable to check for. -4. On that branch, add a [Label the incoming message](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Label%20the%20incoming%20message) node and enter a label such as AI_unhandled. No other Wait for Response node runs between the contact's original question and this point, so the label still lands on that original question rather than on the AI's reply. +4. On the `Success` exit of the Call a Webhook node - before the assistant's reply is sent back to the contact - add a [Split by a result in the flow](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Split%20By/Result%20in%20the%20Flow/) node on `@results.gptresponse.message` (the assistant's response - `gptresponse` here is the result name you gave the Call a Webhook node in step 2, so adjust it if you used a different name). Create a branch matching that fallback phrase, or use the Other branch to catch anything that isn't one of the assistant's expected answers. -5. Right after the label node, add an Open a ticket with a human agent node, following the steps above. Use `@results.` as the Ticket Body so the ticket shows the contact's original question, and assign it to the relevant staff member or queue. +5. On that branch, add a [Label the incoming message](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Label%20the%20incoming%20message) node and enter a label such as AI_unhandled. No other Wait for Response node runs between the contact's original question and this point, so the label still lands on that original question rather than on the AI's reply. + +6. Right after the label node, add an Open a ticket with a human agent node, following the steps above. Use `@results.` as the Ticket Body so the ticket shows the contact's original question, and assign it to the relevant staff member or queue. + +7. On the branch(es) that don't match the fallback phrase, continue as normal and send the assistant's reply (`@results.gptresponse.message`) to the contact. + +You'll also want to handle the `Failure` exit of the Call a Webhook node separately - for example, by sending an error message or routing straight to a ticket - since that covers the webhook call itself failing, which is a different case from the assistant successfully responding with "I don't know." This way, every query the AI can't resolve is labeled AI_unhandled and immediately handed off as a ticket, so you can report on how often the assistant falls back and make sure nothing gets missed. From 0ef4e0d834de4b5247a7fabf713486ed8dbffbbf Mon Sep 17 00:00:00 2001 From: Sangeet Mishra <143380171+SangeetaMishr@users.noreply.github.com> Date: Wed, 22 Jul 2026 12:23:03 +0530 Subject: [PATCH 5/5] Update 16. Open a ticket with a human agent.md --- .../16. Open a ticket with a human agent.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md b/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md index 2d0b7af3c6..aa7878de5c 100644 --- a/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md +++ b/docs/4. Product Features/03. Flows/2. Flow Actions/16. Open a ticket with a human agent.md @@ -189,9 +189,25 @@ If you're using an AI Assistant to answer contact questions (see [File Search Us 5. On that branch, add a [Label the incoming message](https://glific.github.io/docs/docs/Product%20Features/Flows/Flow%20Actions/Label%20the%20incoming%20message) node and enter a label such as AI_unhandled. No other Wait for Response node runs between the contact's original question and this point, so the label still lands on that original question rather than on the AI's reply. + + + + 6. Right after the label node, add an Open a ticket with a human agent node, following the steps above. Use `@results.` as the Ticket Body so the ticket shows the contact's original question, and assign it to the relevant staff member or queue. -7. On the branch(es) that don't match the fallback phrase, continue as normal and send the assistant's reply (`@results.gptresponse.message`) to the contact. +image + + +image + +
+ + +image + + + +7. On the branches that don't match the fallback phrase, continue as normal and send the assistant's reply (`@results.gptresponse.message`) to the contact. You'll also want to handle the `Failure` exit of the Call a Webhook node separately - for example, by sending an error message or routing straight to a ticket - since that covers the webhook call itself failing, which is a different case from the assistant successfully responding with "I don't know."