> ## Documentation Index
> Fetch the complete documentation index at: https://docs.justflow.it/llms.txt
> Use this file to discover all available pages before exploring further.

# Refine your BPMN diagram with plain-English AI chat

> Use plain-English chat instructions to modify your BPMN diagram — add steps, restructure flows, and rename elements without starting over.

After Just Flow It generates your initial BPMN diagram, the conversation doesn't have to stop. The chat panel stays open alongside the editor, so you can keep giving the AI plain-English instructions to add, remove, or restructure elements. Every instruction updates the live diagram in place — your previous work is preserved, not replaced, and you never have to regenerate from scratch.

## How chat refinement works

The AI maintains full awareness of the current state of your diagram. When you type an instruction, it reads the existing elements, connections, pools, and lanes, then applies the minimum change needed to satisfy your request. Unrelated parts of the diagram stay exactly as they are.

<Steps>
  <Step title="Open the chat panel">
    With a diagram open in the editor, locate the **Chat** panel on the right side of the screen. If it's collapsed, click the chat icon in the right toolbar to expand it.
  </Step>

  <Step title="Type your instruction">
    Describe the change you want in plain English. Reference element names or positions to help the AI identify exactly what to modify (see [tips below](#tips-for-effective-instructions)).
  </Step>

  <Step title="Press Enter or click Send">
    The AI processes your instruction and updates the diagram immediately. The changed elements are briefly highlighted so you can spot what moved.
  </Step>

  <Step title="Review the change">
    Inspect the updated diagram. If the result isn't quite right, just type a follow-up instruction to correct it — the AI will adjust without undoing unrelated work.
  </Step>
</Steps>

<Note>
  The AI edits the **existing** diagram rather than regenerating it from scratch. Every element you've already added or adjusted — whether by AI or [manually](./manual-editing) — is preserved unless your instruction explicitly asks for it to change.
</Note>

## Example instructions

The following examples show the range of changes you can request in a single chat message. Copy and adapt them to match the element names in your own diagram.

```text theme={null}
Add an approval step before the "Ship Order" task

Split the "Review" lane into two separate lanes: QA and Manager

Add an exception path from the "Validate Document" task for rejected documents,
leading to a "Notify Applicant" task and an End event

Change the "Process Order" task to a parallel gateway with two outgoing paths:
one to "Send Confirmation Email" and one to "Update Inventory"

Rename the "Process Order" task to "Validate Order"
```

<Accordion title="More example instructions to try">
  ```text theme={null}
  Add a timer boundary event to the "Awaiting Approval" task that triggers
  an escalation path after 48 hours

  Move the "Payment Processing" steps into a new pool called "Payment Gateway"

  Add an exclusive gateway after "Check Stock" with two paths:
  "In Stock" leading to "Pack Items" and "Out of Stock" leading to "Notify Customer"

  Delete the "Manual Review" task and connect its incoming flow directly
  to the "Final Approval" task

  Add a collapsed subprocess around the "Pick", "Pack", and "Label" tasks
  and label it "Fulfillment"
  ```
</Accordion>

## Tips for effective instructions

Following a few simple guidelines helps the AI understand your intent and produce accurate results on the first try.

<CardGroup cols={1}>
  <Card title="Be specific about element names" icon="tag">
    Reference elements by their exact label when possible. "Add a gateway after 'Check Credit Score'" is clearer than "add a gateway in the middle." If you're not sure of the exact name, a close approximation still works well.
  </Card>

  <Card title="Describe what you want, not how to implement it" icon="bullseye-arrow">
    Say "add an exception path for rejected documents" rather than "insert an exclusive gateway with a condition expression set to rejected equals true." The AI handles the BPMN mechanics — you focus on the business logic.
  </Card>

  <Card title="One meaningful change per message" icon="list-check">
    For complex restructuring, break your changes into a series of focused instructions. This makes it easier to review each result and course-correct if needed, rather than untangling a large change all at once.
  </Card>

  <Card title="Use follow-up messages to correct" icon="rotate-left">
    If the AI's interpretation isn't what you expected, don't undo and start over — just describe the correction in your next message. The AI will adjust only what needs to change.
  </Card>
</CardGroup>

<Tip>
  After a round of chat refinements, run [auto-layout](./auto-layout) to tidy up element spacing and remove any crossing flow lines introduced by new elements.
</Tip>
