> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/general/sac-360/sac-360o-automations/sac-360o-automation-triggering-webhooks-when-updating-fields-with-ai.md).

# SAC 360º Automation - Triggering Webhooks When Updating Fields with AI

Using the trigger 'A lead field is updated' to identify the change in a custom field by an AI agent.

### Prerequisites:

* Create a custom lead field to store the value to be sent;
* Configure an AI agent trained to collect and automatically fill in this field.

## Creating 360° SAC automation

For this example, a custom field named '**Order Number**'. I am assuming that the AI was trained with a list of products or services, and with the objective of enabling self-service and sales, it identifies the order desired by the lead and sends it to an external platform.

The trigger '**A lead field is updated**' will automatically identify when the AI fills in or modifies the lead field, executing the actions I will show below.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FJ7wbifFvsxVycKeBsYfM%2Fimage.png?alt=media&amp;token=bc86581e-38ce-414c-9f13-2c4602eda49b" alt=""><figcaption><p><em>360° SAC automation trigger.</em></p></figcaption></figure>

## Configuring the Send Webhook action

When adding the action '**Send Webhook**' the expected method in the route, the URL, and any information in the request header or body must be configured.

To include the value of the custom field in the request body, it will be necessary to use the token associated with its alias, as well as any other native lead field. As shown in the screenshots below.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2F2zsEvXe2V4NQ1yPpPNnv%2Fimage.png?alt=media&amp;token=a9d34156-a34a-44ff-84e6-766b362c60d9" alt=""><figcaption><p><em>Send Webhook action.</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FMBdwCep79LDthLwOk8Zv%2Fimage.png?alt=media&amp;token=866adf73-8964-40c8-940d-e5ace342fe68" alt=""><figcaption><p><em>Configuring an action to add the lead field token.</em></p></figcaption></figure>


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sprinthub.com/en/topics/general/sac-360/sac-360o-automations/sac-360o-automation-triggering-webhooks-when-updating-fields-with-ai.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
