> For the complete documentation index, see [llms.txt](https://docs.zero.inc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zero.inc/features/agents/agent-examples/inbound-ai-lead-scoring.md).

# Inbound AI Lead Scoring

## **Goal**

A new inbound lead has been added to the "Inbound" list. We want to create an agent to evaluate and score the lead based on company employee count, contact's title, and the stated monthly volume from their form submission. Based on these fields, we want to automatically categorize the inbound lead priority either as High, Medium or Low.

Start by creating a new Contact-level custom property:

<figure><img src="/files/Y0akjTsaNf0zL7EIyknS" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}

### Trigger: A record is added to a list "Inbound"

<figure><img src="/files/1dP92PUSoHoG88jrrcpw" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/b05g7LK6Ek2gNV7VbuJu" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Action 1: AI task lead scoring

<figure><img src="/files/lx0ep36d9HLABWbPznft" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/dc89Fi2HMei8rkm14QV6" alt=""><figcaption></figcaption></figure>

**Note: LLMs can be surprisingly bad at basic math. Make sure to include this magic instruction in your prompt:&#x20;*****"**&#x49;mportant: Take it step by step."*<br>

**Full example prompt:**<br>

**Context:**

A new inbound lead has been added to the "Inbound" list. Your job is to evaluate and score this lead based on company employee count, contact's title, and the stated monthly volume from their form submission.

**Provided Fields:**

* **Company Employee Amount**: Company - Employee amount
* **Contact Title**: Title
* **Monthly Volume**: Monthly volume (inbound)

**Scoring Criteria:**

Assign points based on these categories:

1\. **Employee Amount:**

* 500+ employees: **3 points**
* 200-500 employees: **2 points**
* 100-200 employees: **1 point**
* 0-100 employees: **0 points**

2\. **Title:**

* Founder, Co-founder, CEO, or other C-level: **3 points**
* VP, Director, Head of, or similar senior role: **2 points**
* Lead, Manager, or equivalent: **1 point**
* Other titles: **0 points**

3\. **Monthly Volume:**

* 10M+ monthly volume: **3 points**
* 1M-10M monthly volume: **2 points**
* 20K-1M monthly volume: **1 point**
* Below 20K or unspecified: **0 points**

**Total Score Calculation:**\
**Important:** Take it step by step.

Sum points from all three criteria and classify the lead as follows:

* Total score of **7-9**: **High**
* Total score of **4-6**: **Medium**
* Total score of **1-3**: **Low**
* Total score of **0**: default to **Low**

**Your Output:**

Respond only with one of these exact values based on the scoring result:

* "High"
* "Medium"
* "Low"
  {% endstep %}

{% step %}

### Action 2: Edit record

Map the AI response node to the Inbound lead score property

<figure><img src="/files/EHpWf6b5b5F759ig2Txu" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Group your Inbound list by the Inbound lead score property

<figure><img src="/files/GpdPKG4z2x7FNHwXswJe" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

Now your inbound leads are automatically categorized based on the

1. Seniority of the person submitting the request
2. Company size
3. Monthly volume (an example of something you’d capture in your inbound lead form)

Adjust the prompt to match your use case.


---

# 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.zero.inc/features/agents/agent-examples/inbound-ai-lead-scoring.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.
