Saltar al contenido
Documentation
Documentation
Flows

Flow blocks

The flow blocks, family by family: what each one does, what you configure, which exits it follows and in which fields you can use {{variables}}. Includes how to call one of your company’s systems and how to call another flow.

Each block does one thing and continues through an exit, which on the canvas is an arrow with its name. The Add column sorts them by family —with the family color in the icon square— and Search a block finds them by name or by what they do. When you select a block, the right column shows its settings, its problems and where each exit leads.

The “on failure” and “no reply” exits cannot be deleted
A step with an effect can fail —the message did not go out, the 24-hour window expired— and a wait can run out. Those exits are there so nobody is left hanging without you knowing: always connect them, even if only to End.

Entry

  • Start — where the flow begins. There is only one, it is born with the flow and cannot be deleted. It shows its triggers: if it has none, it tells you.

Messages

  • Message — writes a message to the person and continues. Field: Text. Exits: “next” and “on failure”.
  • Template — sends an approved WhatsApp template, the only way to write outside the 24-hour window. You pick the template in Approved template (you see its preview) and fill in each Parameter. If the flow can start without a conversation (from an event or the API) and you have more than one number, choose the Number that sends it. If a parameter is missing it is not sent: it goes out through “on failure”.
  • Internal note — leaves a note in the conversation that only the team sees. The person does not see it and the assistant does not read it either. Field: Note text.

Questions

  • Question — asks and waits for the answer. Fields: Question, Options (buttons) —each with its Option key and What the person sees—, Save the answer in (the variable name) and Time to answer (empty = the maximum, 24 hours). Each option is an exit; whatever does not match goes out through “other reply” and, if there is no answer in time, through “no reply”. Tapping a button wins over typing.

In Answer validation you choose What the answer has to be: An email, A phone number, A number, A date or Matches a pattern. If the answer does not work, it asks again (How many times to ask, from 1 to 5, with What to say if the answer doesn’t work and What to say when asking again); once the attempts run out it goes out through “not valid”.

How many options fit on WhatsApp
Up to 3 go out as buttons and 4 to 10 as a list. With more than 10 none go out: the person only gets the text and has to type. A button shows up to 20 characters and a list row up to 24; the rest is cut. The test shows you before you publish.
How much text fits in a message
A text Message takes up to 4,096 characters. But that same text with options goes out as an interactive message, and there WhatsApp only accepts 1,024 in the body: a long text that worked on its own stops fitting the moment you add buttons. The field will not let you go over, and as you get close to the limit a counter appears with what is left. The flow test warns you before you publish, too.

Logic

  • Condition — compares variables and continues through “yes” or “no”. Each comparison has a Variable (the name, without braces), an Operator and a Value; with several, It holds when All or Any of them hold (up to 10). There are text operators (Equals, Contains, Starts with, Is in the list, Matches the pattern…), presence (Has a value, Is empty), number (Is greater than, Is less than or equal to…), date (Is a date before, Is a date after) and format (Is a number, Is an email, Is a phone number). If something cannot be compared, it goes out through “no”.
  • Depending on the value — compares one variable with a list of values, in order, and continues down the branch of the first one that matches; if none matches, through “other value”. It is the right choice when a condition would need many comparisons.
  • Wait — How it waits: A length of time (How long to wait, in minutes, hours or days, up to 30 days) or Until a date saved in a variable, with a fallback time if the variable has no date. With Continue within business hours, if the wait ends outside business hours it continues when they open.
  • Wait for an event — waits for something to happen to this person (a booked appointment, an appointment that could not be booked, a new contact) and continues through “happened”. You can require the event data to say an exact value and set the Maximum wait (up to 30 days); if it does not happen in time, it goes out through “no reply”.
  • Business hours — continues through “open” or “closed”. There is nothing to configure.
  • Split at random — splits people among Variants by their Weight, to compare two paths. The same person always lands in the same variant, and the flow saves it in the variante_<block> variable.
  • Go to another flow — ends this flow and starts another one for the same person. With Pass the variables, the other one starts with everything this one collected.
  • Call another flow — runs another published flow with the same person and, when it reaches its end, comes back here with what it returns. Unlike Go to another flow, this one does not end: it continues through “done” or “on failure”. Explained below.
  • Agenda (Channels family) — uses the Enlassa AI Agenda with the same rules as the portal: schedules, capacity and minimum notice. You pick What it does: Look up free slots, Book an appointment, Reschedule an appointment, Cancel an appointment, Mark attendance or Check the appointment is still valid. To look up and book you pick the Service and, if you want, the Location and the Professional; to book or reschedule, the Date and the Time (usually the variables the lookup left). It exits through done, no slots (only the actions that look for a slot) or if it fails. Check the appointment is still valid changes nothing: it reads the appointment again and exits through still valid if it is still confirmed, or changed if it was cancelled, moved or already passed; put it after a wait and before a reminder, so you never remind an appointment that no longer exists. If the person reschedules, the flow that was following the old appointment closes itself and a new one starts with the new appointment. Rescheduling, cancelling and marking only act on an appointment that belongs to the person in the flow: if it is someone else’s, it exits through “if it fails”. It leaves cita_id, cita_fecha, cita_hora, cita_servicio, cita_sede and cita_turnos written for the blocks that follow. In the flow test, the Agenda always answers that there is a slot and that it worked; to see “if it fails”, use the failure button on the step.
  • Send SMS (Channels family) — sends an SMS to the person’s phone, whichever way the flow came in. Fields: The message (accepts variables, with the segment meter and the accent warning), What it is for (Transactional or Marketing) and From which sender (empty = the default). It follows the same rules as a send from the portal: if it cannot go out —outside hours, no consent, no sender or no balance— it exits through “on failure”, and the reason stays in SMS Messages. It only appears with SMS turned on, and a flow with this block cannot be published without an approved sender. Exits: “next” and “on failure”.

