> For the complete documentation index, see [llms.txt](https://docs.rubica.au/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rubica.au/households/forms/when-a-form-comes-back.md).

# When a Form Comes Back

What happens automatically when a client submits a form: create a task (for a person or an agent), notify someone, save answers into a record, start a job, write a file note, fill in a document, or se

Every form can do things for you the moment a client submits it. You set these up once, on the form, under **When it comes back**, and they run for every submission.

Open the form in the [Form Builder](/households/forms/building-a-form.md) and click **When it comes back** at the bottom of the list on the left.

## Adding an action

1. Click **+ Add an action**.
2. Choose **What should happen** (the options are below).
3. Fill in the details for that action.
4. Click **Save outcomes**, or **Save** at the top of the builder (it saves these too).

Each action has:

* **Turned on**: untick to pause an action without deleting it.
* **Remove**: deletes it.
* **+ Add a condition**: run the action only when certain answers match, for example only when the client's risk band is *Growth*. Without a condition it **Runs every time**.

If an action is missing something it needs, such as a webhook with no address or a task with no person chosen, you'll be told which one before anything is saved. Nothing is dropped silently.

## Create a task

Creates a Salesforce task when the form comes back. Use it to make sure someone reviews what came back, or to hand the work to an agent.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2Fgit-blob-54561ef316a1a2f8031236327f0b76d930769881%2Fform-action-task.png?alt=media" alt="Create a task action"><figcaption></figcaption></figure>

| Field             | What it does                                                                                                                                                          |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Task**          | The task's subject. You can use merge tags such as `{{client name}}`.                                                                                                 |
| **Assign to**     | **Owner of the household or record**, **Whoever sent the form**, someone in the client's team by **role** (for example *Adviser*), or **A specific person or agent…** |
| **Due in (days)** | Days from when the form comes back.                                                                                                                                   |
| **Instructions**  | Becomes the task's description.                                                                                                                                       |

The task is linked to the household or record the form was sent from, and to the client. A link to what came back is always added at the end of the instructions, so whoever picks it up can open the answers straight away.

If you assign by role and nobody in the client's team holds that role, the task goes to the owner of the household or record instead.

### Sending work to an agent

If your firm has an agent user, choose **A specific person or agent…** and pick the agent. The **Instructions** are then the agent's prompt. For example:

> Compare the answers with what we hold for `{{client name}}`, update the fields that changed, create any records the answers call for, and list anything you weren't sure about.

You can pull answers into the instructions with `{{answer:question_id}}`. Answers to sensitive questions arrive as *\[redacted]*. The agent reads anything it needs from the record itself, with its own access.

## Notify someone

Sends a notification when the form comes back.

| Field                       | What it does                                                                                                                                         |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| **How**                     | **Email (sent by Rubica)**, **In Salesforce (the bell)**, **Chatter post on the record** or **Slack**.                                               |
| **Who**                     | **Whoever sent the form**, **Owner of the household or record**, or **A specific person**. A Slack message goes to the channel you name.             |
| **Subject** and **Message** | Your wording. Merge tags: `{{client name}}`, `{{form name}}`, `{{total score}}`, `{{matched band}}`, `{{date submitted}}`, `{{answer:question_id}}`. |

Emails and Slack messages are sent by rubica, so they look the same for every form. You write the wording and rubica handles the design.

## Save answers into a record

Writes answers into a Salesforce record, for example a new *Risk Profile* record from a risk profile questionnaire.

* Choose the record type and whether to **Add a new one every time** or **Update the existing one if there is one**.
* Map each field to an answer, a fixed value, or details such as the score or the date submitted.

To put a single answer onto the client's own record (their date of birth, for example), [Fills a field](/households/forms/building-a-form.md#fills-a-field) on the question is usually simpler.

## Start a job

Starts a workflow job when the form comes back, for example an *Entity Formation* job when a client asks you to set up a company. Choose the workflow, and optionally the team role that should own the job.

## Write a file note

Writes a file note from the client's answers on their household. Choose a file note template to shape it, or leave it blank for a general summary of what was provided, what's outstanding and what's worth clarifying. Sensitive answers are left out.

## Generate a document

Fills in one of your document templates with the answers and saves it as PDF, Word or both. Choose where to save it: **The job this form started**, **The form request** or **The household or account**.

## Send to a webhook

Sends the submission to another system, such as your own Workato recipe or Power Automate flow, the moment the form comes back.

<figure><img src="https://3555949013-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqzoPnlIGiL5ejRdJEq5X%2Fuploads%2Fgit-blob-031f1720a73c90b8cd84673d044cc1d4bb7578aa%2Fform-action-webhook.png?alt=media" alt="Send to a webhook action"><figcaption></figcaption></figure>

* **Where to send it**: the address your system gave you. Your admin may need to allow the address in Salesforce first. If so, the action's log tells you.
* **Include the answers in the payload**: untick to send only the details (who, when, score and band), so your system fetches anything else it needs.
* **Send the files** adds a `files` list with the completed form as a PDF and everything the client uploaded. Each file has a download link that works for **24 hours**, so your system can save it wherever you keep client files, such as SharePoint or Box. Sensitive answers are blanked in the PDF, and uploads to sensitive questions are not sent.
* **Show the payload it will send** shows a sample of exactly what your system will receive. Give it to whoever sets up the other end.

## What runs, and when

* Actions run automatically after the client presses **Submit**. Nothing runs for a preview.
* Each action runs on its own. If one fails (a webhook address that's down, for example), the others still run, and the client's answers are always kept.
* What ran, and anything that failed, is recorded on the form request's activity log.

Client requests run the same actions when a client presses **I'm finished**. See [Client Requests](/workflow/client-requests.md).
