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

# Backfilling missing CRM fields with Default

> Fill empty fields on existing Salesforce and HubSpot records with Default enrichment, using Tables, a workflow on CRM record changes, or the API trigger.

Backfilling missing CRM fields with Default means enriching records that already exist in Salesforce
or HubSpot and writing the values they lack, such as a job title or a company's employee count, back
to the CRM. Default does this with its enrichment waterfalls and the same CRM write steps it uses for
new leads.

Default has no single button that enriches every record in your CRM at once. You pick the records and
the method below. Backfilling is part of CRM hygiene. The other part, preventing and finding
duplicates, is covered in [Duplicate CRM records](/enrichment/duplicates).

## Ways to backfill CRM fields in Default

| Method | Good for | Limits | Availability |
| - | - | - | - |
| [Tables](#backfill-with-tables): **Enrich**, then **Update CRM record** | A one-time cleanup of records you can filter and review first | 100 records per **Update CRM record** run | Tables is in beta, turned on per workspace |
| [A workflow on **CRM Record Updated**](#keep-fields-filled-with-a-workflow) | Filling fields as records change, and keeping them filled | Runs only for records that change | Any workspace with Salesforce or HubSpot connected |
| [The **API** trigger, called by your own script](#backfill-from-your-own-system-with-the-api-trigger) | A large export you control | 30 requests per minute per API key | Any workspace with an API key |

All 3 methods charge enrichment credits for each lookup that returns data. See
[What a backfill costs](#what-a-backfill-costs).

## Backfill with Tables

<Note>
  **Tables is in beta.** It is turned on per workspace. If you do not see **Companies** and **People**
  under **Views** in the sidebar, contact Default.
</Note>

In Tables, a view can show records straight from a Salesforce or HubSpot object. You enrich the rows
into new columns, review them, then write the values back to each row's own CRM record.

<Steps>
  <Step title="Create a view from your CRM">
    Under **Views** in the sidebar, open **People**, or **Companies** for accounts and companies, and
    select **Create new view**. Name the view, open **Data Source**, and choose the Salesforce or
    HubSpot object, for example **Contact**. Select **Create**.
  </Step>

  <Step title="Filter to records with the field missing">
    Add a filter on the CRM field you want to fill, with the **Is Empty** operator, for example the
    contact's title. The **Actions** button works only on a saved view, such as the one you just
    created.
  </Step>

  <Step title="Enrich the rows">
    Select **Actions**, then **Enrich**. Choose the **Waterfall** tab and your waterfall. Under
    **Field mapping**, map each provider field to **New column**. Under **How many records?**, choose
    **All records**, **Selected**, or **A specific set**.

    Check the **Cost Breakdown**, then select **Run Action**.
  </Step>

  <Step title="Review the new columns">
    Read the enriched values in the table before anything reaches your CRM.
  </Step>

  <Step title="Write the values to the CRM">
    Select **Actions**, then **Update CRM record**. Under **Fields to update**, choose a CRM field,
    then select **Use value from a table column** and pick the enriched column. Add more fields with
    **Add field**.

    Select **Update**, followed by the number of records, and confirm. Default writes to each row's
    own Salesforce or HubSpot record.
  </Step>
</Steps>

<Warning>
  **Update CRM record** overwrites the current value of each field it writes, and it cannot be undone.
  Filter the view to records where the field is empty first, so values your team entered stay as they
  are.
</Warning>

What to know about **Update CRM record**:

* **100 records per run.** For more, run it again on the next set of rows.
* **Empty cells are skipped.** When a row's enriched column is empty, Default leaves that CRM field
  alone. A row with nothing to write is marked failed with the reason, and the other rows continue.
* **Only on CRM views.** The action appears on views created from a Salesforce or HubSpot object,
  because each row carries its CRM record ID.
* **Suggested fields.** When the table's enrichment columns are mapped to fields, the action fills in
  suggested CRM fields for you to review.

**Sync to source fields** is a different action. It writes enriched values into Default's own person
and company records, not into Salesforce or HubSpot.

## Keep fields filled with a workflow

A workflow with the **CRM Record Updated** trigger enriches a record when it changes and writes the
missing values back. Once it is published, records fill in as your team and your systems touch them.

<Steps>
  <Step title="Add the trigger">
    Add the **CRM Record Updated** trigger. Set **CRM** and **Record**, for example **Salesforce** and
    **Contact**.
  </Step>

  <Step title="Limit it to records that need data">
    Add a **Condition** so only records that need data qualify. On Salesforce fields that can be
    empty, use **is NULL**, for example `Title` **is NULL**. For HubSpot, or to pick the records
    yourself, use a checkbox field as described in
    [Pull older records in with a checkbox](#pull-older-records-in-with-a-checkbox).
  </Step>

  <Step title="Enrich">
    Add **Enrich Data** with your waterfall. Set **Email / Domain (optional)** to the record's email,
    or to the company's domain for an account or company record.
  </Step>

  <Step title="Write the values back">
    Add **Update Record** with **Record to update** set to the record's ID from the trigger. Under
    **Fields**, map each empty field to its enriched value.
  </Step>

  <Step title="Test, then publish">
    Test on 1 record, confirm the fields in your CRM, then select **Publish** and turn on the
    [deployment switch](/workflows#the-enabled-switch) so the status reads **Live**.
  </Step>
</Steps>

How this behaves:

* **Prevent write-back loops.** The write-back changes the record, which fires **CRM Record Updated**
  again. Use a **Condition** that the write-back makes false, such as the field being empty, so the
  second run does not qualify. If you use **Fields Updated**, watch only fields that this workflow does
  not write, or its own update can start another run.
* **Misses never clear a field.** When enrichment returns no value, **Update Record** skips that field.
* **Older records wait for a change.** A record that nobody edits never starts the workflow.

### Pull older records in with a checkbox

To backfill records that nobody is editing, mark them in your CRM and let the workflow pick them up:

1. Create a checkbox field in Salesforce or HubSpot, for example `Enrich now`.
2. Set the trigger's **Condition** to require that field to be checked.
3. In **Update Record**, write the enriched values and set `Enrich now` back to unchecked, so the
   write-back does not start another run.
4. In your CRM, check the field on a small batch of records, for example with a bulk edit.

Each checked record starts its own run and uses credits. Check the run logs for the first batch before
you mark more records.

For more on HubSpot triggers and write-back, see [HubSpot enrichment](/enrichment/hubspot).

## Backfill from your own system with the API trigger

When you can export the records, your own script can send them to a Default workflow one by one
through the public API:

1. **Pick a form for the fields.** The **API** trigger needs a **Connected Form** that defines the
   fields callers send. Each call also sends the lead's email. Use an existing form, or build one in
   **Forms** with **Create new**, then **New form**.
2. **Build the workflow.** Start it with the **API** trigger and your form. Add **Enrich Data**, then
   **Match Record** to find the CRM record by email, then **Update Record** on the **Match** branch.
3. **Create an API key.** Open **Settings**, then **API Keys**, and create a key with the
   `triggers:write` permission.
4. **Send the records.** Your script calls the trigger once per record. See
   [Route and book through the API](/api/route-and-book) and
   [Fire a trigger](/api-reference/triggers/fire-a-trigger).

Each API key can make 30 requests per minute, which is about 1,800 records an hour. A request over the
limit gets a `429` response with a `Retry-After` header that says how many seconds to wait.

## Only fill empty fields

A backfill should add missing values without replacing ones your team already has:

* **In Tables,** filter the view with **Is Empty** on the CRM field before you run
  **Update CRM record**.
* **In a Salesforce workflow,** use **is NULL** in the trigger **Condition** or in a **Multi-Branch**
  condition.
* **In any workflow,** remember that **Update Record** overwrites a value that is already there, while
  it skips values the enrichment did not return.

To keep enriched data apart from values reps type, write it to separate CRM fields.

## What a backfill costs

A backfill uses the same enrichment credits as any other lookup:

* Each provider in the waterfall that returns data for a record is charged. See
  [How enrichment credits work](/enrichment/waterfalls#how-enrichment-credits-work).
* Writing to Salesforce or HubSpot uses no credits.

Before a large run, check the **Cost Breakdown** in the Tables **Enrich** action, or test the workflow
on a few records and read the credits in the run log.

Related: [Lead enrichment software from Default](https://www.default.com/product/lead-enrichment-software)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.