> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.fotostudio.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Document Workflows

## What is a document workflow?

A document workflow is an automatic sequence of tasks, emails, and SMS messages that trigger based on events related to your documents (quotes, invoices, contracts, questionnaires).

For example, you can create a "Quote follow-up" workflow that:
1. Sends a follow-up email **3 days after** sending the quote without a response
2. Sends a reminder SMS **7 days after**
3. Sends a final email **2 days before** the quote expires
4. Creates a manual task for you **on the expiration day**

Once configured, this workflow automatically applies to each sent quote. If the client accepts or declines in the meantime, all pending reminders are automatically deleted.

Or a "Invoice follow-up" workflow that:
1. Sends a reminder email **3 days before** the due date
2. Sends a follow-up SMS **on the due date**
3. Sends a follow-up email **7 days after** the due date
4. Creates a manual task for you **14 days after**

Once configured, this workflow automatically applies to each relevant invoice, without any action on your part.

---

## Available workflow types

| Type | Triggers when... |
| ---- | --- |
| **Session** | A session is created, confirmed, or on the session date |
| **Quote** | The quote is sent, accepted, declined, or expired |
| **Invoice** | The invoice is sent, paid, or due |
| **Contract** | The contract is sent or signed |
| **Questionnaire** | The questionnaire is sent or completed |

---

## Create a document workflow

1. Go to **Settings > Workflows**
2. Click **Add ▾** and choose the type (Invoice, Quote, etc.)
3. Give the workflow a name
4. Add tasks for each desired event:
* Choose the **phase** (e.g., "Document sent", "Invoice due")
* Define the **delay** (e.g., +3 days, -1 day)
* Associate an **automatic email**, an **SMS**, or a simple **manual task**
5. Save

---

## Apply a workflow to a document

### Manually
On an invoice, quote, contract, or questionnaire record, click the **Workflow** button in the actions menu (⋮). Select the workflow to apply.

### When creating an invoice
When creating an invoice or quote, a **Workflow** field appears in the form. Select the desired workflow before saving.

### From a quote template
When you create/edit a quote template, a **Workflow** field is available. If you configure one, it will be used by default every time you create a new quote from this template.

### From a contract template
Same principle for contract templates, you can choose a default **Workflow**.

### From a questionnaire template
Same here.

### Via a payment plan
In **Settings > Payment plans**, open a plan and expand the **Advanced features** section. Associate a default workflow. All invoices generated by this plan will have this workflow pre-selected.

---

## Important behaviors

### ✅ Paid invoice → due date reminders deleted
If an invoice becomes **paid** while due date or overdue reminders were scheduled, **all pending tasks and emails are automatically deleted**. Your client won't receive a reminder for an already paid invoice.

### ✅ Quote accepted or declined → send and expiration reminders deleted
As soon as a quote is accepted or declined, tasks related to its sending and potential expiration are deleted.

### ✅ Contract signed → send reminders deleted
Same for contracts: once signed, scheduled signing reminders disappear.

### ✅ Questionnaire completed → send reminders deleted
Same behavior: once the questionnaire is filled out, reminders are canceled.

> **In summary**: as soon as a document reaches its final state (paid, accepted, signed, completed, declined), all pending tasks and communications related to previous phases are automatically deleted.

---

## Track an ongoing workflow

On an invoice or quote record, click the **Workflow** button in the actions menu to access the applied workflow details. You'll see:

* The status of each action (Scheduled, Overdue, Sent, Completed)
* The planned date for each send
* A **Send now** button to manually trigger an email if needed
* A **Cancel workflow** button to delete all pending actions

---

## Session Tasks tab

In a session record, the **Tasks** tab groups all document-related actions (quote, invoice, contract, questionnaire phases) in a single **Documents** section, making it easier to track the session overall.

---

## Frequently asked questions

**Q: What happens if I apply a workflow when the document has already been sent?**
Tasks from the "sent" phase are created with delays calculated from the actual send date.

**Q: Can I have multiple workflows on the same invoice?**
Yes, it's possible to apply multiple successive workflows. Each new workflow creates its own tasks.

**Q: Are already sent tasks deleted if I pay the invoice?**
No. Only **not yet executed** tasks are deleted. Already sent emails remain in the history.

**Q: Does the workflow trigger automatically when sending the document?**
Yes, if a default workflow is configured on the document (via the form or payment plan), it triggers automatically when the document email is sent.