> ## 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.

# CRM steps

> Create, find, and update records and activities in Salesforce and HubSpot from a workflow.

CRM steps read and write records in your connected CRM. Create, match, and update records and
activities work across **Salesforce** and **HubSpot**; a few steps are specific to one provider.

<Note>
  Add a step in the **Workflows** builder with **Add Node**. CRM steps need a connected CRM
  (set up under **Settings → Integrations**) and, for assignment, the per-user
  [integration mappings](/settings/users) that link your Default users to their CRM identities.
</Note>

## Create record

Creates a new record in your CRM.

| Field                  | What it does                                       | How to use it                                                                                                                |
| ---------------------- | -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **Platform**           | Which CRM to write to.                             | Choose a CRM. Only your connected CRMs appear here.                                                                          |
| **Record Type**        | The record type to create.                         | Pick the object, for example **Contact** or **Lead**. The choices depend on the platform.                                    |
| **Associated contact** | The existing HubSpot contact this Lead belongs to. | Shown only for a HubSpot **Lead**. Choose a contact record ID from an earlier step; HubSpot requires every Lead to have one. |
| **Mapped Fields**      | The field values to set.                           | Map each CRM field to a value, for example set **Email** to the lead's email and the owner field to the assigned user.       |

The created record's ID and full record are available to later steps.

## Match record

Finds an existing record by criteria, and branches on whether one was found.

| Field                             | What it does                                                                                       | How to use it                                                                                                                                                                            |
| --------------------------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **CRM**                           | Which CRM to search.                                                                               | Choose a CRM. Only your connected CRMs appear here.                                                                                                                                      |
| **Record**                        | The record type to search.                                                                         | Pick the object, for example **Contact**.                                                                                                                                                |
| **Match by association**          | HubSpot only. Look up a record associated with another record instead of matching on field values. | Toggle on, then set **Source record type** and **Source record**. When on, the step ignores **Match Details** and instead finds the record associated with the source record you choose. |
| **Match Details**                 | The criteria that define a match.                                                                  | Add conditions, for example **Email** equals the lead's email.                                                                                                                           |
| **Prioritize matched records by** | Which record wins when several match.                                                              | Optional. Add ordering rules, for example most recently modified first, applied in order to pick one.                                                                                    |

The step has two branches, **Match** and **No Match**, so you can handle each case (for
example update the existing record, or create a new one).

## Update record

Updates fields on an existing record.

| Field                | What it does             | How to use it                                                         |
| -------------------- | ------------------------ | --------------------------------------------------------------------- |
| **Platform**         | Which CRM to write to.   | Choose a CRM. Only your connected CRMs appear here.                   |
| **Record Type**      | The record type.         | Pick the object.                                                      |
| **Record to update** | Which record to change.  | Choose a record ID from an earlier step (a match or create).          |
| **Fields**           | The field values to set. | Map each field to its new value, for example set the lifecycle stage. |

The updated record is available to later steps.

## Convert lead

Converts a Salesforce lead into an account, contact, and optionally an opportunity.
Salesforce only.

<Warning>
  This step is still being finalized. Configuring it does not convert a lead yet, so hold off on relying on it in a live workflow until your Default contact confirms it is available.
</Warning>

| Field                                     | What it does                                                     | How to use it                                                                                        |
| ----------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **Lead to convert**                       | The lead to convert.                                             | Choose a lead record ID from an earlier step.                                                        |
| **Account to merge into (optional)**      | An existing account to merge the lead into.                      | Optional. Choose an account record ID from an earlier step. Leave empty to create a new account.     |
| **Contact to merge into (optional)**      | An existing contact to merge the lead into.                      | Optional. Choose a contact record ID from an earlier step. Leave empty to create a new contact.      |
| **Connect Converted Lead to Opportunity** | Whether converting also creates or links an opportunity.         | Choose **None**, **New**, or **Existing**.                                                           |
| **Opportunity name**                      | The new opportunity's name.                                      | Shown when the previous field is **New**. Enter a name, for example `Acme Corp - Expansion`.         |
| **Existing opportunity**                  | The opportunity to link to.                                      | Shown when the previous field is **Existing**. Choose an opportunity record ID from an earlier step. |
| **Owner (Optional)**                      | Who owns the converted records.                                  | Optional. Choose a Salesforce user from workflow state.                                              |
| **Override LeadSource field**             | Whether to overwrite the lead source on the converted records.   | Toggle on to override; off keeps the original.                                                       |
| **Send notification E-Mail**              | Whether Salesforce emails the record owner about the conversion. | Toggle on to send Salesforce's standard notification.                                                |

