Conversation flows as code
TL;DR: Underneath the editor —and whatever your AI assistant builds for you— every flow is JSON. That makes it a first-class software artifact: you export it, review it in a pull request, version it with Git and deploy it through CI/CD. Nothing an AI generates in your account goes unaudited.
Don't code? You don't need anything on this page. Ask Claude or ChatGPT for the flow, or build it in the visual editor — here's how, step by step.
An FAQ flow declared in JSON
In short: every flow is a JSON file, so it goes into Git, gets reviewed in a pull request and is deployed through CI/CD. It's the same flow you'd see in the visual editor, in text form.
{
"flow": {
"name": "FAQ Horarios",
"trigger": "KEYWORD",
"triggerKeywords": ["horario", "hora", "cuando", "abierto"]
},
"steps": [
{
"stepOrder": 1,
"stepType": "QUESTION",
"name": "Responder horario",
"config": {
"messageType": "BUTTONS",
"text": "Atendemos L-V 09:00–18:00 · Sáb 09:00–13:00.\n¿Algo más?",
"buttons": [
{ "id": "precios", "title": "Precios" },
{ "id": "asesor", "title": "Hablar con asesor" }
]
},
"transitions": [
{ "toStepOrder": 2, "condition": "BUTTON", "matchValue": "asesor", "priority": 10 },
{ "toStepOrder": 3, "condition": "ANY", "priority": 1 }
]
},
{
"stepOrder": 2,
"stepType": "MESSAGE",
"name": "Escalar a asesor",
"config": { "text": "Te conecto con un asesor 👤", "transferToAgent": true }
},
{
"stepOrder": 3,
"stepType": "END",
"name": "Cierre",
"config": { "message": "¡Gracias por escribirnos!" }
}
]
}This flow handles 100% of opening-hours questions without using a single AI token.
Git-native from day one
Every change to a flow is a commit. Your team can code review the conversation logic just like they review code.
API deploys in milliseconds
A POST /flows/import endpoint loads the updated JSON. Your CI/CD pipeline ships conversation flows the way it ships features.
Reuse and composition
Flows reference other flows by ID. Write once and reuse across hundreds of bots without duplicating logic.
Auditable and testable
Write unit tests for your flows. Simulate inputs and check that the decision tree reaches the right node before production.
Three ways to build the same flow
JSON doesn't replace the visual editor: it's the same flow seen as text. All three paths lead to the same place and you can switch between them whenever you want.
| Path | For whom | What you get |
|---|---|---|
| The visual editor | The business owner | You see it on screen and understand it without anyone explaining it. |
| Talking to Claude or ChatGPT | Anyone | The fastest of the three: you ask for it and it shows up built in your account. |
| The JSON file, with Git and CI/CD | A technical team | Versioning, pull request review and automatic deployment. |
Where there is a real difference is elsewhere: in ManyChat or Wati, drag-and-drop is all there is and the flow can't leave. Here the third path is always available, so your flows are yours and you take them with you if you ever leave.
Node types available in FlujosChat
Every step in a flow has a type that defines its behavior. Compose complex flows by combining these blocks.
MESSAGESends text, an image, video, PDF or audio. Buttons and lists are settings of this step.
QUESTIONAsks a question and waits for the customer's answer to store it in a variable.
CONDITIONBranches the flow based on variables or previous answers.
WAITPauses the flow until the user replies or X time passes.
API_CALLCalls an external endpoint and uses the response in the flow.
AI_HANDOFFHands the conversation to an AI team when the logic doesn't cover the case.
PAYMENTCollects payment via Yape: creates the payment expectation and waits for the automatic confirmation.
ENDEnds the flow and releases the customer's session.
CI/CD pipeline for conversation flows
The same rigor you apply to your backend code, applied to your conversation logic.
name: Deploy Chatbot Flows
on:
push:
branches: [main]
paths: ['flows/**/*.json']
jobs:
validate-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate JSON schemas
run: |
for f in flows/**/*.json; do
npx ajv validate -s schemas/flow.schema.json -d "$f"
done
- name: Run flow unit tests
run: npm test -- --testPathPattern=flows/
- name: Deploy flows to FlujosChat
env:
FLUJOSCHAT_API_KEY: ${{ secrets.FLUJOSCHAT_API_KEY }}
run: |
for f in flows/**/*.json; do
curl -X POST https://api.flujoschat.com/api/v1/flows/import \
-H "Authorization: Bearer $FLUJOSCHAT_API_KEY" \
-H "Content-Type: application/json" \
-d "@$f"
doneEvery merge to main automatically deploys the updated flows. Zero-click deployment of conversation logic.