Data

  • Label — adds or removes a tag on the conversation (What it does: Add or Remove). You can pick one you already use or type a new one: it is created the first time it is added.
  • Save variable — saves a Value in a variable, with an optional Transformation: Lowercase, Uppercase, Trim spaces, Just the number or Add days (date).
  • Save to the contact — updates the contact record: Name, Email, Phone, Attributes of your own business (city, plan…) and its Contact tags. An empty field does not erase what was already there.
  • Send to a webhook — notifies your systems: it sends an Event name (for example “qualified_lead”) and the Data you choose to your organization’s webhooks subscribed to the flows event (flow.event). Exits: “next” and “on failure”.
  • Call a system — sends an HTTPS request to one of your company’s systems (your scheduling or billing system) and saves what it answers in variables. Exits: “done”, “rejected” and “on failure”. Explained below.

AI

  • Assistant — hands the conversation to the AI assistant with What the assistant should do and, optionally, Branches it can hand control back through (each with a Branch name and When to use it). If the assistant only replies, it continues through “replied”, which is the most common case: always connect it. It has 10 minutes to finish its turn; if not, it goes out through “no reply”.

Team

  • Assign — Assign to the assistant, the team queue or a person. With a person the flow has to end afterwards: once the thread belongs to someone on the team, the flow no longer writes to it. That is why the goodbye (“I am passing you to an advisor”) goes before.
  • Transfer to another assistant — passes the conversation to another Assistant, with a Note for the assistant. If someone on the team has it assigned, it is not transferred.
  • Close the conversation — closes it, with a Reason and, if you want, a Tag on close. After this block the flow ends.
  • Snooze the conversation — takes it out of view (Snooze for a length of time). Afterwards the flow ends.
  • Notify the team — sends an email with the Subject and Text you write and the link to the conversation, to the Administrators or the People you choose.

End and notes

  • End — ends the flow. The conversation goes back to whoever was handling it: it is not closed.
  • Note — a note on the canvas, with its Color, to explain the flow to whoever reads it. It does nothing when it runs.

Call a system (HTTP)

With Call a system the flow asks one of your company’s systems something —“is appointment 123 still confirmed?”— or tells it something —“record this order”—, and saves the answer to use in the next blocks. You set it up in the right column, by section:

  • The request: the Method (GET, POST, PUT, PATCH or DELETE) and the Address (URL). Variables go in the path or in the parameters —https://api.your-company.com/appointments/{{cita_id}}— and are encoded automatically.
  • Headers: name and value. For a credential use Insert secret: pick a secret from the vault (or create one right there) and it is written as {{secrets.NAME}}; the real value never shows up in the flow.
  • Body (JSON): only with POST, PUT, PATCH or DELETE. It accepts variables and secrets, up to 8 KB.
  • What to save from the response: each row is a Variable and its Path in the response (for example data.status). The block also always saves http_status (the status code) and http_codigo (how it went, as a keyword: ok, no_encontrado, sin_respuesta_a_tiempo…), which you can use in a Condition.
  • Time and retries: the Maximum wait (8 seconds by default, up to 15) and Avoid duplicates, which sends a unique key so your system does not repeat the operation if the request is retried.
  • Sample response: a status code and a body the flow test uses instead of calling your system.

Where it continues: done if your system answered fine (2xx); rejected if it said no (4xx, for example “not found” or an invalid credential); and on failure when it is unknown what happened (no answer in time, the system was down, the address is not allowed). “On failure” is mandatory: always connect it.

Test the request

