> For the complete documentation index, see [llms.txt](https://university.gonexa.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://university.gonexa.fr/doc/en/advanced-features/doc-and-flows/flow-basics.md).

# Gonexa Doc flow basics

Save time and eliminate repetitive tasks with Salesforce flow actions.

## Create a new flow

* From Salesforce Setup, go to Flows, then click New Flow.
* Select the type of flow to set up from the following options:

**Screen Flow**\
Display settings or information to the user before launching an action on click\
*E.g. Choosing the template and output format before generating on click*

**Record-Triggered Flow**\
Trigger an action when a Salesforce record is created, updated or deleted\
*E.g. Automatically generate a document when a status changes*

**Schedule-Triggered Flow**\
Trigger a specific action at a scheduled time\
*E.g. Generate all tax receipts every December 31 at 9:00 AM*

* Click "Create"

## Creating a recordId variable

{% hint style="warning" %}
**Tip**

The recordId variable is used in almost all screen flows. It makes the recordId field a variable and gives the flow the context from which the generation is launched.
{% endhint %}

* From the Toolbox, click New Resource
* Choose the type Variable and enter an API name
* Select the Text data type to store the ID of the record to generate.
* Check the box: Available for input

## Add an information screen

* In the flow, click the + and choose the Screen element
* Enter the label and the API name

{% hint style="warning" %}
**Tip**

In the screen properties, rename the "Next" button in the footer configuration to improve the user experience.
{% endhint %}

* Drag and drop the component you want: date, checkbox, display text...
* Confirm

## Add an update action

To update the data entered in the previous screen, you can add an update action. It will trigger the next action.

* In the flow, click the + and choose the Update Records element
* Enter the label and the API name
* Check the box: Specify conditions to identify records
* Select the Salesforce object whose field must be updated (e.g. Quote)
* Filter the conditions with the record Id = the recordId variable created earlier
* Define the fields to update and their values. (E.g. ExpirationDate = Expiration Date and Status = Review)
* Confirm, save, name and activate your flow.

## Make the flow available

Place the flow on your context.

* In Salesforce, go to your main object (the object from which the action is triggered)
* Click Edit Page
* Drag and drop the Flow component where you want it
* Select the flow to call from the drop-down list
* Check the box: Pass record ID into this variable


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://university.gonexa.fr/doc/en/advanced-features/doc-and-flows/flow-basics.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
