# Journeys

Guided flows that collect what you need, step by step, and hand the answers to your systems.

Source: https://docs.omazy.ai/how-to/engage/journeys/

A journey is a short guided flow. The agent asks for what it needs, one thing at
a time, checks the answers, and hands the finished set to wherever it should go.

Booking a table. Requesting a callback. Filing a ticket. Placing an order. All
the same shape: several facts have to be collected before anything can happen,
and a free-form conversation is a bad way to collect them.

## When a journey beats a conversation

An agent answering questions is doing retrieval. A journey is doing data entry,
and data entry has different rules: every field is required, order matters,
and half-finished is worthless.

| Use a journey | Use ordinary answers |
|---|---|
| You need four specific facts before you can act | The customer wants to know something |
| A missing field makes the result unusable | An incomplete answer is still useful |
| The result goes into another system | The result is the reply itself |

The tell is whether you would have used a form. If the alternative is a form,
build a journey. A journey is a form that arrives one question at a time and does
not look like homework.

## What you configure

You start from a template rather than a blank canvas. Each template already knows
its steps and what it collects, so the choices left to you are the ones specific
to your business.

**Trigger phrases**, one per line. What a customer might say that should start
this journey. Leave it blank and the template's own defaults apply.

**Action**, what happens when the journey completes.

**Endpoint**, a URL that receives a `POST` with the collected values as JSON,
when the action is to call your system.

## Trigger phrases are the part that goes wrong

This is the single most common journey problem, and it is worth more attention
than the rest of the configuration combined.

Triggers are matched against what the customer says. **A broad trigger
intercepts ordinary questions.** Add "order" as a trigger for your order journey
and a customer asking "do you take orders over the phone" gets marched into a
form instead of an answer.

The failure is quiet. Nobody reports "the agent started a form", they just leave.

Three rules that prevent it:

1. **Trigger on intent, not on nouns.** "I want to place an order" is an intent.
   "order" is a noun that appears in dozens of questions.
2. **Prefer several specific phrases to one broad one.** Five precise triggers
   beat one greedy keyword.
3. **After adding a trigger, ask your five most common questions.** If any of
   them starts the journey, the trigger is too broad.

If your agent has suddenly stopped answering questions it used to answer well,
check journey triggers before checking the brief. A journey that hijacks a
question looks exactly like an agent that got worse.

## The endpoint

When the journey finishes, the collected values are posted to your endpoint as
JSON. That is the handoff from conversation to system.

Two things to build for:

**Reply fast.** The customer is waiting in a chat window. Acknowledge the post
and do slow work afterwards.

**Expect a retry.** Network calls fail and get repeated. Make the handler
idempotent, or you will create two bookings for one customer on the day you can
least afford it.

## Designing the steps

The template sets the steps, but the copy is yours where the template allows it,
and the copy is what determines whether people finish.

**Ask one thing at a time.** Two questions in one message gets one answer, and
usually the easier one.

**Ask for the cheap things first.** Name before address. Every field a customer
completes makes them more likely to finish the next one, and the reverse is also
true.

**Say why you need anything unusual.** A phone number asked for without reason
reads as a sales trap. "So the driver can call if they cannot find you" does not.

**Let people out.** Someone who changes their mind mid-journey should be able to
ask something else without closing the tab. A flow with no exit is a trap, and
customers treat traps the way you would expect.

## Journeys, suggestions and forms

Three neighbouring things, easy to confuse:

| | Is |
|---|---|
| **[Suggestion pills](/how-to/agent/suggestions/)** | Tappable answers to one question. No memory, no branching |
| **Journey** | Several steps, collected in order, with a result |
| **Widget starter prompts** | What the visitor sees before saying anything |

The upgrade path runs one way. When suggestion rules start needing to remember
the previous answer, you have outgrown them and want a journey.

## When one does not start

1. **The trigger did not match.** Most common. Say the phrase you configured,
   exactly, and see whether it fires.
2. **The journey is not enabled** for this app.
3. **Another journey matched first.** Two journeys with overlapping triggers
   will fight, and the winner is not the one you were thinking about.
4. **The customer is mid-journey already.** A flow in progress holds the
   conversation until it completes or is abandoned.

## When one starts and should not

Narrow the trigger. This is the same problem as above wearing a different hat,
and the fix is always the trigger rather than the brief.
