# CRM - Updating Custom Lead Fields with the Loss Reason Token

Automating updates in CRM systems is an essential practice to keep records consistent and information organized. In this article, we present a step-by-step guide to implement an automation that updates a custom field on a lead record using the "Reason for Loss" token.

The goal is simple: whenever an opportunity is marked as "Lost", the system will automatically populate the lead's custom field with the information corresponding to the reason for loss.&#x20;

It is worth noting that the "Reason for Loss" token is exclusive for use in the CRM, being triggered by an action directly related to the opportunity flow.

This integration ensures greater data accuracy, facilitates future analyses of loss reasons, and contributes to more assertive sales and customer relationship strategies. Follow the step-by-step guide to implement this functionality.<br>

{% embed url="<https://youtu.be/M8tC5M60ys4>" %}


---

# Agent Instructions: 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:

```
GET https://docs.sprinthub.com/en/topics/general/crm/crm-tutorial-videos/crm-updating-lead-custom-fields-with-the-loss-reason-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
