Skip to content
Plain Help Center home
Plain Help Center home

Conditions

If/Else conditions are decision points inside the workflow that check something about the thread and split the flow into a Yes path and a No path.

Combining conditions

You can combine multiple conditions using: All of (AND) - every condition must be true, Any of (OR) - at least one condition must be true, or Not - inverts a condition.

Start simple. Build a workflow with 2-3 steps first, test it on a few threads, then add complexity. You can always edit later. Just unpublish, make changes, and republish.

AI Prompts

The AI prompt condition evaluates your written condition against the thread context Plain provides, then determines whether the thread should take the Yes branch or No branch in your workflow.

When to use it

When a workflow reaches an AI prompt condition, Plain assembles a context snapshot of the thread and passes it to the model alongside your prompt. The context includes:

  • The full thread message history (up to the 600 most recent messages, each up to 3,000 characters)

  • Thread metadata: title, description, status, priority, and labels

  • Customer details: name and email address

  • Channel information (e.g. email, Slack, API)

  • Assignees

  • Thread fields and their configured schemas

  • Attachment count

The model evaluates your prompt against this context and returns a simple boolean: match or no match. If the condition matches, the configured action fires.

How to write good conditions

Write your conditions using "Match if..." to describe what should take the Yes branch, and "Don't match if/for..." to clarify what should take the No branch.

Example: Match if the customer explicitly requests a refund. Don't match for general billing questions or payment issues without refund mentions.

Examples

  • Match if the customer is asking to schedule a call or demo. Don't match for async questions with no scheduling intent.

  • Match if the latest customer message is only a thank you or acknowledgment with no new question.

  • Match if the customer explicitly asks to delete their account or data under privacy/GDPR.

Common mistakes

Problem

Example

Solution

Too broad, many unrelated outcomes

Match for refunds, or bugs, or billing, or angry customers, or urgent issues; otherwise route to sales.

Split into separate conditions, one per decision

Asking it to take action

If match, assign to Tier 2; if no match, send a CSAT; if maybe, add label "Review".

Each AI condition makes one match/no-match decision. Use workflow actions to carry out an action after the prompt step.

Details that are not in the thread context

Match if the customer's company in our CRM is in the manufacturing sector.

AI can only use the thread context Plain provides. External data isn't available.

Contradictory or impossible to follow

Match only if the customer never mentioned pricing, but also asked for a quote.

Use consistent rules

Purely standard rules

Match if the thread has label "Billing"

Use standard conditions, like contains label in this example

Over-reliance on negation

Don't match if it's not a duplicate of something that isn't a duplicate unless it's not spam.

Use positive statements

Unbounded "use your judgment" asks

Use your best judgment to decide if this thread is important.

Give specific criteria. AI can't guess what "important" means for your workflow.