# Lead Source Taxonomy

{% embed url="<https://www.youtube.com/watch?index=12&list=PLS9gb0Qneac2EIlybS-X1aC418MDsAasb&pp=iAQB&v=WkKu8RXAoCs>" %}

### Lead Taxonomy in Salesforce

#### Introduction

Lead sources are a critical component of Salesforce, as they allow organizations to track the origin of their leads and measure the effectiveness of their marketing campaigns. In this document, we will explore the technical aspects of configuring lead sources in Salesforce, including the objects and fields involved, field dependencies, and validation rules.

#### Objects and Fields

The following objects are related to lead sources in Salesforce:

* Leads
* Accounts
* Contacts
* Opportunities
* Campaigns

Each of these objects has a "Lead Source" field, which stores the source of the lead. Additionally, each object has a "Lead Source Detail" field, which provides more information about the lead source.

#### Field Dependencies

Field dependencies are used to control the values that can be selected in a picklist field based on the value of another picklist field. For example, if the "Lead Source" field is set to "Demand", the "Lead Source Detail" field can only be set to certain values, such as "Email Marketing", "Blog Gated Content", "Podcast", or "Webinar".

To create a field dependency, navigate to the object that you want to add the dependency to and click on the "Fields" tab. Then, click on the "New" button and select "Field Dependency". In the "Field Dependency" dialog box, select the "Lead Source" field as the controlling field and the "Lead Source Detail" field as the dependent field.

#### Validation Rules

Validation rules are used to enforce data quality and integrity in Salesforce. For example, you can create a validation rule that requires the "Lead Source" field to be populated before an opportunity can be closed.

To create a validation rule, navigate to the object that you want to add the validation rule to and click on the "Validation Rules" tab. Then, click on the "New" button and enter a name and description for the validation rule. In the "Formula" field, enter the formula that you want to use to validate the data. For example, the following formula would require the "Lead Source" field to be populated before an opportunity can be closed:

```
AND(
  ISBLANK(LeadSource),
  ISPICKVAL(StageName, "Closed Won")
)
```

#### Conclusion

By following the steps outlined in this document, you can ensure that your lead sources are configured correctly in Salesforce and that your data is accurate and complete.


---

# 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.leanscale.team/crm-tips/salesforce/lead-source-taxonomy.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.
