Home Building Flows How to Send Variables to Controlled Flows (Without Asking the Customer Again)

How to Send Variables to Controlled Flows (Without Asking the Customer Again)

Last updated on Oct 13, 2026

When to Use

  • You want the Controlled Flow to reuse data the customer already provided in the conversation with ClaudIA, without asking again

  • You need to understand which default variables ClaudIA sends automatically to the Controlled Flow (helpdeskId, channelType, etc.)

  • You want to enable the variable extractor to make the experience smoother

  • You need the customer's phone number (or other contact data) inside a flow or a Tool


Prerequisites

  • Controlled Flow Workspace created and flow configured

  • Interactive section in ClaudIA configured to trigger the flow


About This Article

The Controlled Flow has two mechanisms to receive data before asking the customer: the default variables (always sent by ClaudIA) and the variable extractor (which reads the conversation history via LLM and fills in flow fields). This article covers both, and explains how ClaudIA triggers a Controlled Flow.


Details

Overview — Placeholder field

The Placeholder field in Input cards lets the Controlled Flow reuse data the customer already provided in the conversation with ClaudIA, without asking again.

Just describe in the Placeholder which data you want to capture. This description works as a "prompt" for ClaudIA to look for the information in the ticket/conversation and fill in the variable automatically.

Example: if the Placeholder is "User's email" and there is an email in the history, ClaudIA extracts it (via LLM) and fills in the variable defined in the flow. The response of that Input is not triggered and the question is not repeated.


Default variables sent by ClaudIA

These variables reach the flow automatically, with no additional configuration. All of them are text (string). Some may be empty, others always have a value.

Variable Description
helpdeskId Identifier of the ticket in the source helpdesk. If your helpdesk is Cloud Chat itself, it is the conversation number in Cloud Chat. This is the variable to use when querying the conversation via API
cloudChatId Unique code of the conversation in ClaudIA. Always present. Do not use it to query the conversation in your helpdesk's API — use helpdeskId instead
activeIntent Intent (topic) detected in the current conversation. If none is identified, it receives DEFAULT
channelType Source channel: EMAIL WHATSAPP SMS CHAT FORM FACEBOOK INSTAGRAM NO_TYPE_PROVIDED
language Detected language (may be null): pt-BR en es fr de it ja ko zh ru ar hi nl sv da fi pl tr
createdAt Date and time the conversation started
frustrationScore Frustration level calculated by ClaudIA. 0 = no frustration; higher values = greater dissatisfaction
abKey A/B test key (may be null — not every conversation is part of an A/B test)
lastUserMessages Last messages sent by the customer since the agent's last reply
messages Full conversation history as text

Format of the messages history:

USER: hi
AGENT: Hi, I'm ClaudIA. How can I help you?
USER: so... I wanted to know how to [...]
AGENT: Got it! To do that, just [...]

To use these variables in the flow, just create a Condition card:


Variable extractor (from history)

By default, Controlled Flows ask the customer for all the information they need (order number, email, etc.). But this information has often already been provided earlier in the conversation. Asking again is poor UX.

The variable extractor analyzes the conversation history, collects the required data and sends it to the Controlled Flow at activation — eliminating redundant questions.

Characteristics:

  • Checks the Controlled Flow dynamically to know which variables need to be collected

  • Extraction is done by GPT via a prompt defined in ClaudIA's code

  • The collected data can be reviewed in the panel audit

How to configure (inside the Controlled Flow):

For a variable to be extracted, you need:

  1. An input block with the placeholder filled in, describing the variable (e.g., "Order number in the format IN-XXXXXX")

  2. An is set conditional before the variable, which checks whether it already has a value — this way you control what happens if the extractor already filled it


How ClaudIA Triggers the Controlled Flow

1 — How the Controlled Flow is triggered

