> ## Documentation Index
> Fetch the complete documentation index at: https://docs.buildassistants.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Extractions

<video controls className="w-full aspect-video rounded-xl" src="https://storage.googleapis.com/msgsndr/6hlbl9oJC3URJyPfafmu/media/6889c6468934cebabb032536.mp4" />

# Using Extractions to Populate Custom Fields

## Introduction

This guide walks you through how to **extract important information** from conversations using tools and sync that data into **custom fields in GoHighLevel**. We'll cover how to create and connect extractions, how to prompt for them, and where that data ends up.

***

## 1. Set Up Extraction Tools

* Go to the **right-hand sidebar** and click **Tools and Abilities**.
* Select **Manage Tools** → scroll to **Extraction**.
* Click **Create a Tool** and choose **Extraction** as the type.
* Name your tool (e.g., `extract_user_business_name`).
  * Use **lowercase** and **underscores** — avoid spaces.
  * Must follow **JSON formatting**.
* Paste in the extraction description.\
  **Example Description:**\
  *“Always use this tool to extract and store the user's business name so a team member can reference the information at a later date.”*

***

## 2. Map the Tool to a Custom Field

* You must create **custom fields in GoHighLevel** before syncing tools.
* Once created, search for your field (e.g., `"Business Name"`) during tool setup.
* Click to **sync it** with the extraction tool.

***

## 3. Repeat for Each Data Point

You can create similar tools for:

* Business Description
* Best Selling Service
* Session Feedback

> Use the same structure and formatting for each. Add them all to your assistant after setup.

***

## 4. Add Extractions to the Prompt

It's not required to prompt every extraction, but doing so **improves consistency**.

### Example Prompt Snippets:

**Step 5 (Business Name):**\
*“Use the tool `extract_user_business_name` to extract and store the user's business name. This is an internal tool, so don’t mention it to the user. Continue to step 6 after calling the tool.”*

**Step 7 (Business Description):**\
*“Call the tool `extract_user_business_description` to extract and store the user's description. Do not use the tool output in your response. Move to step 8 afterward.”*

**Step 9 (Best Selling Service):**\
*“Call the tool `extract_user_service` to extract and store the user's best-selling service. Do not include tool responses in chat. Proceed to step 10.”*

**Step 13 (Session Feedback):**\
*“Call the tool `extract_user_feedback` to extract and store session feedback from step 12. This is internal. Move to step 14 afterward.”*

***

## 5. Notes on Using Tools in Prompts

* These tools are **invisible to the user** unless you include their output in the assistant’s response.
* Use phrasing like *“move to step X after calling the tool”* to **maintain flow and keep the tool call silent**.
* If you're using **external tools** (e.g., via **Make** or **Buildship**), you can return **dynamic values** and display them if desired.

***

## 6. Final Custom Field Sync & Location

* Once synced, all **extracted data** will be stored in the mapped **custom field**.
* You can view this data inside the **contact record in GoHighLevel**.

**Custom fields used in the demo:**

* Business Name
* Business Description
* Best Selling Service
* Session Feedback

***

## Tips

* Create and **name your custom fields before** setting up extraction tools.
* Use **internal phrasing** to keep tool calls hidden from the user.
* Prompting the assistant to use tools **increases accuracy**.
* **Always add tools** to the assistant after setup — otherwise they won’t be used.

***

## Summary

This guide shows how to extract user data like business name, service, and feedback into custom fields using **extraction tools**. You create tools, sync them to fields, and guide the assistant through prompts to call those tools invisibly during conversation. Everything syncs seamlessly into **GoHighLevel** for your team to use later.

* Create extraction tools in **Tools & Abilities**.
* Use **JSON formatting** and connect each to a **custom field**.
* Prompt tool usage in your assistant's task list.
* **Add the tools** to your assistant after setup.
* All data goes directly into your **GoHighLevel contact record**.

***

© 2025 Build Assistants
