> For the complete documentation index, see [llms.txt](https://docs.voiceb.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.voiceb.ai/create-a-data-collection-schema.md).

# Create a Data Collection Schema

#### 🧾 How to Create a Data Collection Schema in VoiceB.ai

VoiceB.ai lets you collect structured data from users during calls, making it easy to capture key information like names, addresses, product preferences, and more. Here's how to set up your own **Data Collection Schema** — and how it integrates with your CRM or webhook.

***

**✅ Step-by-Step: Creating a New Schema**

**Go to "Data Collection >> New Schema"** Click the **+ New Schema** button to start a new data set.

<div data-with-frame="true"><figure><img src="/files/302XRt6kn9Ua0aoI6nij" alt="" width="251"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/vsGG0Ewfk75JMjHG1ELZ" alt=""><figcaption></figcaption></figure></div>

1. **Give it a Name and Description**
   * Example:
     * Name: `Basic personal data`
     * Description: `Default data collection for Telco customers, includes name, phone, email, etc.`
2. **Add as Many Fields as You Need**\
   For each field, enter the following:

   * **Field name** – e.g., `email`
   * **Format** – e.g., `text`, `number`, `date`
   * **Description** – what the field is for (e.g., `Customer email address`)
   * **Example** – e.g., `jane.doe@email.com`
   * **Required** – toggle ON if this field is mandatory for the sale to be considered complete

   <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><p><strong>Every schema must have at least one Required field.</strong> You won't be able to save a schema where all fields are optional.</p></div>
3. **Click the Arrow (⬆️) to Add the Field**
   * You can repeat this process and add unlimited fields before saving.
4. **Click Save**
   * Once saved, the schema is locked and cannot be edited. If you need changes, create a new schema (see Updating a Schema below).

***

**🎯 Required Fields & the SOLD Outcome**

Required fields are directly tied to how VoiceB classifies call outcomes:

* A call is only classified as **SOLD** when the agent has collected **all Required fields** in the assigned schema.
* If any Required field is missing at the end of the call, the call will **not** be classified as SOLD — even if the customer verbally agreed to the purchase.
* Optional fields never block the SOLD outcome. Use them for nice-to-have data (preferences, referral source, etc.).

{% hint style="info" %}
**Design tip:** Mark as Required only the fields that are genuinely essential to process the sale (e.g., full name, phone, contract address). Every extra Required field adds friction to the conversation and can reduce your close rate.
{% endhint %}

***

**🚫 Agents Without Data Collection**

Data collection is optional at the agent level. If an agent doesn't need to capture structured data (e.g., a pure qualification or routing agent), simply **don't assign any schema** in the agent's configuration. The agent will run normally without data collection, and outcomes will be classified according to the agent's own logic.

<div data-with-frame="true"><figure><img src="/files/EXhNUcfZ4MNIqHYI317g" alt=""><figcaption></figcaption></figure></div>

***

**🔄 Updating a Schema: Create a New One**

Schemas are **immutable** once saved. This is by design: it guarantees performance and accuracy, because every historical call remains linked to the exact schema version it was collected under.

To change a schema:

1. **Create a new schema** with the updated fields.
2. **Reassign it in each agent** that should use it (agent configuration → Data Collection).
3. The old schema stays intact for historical data — nothing breaks retroactively.

Never work around this by trying to "reuse" a schema for a different purpose. A clean new schema per change keeps your data consistent and your outcome classification reliable.

***

**📌 Using the Schema**

Once your schema is created, you can **assign it to any AI Agent**:

* Go to the agent's configuration screen
* Select the desired schema under **Data Collection**
* This tells the agent what to collect during each conversation

***

**🔗 Integration & Post-Call Automation**

* If you're using **CRM integrations (like HubSpot or Salesforce)**:
  * Your data fields will appear in the **mapping section**, ready to sync automatically.
* If you're using **webhooks**:
  * You'll receive **all collected data**, plus:
    * Post-call **transcript**
    * **Summary**
    * And every **data field collected**

This ensures you get the full picture from every conversation — structured, synced, and ready to use.

***

{% hint style="info" %}
**Pro Tip:** Use descriptive names and examples to avoid confusion, especially when multiple team members are managing different schemas.
{% endhint %}

Need help structuring complex data? **Reach out to our team** — we'll help you build the right schema for your flow.

***

***


---

# 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.voiceb.ai/create-a-data-collection-schema.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.