A Controlled Flow is triggered by ClaudIA through the used section (detailed in How to audit ClaudIA's messages: sessions used and tagger).

Step by step:

  1. The user sends a message

  2. ClaudIA analyzes the responses of the available sections

  3. ClaudIA triggers the Controlled Flow of the section whose response best fits the customer's message

  4. If two Controlled Flow sections are selected, the one with the highest score wins

2 — How to hide the interactive section's response

For the response to be omitted, the Controlled Flow needs access to the first variable collected in the flow.

Example: if the response contains the text "What is your order number?", ClaudIA will omit the question if the user has already provided the order number. For this to work, you must fill in the Placeholder in the card that collects the variable.


The variable must exist in the flow with the exact name

Default variables only reach the flow if a variable with exactly the same name already exists in it. The name is case-sensitive.

Two ways to create it:

  1. Native Variables block (simplest): drag the block, pick the type from the list and the flow creates the variable with the correct name on its own. The list covers Helpdesk ID, Cloud Chat ID, Active Intent, Channel Type, Created At, Last User Messages and Messages.
  2. Manually: create the variable by typing the identical name. This is the way for the ones not in the block, such as language, frustration score, A/B test key and first user message.

If the variable doesn't exist in the flow, the value simply doesn't arrive — no error, no warning. The symptom is an empty variable in the middle of the flow.


The protocol number is not a flow variable

This is the most common confusion. The identifiers that reach the flow are:

What you want Exists in the flow? How to get it
Unique code of the conversation Yes Cloud Chat ID
Ticket identifier in the source helpdesk Yes Helpdesk ID
Protocol number shown to the customer No Only in Cloud Chat messages, using the protocol variable

If the goal is to tell the customer the protocol number, do it through a Cloud Chat message (automation, canned response or macro), not through the flow. See the article about variables in Cloud Chat messages.


Controlled Flow and Tool don't receive the same variables

The same flow can be used in two ways, and the behavior changes:

Controlled Flow triggered by ClaudIA Tool used by an Agent
Conversation default variables Arrive automatically Only helpdeskId, if declared as a Tool parameter. The others don't arrive
Customer data The extractor reads the history The Agent fills in the parameters
Where the fields are defined Input blocks with Placeholder Variable declaration block

Helpdesk ID in a Tool: declare a parameter named helpdeskId (helpdesk_id also works) in the Tool's variable declaration block. ClaudIA fills this parameter automatically with the ticket identifier, and the Agent doesn't even see it.

The other default variables (Cloud Chat ID, channel, language, messages, etc.) don't reach the Tool. If the flow depends on any of them, declare the data as a Tool parameter and make it explicit in the description where the Agent should get it from.


The customer's phone number is not a flow variable

There is no default variable with the customer's phone number (or email). There are three ways to get this data, from the most automatic to the simplest.

Option 1 — Query the Cloud Chat API (when your helpdesk is Cloud Chat)

  1. Make sure the flow has the helpdeskId variable. In a Tool, declare the helpdeskId parameter, which is filled in automatically
  2. Add an HTTP Request block with:
    • Method GET
    • URL https://{your-cloud-chat}/api/v1/accounts/{your_account_id}/conversations/{{helpdeskId}}
    • Header api_access_token with the token of an administrator user. The token is in the user's profile, under Access Token
  3. Save the meta.sender.phone_number field from the response in a variable, for example phone
  4. Use this variable in the rest of the flow or in the call to your API

The phone number is only filled in when the contact has a registered number. In WhatsApp conversations it always exists. In the website widget, email, Instagram and Messenger it is usually empty. Keep an alternative path, such as asking the customer.

Use the token of an administrator or service user, not of a person who may leave the company. If the token is revoked, the request stops working.

Option 2 — Context Enrichment with Contact data

Enable the Contact data provider in Context Enrichment. The phone number registered on the contact becomes part of the briefing ClaudIA reads before the first reply. In a Tool, declare a phone parameter and write in the description that the Agent should use the contact's phone number provided in the conversation context.

Option 3 — Ask the customer

Use an Input block with the Placeholder filled in, for example "Mobile phone number with area code". If the customer has already provided the number in the conversation, the variable extractor fills it in automatically and the question is not repeated.

In the Playground there is no real ticket, so helpdeskId doesn't match a Cloud Chat conversation and Context Enrichment doesn't run. Test options 1 and 2 in a real conversation.


Notes