## Create activity or engagement

Creates an activity in Salesforce or an engagement in HubSpot, depending on which CRM you
pick. This step is labeled **Create Activity** for Salesforce and **Create Engagement** for
HubSpot.

| Field                                              | What it does                                  | How to use it                                                                                                                   |
| -------------------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **CRM**                                            | Which CRM to write to.                        | Choose **Salesforce** or **HubSpot**.                                                                                           |
| **Type**                                           | The Salesforce activity type.                 | Salesforce only. Pick the type, for example **Task** or **Event**.                                                              |
| **Associated record (optional)**                   | The record to link a Salesforce activity to.  | Salesforce only. Optional. Choose a record ID from an earlier step to attach the activity to that account or opportunity.       |
| **Engagement type**                                | The HubSpot engagement type.                  | HubSpot only. Pick the type, for example **Call**, **Email**, **Meeting**, **Note**, or **Task**.                               |
| **Associated record type** / **Associated record** | The HubSpot record to link the engagement to. | HubSpot only. Optional, but if you set one you must set the other. Pick the record type, then a record ID from an earlier step. |
| **Fields**                                         | The activity or engagement field values.      | Map fields such as the subject and due date.                                                                                    |

The created activity or engagement's ID is available to later steps.

## Match activity or engagement

Finds an existing Salesforce activity or HubSpot engagement by criteria, and branches on
whether one was found. This step is labeled **Match Activity** for Salesforce and
**Match Engagement** for HubSpot.

| Field                                 | What it does                              | How to use it                                                                |
| ------------------------------------- | ----------------------------------------- | ---------------------------------------------------------------------------- |
| **CRM**                               | Which CRM to search.                      | Choose **Salesforce** or **HubSpot**.                                        |
| **Type**                              | The Salesforce activity type.             | Salesforce only.                                                             |
| **Engagement type**                   | The HubSpot engagement type.              | HubSpot only.                                                                |
| **Match Details**                     | The criteria that define a match.         | Add conditions to match on.                                                  |
| **Prioritize matched activities by**  | Which activity wins when several match.   | Salesforce only. Optional. Add ordering rules, applied in order to pick one. |
| **Prioritize matched engagements by** | Which engagement wins when several match. | HubSpot only. Optional. Add ordering rules, applied in order to pick one.    |

The step has two branches, **Match** and **No Match**.

## Update activity or engagement

Updates fields on an existing Salesforce activity or HubSpot engagement. This step is labeled
**Update Activity** for Salesforce and **Update Engagement** for HubSpot.

| Field                | What it does                            | How to use it                            |
| -------------------- | --------------------------------------- | ---------------------------------------- |
| **CRM**              | Which CRM to write to.                  | Choose **Salesforce** or **HubSpot**.    |
| **Type**             | The Salesforce activity type.           | Salesforce only.                         |
| **Engagement type**  | The HubSpot engagement type.            | HubSpot only.                            |
| **Record to update** | Which activity or engagement to change. | Choose a record ID from an earlier step. |
| **Fields**           | The field values to set.                | Map each field to its new value.         |

## Create association

Links two HubSpot records, for example a contact to a company. HubSpot only.

| Field                                  | What it does                   | How to use it                                                                                                                                                   |
| -------------------------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **From record type** / **From record** | The first record in the link.  | Pick the record type, then a record ID from an earlier step.                                                                                                    |
| **To record type** / **To record**     | The second record in the link. | Pick the record type, then a record ID from an earlier step.                                                                                                    |
| **Association type**                   | How to label the link.         | Choose **Default**, or **Labeled** to pick a specific relationship.                                                                                             |
| **Label**                              | The relationship label.        | Shown when **Association type** is **Labeled**. Pick a label from your HubSpot association labels, for example a "Primary contact" label if you've defined one. |

## Get record (legacy)

**Get Record** fetches an existing Salesforce record by ID so later steps can read its
current field values. This step no longer appears in the **Add Node** picker, and
workflows that still contain it may no longer run it. Use **Match Record** to look up a
record instead.

{/* TODO screenshot: Create record step with Platform, Record Type, and Mapped Fields */}

{/* TODO screenshot: Create activity or engagement step, HubSpot engagement type selected */}
