Skip to main content

AI Prompts in Flows

AI Prompts let AIQ Flows react to real-world signals like weather, sports, markets, or news. Prompts evaluate yes/no questions and route customers through different Flow paths based on the result.

Updated over a month ago

AI Prompts let you use real-world signals, like weather, air quality, sports results, markets, news, and calendar events to power Flow splits and decisions.

Use them when you want your automation to react to what’s happening outside of AIQ. These prompts are not based on POS/ecommerce partner webhooks. They’re for “outside world” context.

AI prompts don’t re-trigger the same Flow.

A customer can only move forward through a Flow. Once they’ve passed a step (node), they won’t go back “up” to earlier steps, even if an external AI prompt (like weather) becomes true again later.

If your Flow starts with a condition like: Will it snow in Boston, MA in the next 12 hours?

  • The Flow will evaluate that question when the customer enters the Flow.

  • If the Flow stays enabled, the same customer will not automatically enter again at a later date, just because the answer changed (e.g. it snows again next week).

  • To act on a later forecast window, you’ll need to design the Flow with Delays or duplicate the flow with a updated condition / date.


Prompt Rules

Every AI prompt must:

  1. Start with one of these prefixes: is, are, was, were, do, does, did, can, could, should, would, may, might, must, will, shall, has, have, had

  2. End with a question mark (?)

If a prompt doesn’t follow this format, it will fail validation.

Fact vs prediction: choose the right starter word

Your first word determines how the AI should interpret the question.

Fact mode: wait for a definite outcome

Use did / was / were / has / have / had when you want a verifiable answer (true/false) that becomes knowable once the event happens.

Examples:

  • Did the Celtics beat the Nets in the NBA game on 1/23/2026?

  • Has Apple stock stayed above $300 for the last 2 months?

  • Was the AQI above 100 in {{storeCity}} yesterday?

Prediction mode: answer immediately with an educated guess

Use will / would / could / may / might when you want an answer right now about what’s likely to happen in the future.

Examples:

  • Will the Celtics beat the Nets on 1/23/2026?

  • Could snowfall exceed 3 inches in {{storeCity}} tomorrow?

  • Might rain reduce foot traffic in {{storeCity}} this weekend?

Prediction prompts may use things like forecasts, odds, or expert-style projections, depending on the topic.

Handling “event hasn’t happened yet” (avoiding confusion)

It’s normal to feel like “Did … on a future date?” should still be valid—and it is, when your intent is:

  • Wait until the event occurs

  • Then take action based on the final result

In that case, you should keep the prompt in fact mode (Did/Was/Has) and design your Flow to re-run it until a definite answer is available.

Recommended behavior

  • If the answer indicates “not occurred yet / cannot be determined yet,” treat that as no action yet and re-check later.

  • Once the event has happened, the same prompt should return a definite yes/no and your Flow can continue.

When you should NOT use “Will…”

Don’t switch to Will if that would change the meaning of the Flow. “Will the Celtics win?” is a prediction; it answers immediately based on current odds and can trigger messaging before the game actually happens.

Best practices for strong prompts

  • Include a specific date or time window when possible.

  • Use {{storeCity}} / {{storeState}} to localize results.

  • Keep it to one question per prompt.

  • For sports, include the team name (or both teams) to reduce ambiguity.


How to Test a Prompt

After following the prompt formatting rules above, you can test your prompt using the Test Prompt button.

If the prompt is valid, you will see either:

  • Result: Condition met. Will go down YES path.

  • The prompt evaluated to true. When the flow runs, contacts will proceed down the YES path.

  • Result: Condition not met. Will go down NO path.

  • The prompt evaluated to false. When the flow runs, contacts will proceed down the NO path

Note: Both results indicate a successful prompt execution. Error states are shown only if the prompt cannot be evaluated or fails to run.

Document image

If the prompt is invalid and does not comply with the formatting rules outlined above, you will see an error toast "question must be a yes/no question"

Document image


Prompt Examples

Weather

  • Will it rain in {{storeCity}} in the next 12 hours?

  • Is there a severe weather alert active in {{storeCity}} today?

  • Will snowfall exceed 3 inches in {{storeCity}} in the next 24 hours?

Air quality

  • Is the AQI above 100 in {{storeCity}} right now?

  • Has the AQI been above 100 in {{storeCity}} for 2 consecutive days?

Sports

Fact-mode “wait until it happens”

  • Did the {{localTeamName}} win their most recent game?

  • Did the Celtics beat the Nets in the NBA game on 1/23/2026?

Prediction-mode “answer now” (based on odds)

  • Will the {{localTeamName}} win their game today?

Markets

  • Is Bitcoin currently above $80,000?

  • Has Apple stock stayed above $300 for the last 2 months?

News / policy

  • Did cannabis taxes increase in {{storeState}} in the last 30 days?

  • Are there major news alerts in {{storeState}} today?

Calendar

  • Is there a full moon tonight?

  • Are we within 7 days of 4/20?


Troubleshooting

If your prompt fails:

  1. Confirm it starts with an approved prefix

  2. Confirm it ends with a ?

  3. If you want a definite answer, use Did/Was/Has and re-check until the event occurs

  4. If you want an immediate forecast, use Will/Would/Could/May/Might


Need Help?

If you need assistance, reach out to AIQ Support anytime via the chat widget within your AIQ Dashboard.

Did this answer your question?