Tayon Help

Let the AI decide what happens to a reply

Use the AI Prompt action to read a lead's reply and answer a question about it, then branch on the answer with a Split.

You’ll need: A response flow for your AI agent. See Handle replies with response flows.

The AI Prompt action asks the AI a question and stores the answer. Put the lead’s reply in the question, and your flow can branch on what the lead actually meant.

#How the AI Prompt action works

Add an Action step and set Action Type to AI Prompt. It has three settings:

Setting What to put there
AI Prompt The question. Variables work here, so include $EMAILDATA.BODY or $IMDATA.BODY.
Temperature How free the AI is to vary. Lower = more focused, Higher = more creative. Use 0 for decisions.
Store Response In (optional) An identifier in capitals, such as MEETING. The answer is then available as $MEETING.

Things to know:

  • The prompt must be longer than 10 characters, or the step is skipped.
  • At temperature 0, the answer comes back on a single line, trimmed, which makes it easy to compare.
  • Without an identifier, the answer is thrown away.
  • AI Prompt always runs at the Regular AI level and uses credits like any AI message.

#Pattern 1: answer yes or no, then branch

This flow sends meeting requests to a person and lets the AI answer the rest.

  1. Add AI Prompt. Set AI Prompt to: Reply only YES or NO. Does this message ask for a meeting or a call? Message: $EMAILDATA.BODY
  2. Set Temperature to 0 and Store Response In to MEETING.
  3. Add a Split. In Advanced Mode (Code), write $MEETING = yes.
  4. On the true branch: Send Email to the lead with $EMAILDATA.AITRANSFER, then Assign Lead to the person who books meetings.
  5. On the false branch: Send Email to the lead, subject RE: $EMAILDATA.SUBJECT, body $EMAILDATA.AIRESPONSE.

Comparisons in a split are not case-sensitive, so yes matches YES. Write the value without quotes.

#Pattern 2: branch on the category

Every reply is already sorted into a category before the flow runs, so the simplest branch needs no AI Prompt at all:

Split condition Then
$EMAILDATA.CATEGORY = call Hand to a person who will phone
$EMAILDATA.CATEGORY = quote Send your price list, then alert sales
$EMAILDATA.CATEGORY = bad_experience $EMAILDATA.AISORRY, alert a manager, Assign Lead
anything else $EMAILDATA.AIRESPONSE

For WhatsApp and SMS, use $IMDATA.CATEGORY. The codes are listed in Variables for incoming messages.

Combine conditions with OR: $EMAILDATA.CATEGORY = call OR $EMAILDATA.CATEGORY = accepted_offer.

#Pattern 3: pull a detail out of the reply

AI Prompt can extract as well as classify:

  1. AI Prompt: What date does this person want to meet? Answer in the format DD/MM/YYYY, or NONE. Message: $EMAILDATA.BODY. Store it in MEETDATE.
  2. Split: $MEETDATE <> none.
  3. On the true branch: Send Email to Send to account contact: $CRMDATA.NAME wants to meet on $MEETDATE. Their message: $EMAILDATA.BODY.

#Alert yourself with the details

Whatever the branch, an alert to you is a Send Email with Send To set to Send to account contact. Useful lines for its body:

$CRMDATA.NAME ($CRMDATA.EMAIL, $CRMDATA.PHONE) replied.
Category: $EMAILDATA.CATEGORY
Their message: $EMAILDATA.BODY

#When it goes wrong

Symptom Likely cause
The split always takes the false branch The answer is not exactly the word you compare against. Use temperature 0 and ask for one word only.
$MEETING prints as nothing Store Response In is empty, or spelled differently from the variable.
A split on $EMAILDATA.BODY behaves strangely Raw message text can contain characters that confuse a condition. Classify it with AI Prompt first and split on the stored answer.

Updated: