> 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/getting-started/install-gonexa/add-generation-button.md).

# Position the generation button

To generate a document from a Salesforce record (quote, opportunity, account, or any standard or custom object), add one of the following to that object's page:

* the **"Gonexa - Generate Document" Lightning component** (recommended);
* or an **action button** at the top of the page, for example "Generate Quote".

Generation can also be automated, without any click: see Generate a document automatically with a flow.

{% hint style="warning" %}
**The generation button does not appear?**

The component remains invisible until a document template exists for this object. First create a document template based on the page's object (for example Quote), then reload the page.
{% endhint %}

## How do I add the generation component to a quote page? (recommended)

{% stepper %}
{% step %}

### Open the page to edit

Open a record of the object on which the button should appear (a quote, an opportunity…).
{% endstep %}

{% step %}

### Edit the Lightning page

Click the gear icon at the top right, then click **Edit Page**.
{% endstep %}

{% step %}

### Add the Gonexa component

Search for the **Gonexa - Generate Document** component and drag it to the desired location on the page.
{% endstep %}

{% step %}

### Save and activate

Click **Save**, then **Activate** the page for the relevant apps or profiles.
{% endstep %}
{% endstepper %}

![Adding the Gonexa - Generate Document component](https://content.gitbook.com/content/U1Chwyf7Cc7FN9BiEh0V/blobs/1elGHb2CxJsE9RwBaCg6/13-02-utilisation-composant-lightning.gif)

## How do I add a "Generate" button at the top of the page?

{% stepper %}
{% step %}

### Create the action

In **Setup › Object Manager**, open the relevant object (for example Quote), then go to **Buttons, Links, and Actions › New Action**. Fill in the information as shown below.

![Setting up the new action](https://4198981723-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTYUzkIngX1MnHE8kOJDR%2Fuploads%2FTfZTp70SuP5jRSuDYU1A%2Finstallation-gonexa-8.png?alt=media)

{% hint style="info" %}
Choose a label that is meaningful to your users, for example "Generate Quote".
{% endhint %}
{% endstep %}

{% step %}

### Add the action to the page

Add the action to the object's page layout, in the **Mobile & Lightning Actions** section, then save.
{% endstep %}
{% endstepper %}

![Creating the "Generate" action button](https://content.gitbook.com/content/U1Chwyf7Cc7FN9BiEh0V/blobs/bKRTiQgU3t3PNfcxnhEQ/14-03-creation-bouton.gif)


---

# 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/getting-started/install-gonexa/add-generation-button.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.