At the end of the settings you will find Test the request. Enter sample data for the variables the block uses and choose:

  1. See the request (without sending)

    Shows how the request would go out —method, address, headers and body—, whether the address is allowed and, with the sample response, which exit it would take and which variables it would save. Nothing is sent, and secrets are shown only by name.

  2. Send for real

    Sends the real request, after you confirm it. If the method creates or changes data (POST, PUT, PATCH or DELETE), the warning reminds you. It shows what your system answered, how long it took and what the block would save. There is a limit of 20 real tests per hour per organization.

Testing requires permission to manage webhooks and, if the block uses a secret, permission to manage secrets. In the flow test (the Test button on the canvas) the block never calls your system: it uses the sample response and says so in the conversation (“sample response: nothing was sent”).

Security: what is accepted and what is not
Only https addresses, with the host written as is: no variables in the host, and no private or internal addresses. The allowed ports are 443 and 8443. Secrets only go in headers or in the body, never in the address (it would end up in logs); and headers do not take conversation variables. Your system’s response is not stored: only the variables you chose. Publishing a flow with this block requires permission to manage webhooks (and secrets, if it uses one).

Call another flow (subflow)

With Call another flow you build reusable pieces: a survey, a data check, a balance lookup. The calling flow waits, the other one runs with the same person and, when it reaches its End, the first one continues through “done” with what it got back.

  • The called flow: the published flows other than this one are offered, split into those that Can hand control back and those that cannot. A flow that assigns, closes or snoozes the conversation hands the thread over and cannot come back: it shows up disabled. Open the flow takes you to it.
  • What you pass: name and value (variables accepted). The other flow gets it as {{entrada_name}}; it also gets the contact’s data.
  • What it returns: your variable and its variable. Below you see which variables the other flow writes. If it does not reach its end, your variable stays empty.

It leaves through “on failure” if the other flow ends with an error, is turned off or cannot run. Up to 3 subflows can be nested, and a loop (A calls B, which calls A) cannot be published: the warning shows the path, for example “Appointments → Survey → Appointments”. Inside a subflow, Go to another flow ends with an error. The version that runs is the one published when the person enters: publishing the other flow later does not change anyone already inside.

Turned on per account
Call a system and Call another flow are enabled per organization. If you do not see them in Add, they are not active for your account yet; a flow that already has them can be viewed and edited, but not published until they are enabled.

Where you can use {{variables}}

A variable is written between braces —{{contacto_nombre}}— and when it runs it is replaced by its value. Every field that accepts one has a { } button that opens the list of variables: at the top, the ones that Always reach this block; below, the ones that May be empty (with the reason) and the ones that Come from outside.

  • They accept variables: the Text of a Message; the Question and What to say when asking again; What the assistant should do; each Parameter of a Template; the Value of Save variable; the Name, Email, Phone and the value of each attribute in Save to the contact; the Note text of an internal note; the Note for the assistant in Transfer; the Subject and Text of Notify the team; the value of each field in Send to a webhook; The message of Send SMS; the Address and the Body of Call a system; and the value of each field in What you pass of Call another flow.
  • They name a variable, without braces: the Variable of a Condition and of Depending on the value, and the Variable with the date of Wait.
  • They do not accept variables, on purpose: the Label (your catalog would end up with one tag per conversation), Assign to (what the person writes cannot choose who gets the thread), the branches’ When to use it and What to say if the answer doesn’t work, which is sent as is.
A condition’s settings with the variables list open
A condition with the { } button open: the variables that always reach that block.

Every run starts knowing contacto_nombre, contacto_telefono, contacto_email, contacto_etiquetas, canal, flujo_nombre, ahora_fecha, ahora_hora and horario_habil. On top of that, contacto_<attribute> brings an attribute from the contact record and disparo_<field> a piece of data from whatever started the flow (for example disparo_monto when another system starts it with an amount). The rest are born in a block: Save the answer in of a Question, Save variable, Split at random, Call a system (what you save from the response, plus http_status and http_codigo) and Call another flow (what it returns). A flow running as a subflow also gets entrada_<name>.

  • A variable no block saves is marked in red and blocks publishing: the gap would always come out empty.
  • A variable saved in one branch but not all is marked in yellow and does allow publishing: whoever comes down the other branch will see the empty gap.
  • A variable that comes from outside (contacto_…, disparo_…) gets a warning, because it depends on something the flow does not control: the contact may not have that attribute.

The limits that protect the person

  • A question waits at most 24 hours; a wait or an event, 30 days; the assistant, 10 minutes per turn.
  • A flow goes through up to 40 blocks in a row without waiting for anything; after that it stops, so it does not spin forever.
  • The same run can go through the same block up to 25 times (a menu that asks again, for example); the 26th time it goes out through error, with the repeating block in plain sight.