*MCP › Referencia › CRM*

# Crear una oportunidad

> Pone un lead en el embudo.

Si omites `pipelineId`, usa el embudo por defecto de la cuenta, y si omites `stageId`, la primera etapa de ese embudo. El importe va como cadena decimal para no perder céntimos por el redondeo de coma flotante. Devuelve la oportunidad creada con su probabilidad efectiva y su importe ponderado.

HERRAMIENTA `filmo_crm_opportunities_create` · `crm:write` · 120/min · Puede requerir un add-on

## Argumentos

| Nombre | Tipo | Obligatorio | Descripción |
| --- | --- | --- | --- |
| `name` | string | Sí | Nombre corto de la oportunidad. |
| `description` | string | No | Descripción en texto libre. |
| `pipelineId` | string | No | Embudo. Si se omite, el embudo por defecto de la cuenta. |
| `stageId` | string | No | Etapa inicial. Si se omite, la primera etapa del embudo. |
| `amount` | string | No | Importe como cadena decimal, con un máximo de dos decimales. P. ej.: "12500.00". |
| `currency` | string | No | Código ISO 4217 en mayúsculas. Ej.: "EUR". |
| `probabilityOverride` | integer | No | Probabilidad propia, como porcentaje. Si se omite, hereda la probabilidad de la etapa. |
| `expectedCloseDate` | string<date-time> | No | Fecha de cierre prevista, en ISO 8601 con desplazamiento. |
| `contactId` | string | No | Contacto (persona) de la oportunidad. |
| `companyId` | string | No | Contacto (empresa) de la oportunidad. |
| `ownerStaffId` | string | No | Responsable comercial. |
| `projectId` | string | No | Proyecto asociado. |
| `source` | string | No | Canal de origen del lead: inbound_email, website_form, referral, cold_outreach, event, social, existing_customer, partner u other. `inbound_email`, `website_form`, `referral`, `cold_outreach`, `event`, `social`, `existing_customer`, `partner`, `other` |
| `sourceDetail` | string | No | Detalle en texto libre del canal de origen. |
| `utmCampaign` | string | No | Campaña de atribución. |
| `utmSource` | string | No | Fuente de atribución. |
| `utmMedium` | string | No | Medio de atribución. |
| `idempotencyKey` | string | No | Clave de idempotencia elegida por el cliente (se recomienda un UUID). Repetir la misma clave con los mismos argumentos en 24 h devuelve la respuesta almacenada sin volver a ejecutar; con argumentos distintos responde 422. Es la forma segura de reintentar tras un fallo de red. |
| `ifMatch` | string | No | Bloqueo optimista: el meta.etag que obtuviste de la lectura de detalle de este recurso (o "*"). Si el recurso ha cambiado desde entonces, la llamada falla con 412 precondition_failed antes de escribir nada; léelo de nuevo y reintenta. Omítelo para escribir sin condiciones. |

## Resultado

En un éxito el resultado lleva `structuredContent` con `data` y `meta`. Estos son los atributos de `data`.

| Nombre | Tipo | Descripción |
| --- | --- | --- |
| `opportunityId` | string |  |
| `identifier` | string |  |
| `name` | string |  |
| `status` | string |  `open`, `won`, `lost` |
| `amount` | string |  |
| `currency` | string |  |
| `pipelineId` | string |  |
| `pipelineName` | string |  |
| `stageId` | string |  |
| `stageName` | string |  |
| `stageType` | string |  `open`, `won`, `lost` |
| `effectiveProbability` | number |  |
| `weightedAmount` | string |  |
| `daysInStage` | integer |  |
| `expectedCloseDate` | string<date-time> |  |
| `contactName` | string |  |
| `companyName` | string |  |
| `ownerName` | string |  |
| `source` | string |  `inbound_email`, `website_form`, `referral`, `cold_outreach`, `event`, `social`, `existing_customer`, `partner`, `other` |
| `createdAt` | string<date-time> |  |
| `updatedAt` | string<date-time> |  |
| `description` | string |  |
| `version` | integer |  |
| `collaboratorStaffIds` | string[] |  |
| `quoteIds` | string[] |  |
| `stageHistory` | object[] |  |
| `stageHistory.fromStageId` | string |  |
| `stageHistory.toStageId` | string |  |
| `stageHistory.toStatus` | string |  |
| `stageHistory.daysInPrevStage` | integer |  |
| `stageHistory.movedAt` | string<date-time> |  |
| `stageHistory.note` | string |  |

*Llamada · filmo_crm_opportunities_create*

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "filmo_crm_opportunities_create",
    "arguments": {
      "name": "Example"
    }
  }
}
```

*Resultado (generado desde el esquema)*

```json
{
  "structuredContent": {
    "data": {
      "opportunityId": "oppo_8f2a1c",
      "identifier": "<identifier>",
      "name": "Example",
      "status": "open",
      "amount": "1234.50",
      "currency": "EUR",
      "pipelineId": "pipe_8f2a1c",
      "pipelineName": "Example",
      "stageId": "stag_8f2a1c",
      "stageName": "Example",
      "stageType": "open",
      "effectiveProbability": 1,
      "weightedAmount": "1234.50",
      "daysInStage": 1,
      "expectedCloseDate": "2026-09-01T08:00:00Z",
      "contactName": "Example",
      "companyName": "Example",
      "ownerName": "Example",
      "source": "inbound_email",
      "createdAt": "2026-09-01T08:00:00Z",
      "updatedAt": "2026-09-01T08:00:00Z",
      "description": "<description>",
      "version": 1,
      "collaboratorStaffIds": [
        "coll_8f2a1c"
      ],
      "quoteIds": [
        "quot_8f2a1c"
      ],
      "stageHistory": [
        {
          "fromStageId": "from_8f2a1c",
          "toStageId": "tost_8f2a1c",
          "toStatus": "<toStatus>",
          "daysInPrevStage": 1,
          "movedAt": "2026-09-01T08:00:00Z",
          "note": "<note>"
        }
      ]
    },
    "meta": {
      "idempotencyKey": "<the key you sent, or the one the server generated>",
      "rateLimit": {
        "limit": 120,
        "remaining": 119,
        "reset": 42
      }
    }
  }
}
```

## La misma operación por REST

Esta herramienta ejecuta [`POST /api/v1/crm/opportunities`](https://docs.filmo.io/es/rest-api/endpoint-reference/crm/create-an-opportunity).

---

URL canónica: https://docs.filmo.io/es/mcp/tools/crm/filmo-crm-opportunities-create  
Última actualización: 2026-10-25