# set_crm_mappings (/docs/mcp/tools/set-crm-mappings)

{/* Generated by scripts/sync-mcp-tools.mjs from happierleads-api. Do not edit: change src/routes/mcp/toolDocs.json there, or add content/mcp-notes/set_crm_mappings.mdx. */}

**Set CRM field mappings** · Deletes or overwrites data

Sets the field mappings for contacts or companies pushed to a CRM. The list you send replaces the current one; get_crm_mappings first and list_crm_variables for the fields.

| Connection | Account URL, team member URL or OAuth |
| --- | --- |

## Parameters [#parameters]

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `websiteId` | `string` | Yes | Website ID from list_websites. |
| `crm` | `"hubspot" \| "salesforce" \| "pipedrive" \| "zoho" \| "gohighlevel"` | Yes | The CRM. |
| `objectType` | `"contact" \| "company"` | Yes | contact or company. |
| `mappings` | `object[]` | Yes | The full list: lead field (source) to CRM field (target). |
| `mappings[].source` | `string` | No | Lead field, from list_crm_variables. |
| `mappings[].target` | `string` | No | CRM field name. |

## Tool definition [#tool-definition]

What your assistant receives from `tools/list`:

```json
{
  "name": "set_crm_mappings",
  "title": "Set CRM field mappings",
  "annotations": {
    "title": "Set CRM field mappings",
    "readOnlyHint": false,
    "destructiveHint": true,
    "idempotentHint": true,
    "openWorldHint": false
  },
  "inputSchema": {
    "type": "object",
    "properties": {
      "websiteId": {
        "type": "string",
        "description": "Website ID from list_websites."
      },
      "crm": {
        "type": "string",
        "enum": [
          "hubspot",
          "salesforce",
          "pipedrive",
          "zoho",
          "gohighlevel"
        ],
        "description": "The CRM."
      },
      "objectType": {
        "type": "string",
        "enum": [
          "contact",
          "company"
        ],
        "description": "contact or company."
      },
      "mappings": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "source": {
              "type": "string",
              "description": "Lead field, from list_crm_variables."
            },
            "target": {
              "type": "string",
              "description": "CRM field name."
            }
          }
        },
        "description": "The full list: lead field (source) to CRM field (target)."
      }
    },
    "required": [
      "websiteId",
      "crm",
      "objectType",
      "mappings"
    ]
  }
}
```
