# Create Deal (`create_deal`)

Part of the [Outfield MCP Server](https://run.outfieldapp.com/docs/mcp) docs. All tools: [llms.txt](https://run.outfieldapp.com/docs/mcp/llms.txt). Server URL: https://run.outfieldapp.com/mcp

Creates a deal, optionally with one nested order (line items, one discount and one tax). Supports catalog products, kits and one-off line items.

Create a deal, optionally with a single nested order. Workflow: search_contacts for account_id (place or person) and optional lead_contact_id (person only); get_deal_options for deal_status_id, discount_id, tax_id, payment terms, and permissions; get_inventory for product_variant_price_id (use product_variant_price.id, not SKU); get_product_kits for product_variant_price_kit_id. Quantity on catalog line items is in cases when case_size is greater than 1. price_per_unit defaults to the catalog retail price; overriding it requires can_change_order_pricing. An order may have at most one discount and one tax; a line item may have at most one discount. Use existing discount_id/tax_id from get_deal_options, or inline fields when can_create_one_off_discounts is true. One-off line items (label only) require can_create_one_off_line_items. Creating in a reserving or fulfilling stage deducts inventory. When there is no order, pass amount as the deal value. Pass idempotency_key to prevent duplicate creates on retry. Zero-inventory and unintegrated-variant filters used in the web UI are not applied here. If the user names a team, call get_user_profile first and pass organization_id.

- Scopes: `ai:read`, `ai:write`
- Requires: AI, Deals, not available to Viewer users
- Example prompts: "Create a deal for Acme Grocery: 2 cases of Cold Brew on Net 30."

### Parameters

- `name` (string; optional): Deal name. Defaults to the account name when omitted
- `notes` (string; optional): Deal notes
- `amount` (number | null; optional): Deal amount when there is no order. Ignored when an order is provided because the total is calculated from line items
- `close_date` (string; optional): ISO8601 close date used for revenue attribution
- `account_id` (integer; optional): Account contact ID from search_contacts (place or person)
- `lead_contact_id` (integer; optional): Person contact ID from search_contacts
- `deal_status_id` (integer; optional): Pipeline stage ID from get_deal_options. Defaults to the first stage
- `user_id` (integer; optional): Deal owner user ID from search_users. Defaults to the calling user. Admins and managers can assign others
- `order` (object; optional)
  - `order_date` (string; optional): ISO8601 order date
  - `due_date` (string; optional): ISO8601 due date
  - `payment_term` (string; optional): Payment term from get_deal_options.payment_terms, or a custom term
  - `memo` (string; optional)
  - `notes` (string; optional)
  - `bill_to` (string; optional): Billing text. Defaults to the account address when omitted
  - `payment_instructions` (string; optional)
  - `line_items` (object[]; optional)
    - `product_variant_price_id` (integer; optional): ID from get_inventory product_variant_price.id
    - `product_variant_price_kit_id` (integer; optional): ID from get_product_kits
    - `label` (string; optional): Required for one-off line items with no catalog product
    - `quantity` (number; required): Quantity in cases when the product case_size is greater than 1
    - `price_per_unit` (number | null; optional): Defaults to catalog retail_price. Override requires can_change_order_pricing
    - `is_sample` (boolean; optional)
    - `discount` (object; optional)
      - `discount_id` (integer; optional): Existing discount ID from get_deal_options, including BOGO, kit, and quantity discounts
      - `label` (string; optional)
      - `discount_type` (string; optional): One-off line-item discounts must be percentage or fixed
      - `amount` (number | null; optional)
  - `discount` (object; optional)
    - `discount_id` (integer; optional): Existing order-level discount ID from get_deal_options
    - `label` (string; optional)
    - `discount_type` (string; optional)
    - `amount` (number | null; optional)
  - `tax` (object; optional)
    - `tax_id` (integer; optional): Existing tax ID from get_deal_options
    - `name` (string; optional)
    - `tax_type` (string; optional)
    - `rate` (number | null; optional)
    - `region` (string; optional)
- `idempotency_key` (string; optional): Client retry key; replays the original result for 24 hours
- `organization_id` (integer; optional): Organization ID from get_user_profile. Omit to use the current organization. If the user names a team, call get_user_profile first and pass that id.

### Notes

- Suggested workflow: search_contacts for account_id, get_deal_options for stage, discount, tax and terms, then get_inventory and get_product_kits for line items.
- Without an order, pass amount as the deal value. With an order, the total is calculated from its line items and amount is ignored.
- Overriding price_per_unit requires can_change_order_pricing. One-off line items require can_create_one_off_line_items. Inline discounts require can_create_one_off_discounts.
- Creating a deal in a reserving or fulfilling stage deducts inventory.
- An order may have at most one discount and one tax, and a line item at most one discount. Up to 200 line items.
- Zero-inventory and unintegrated-variant filters from the web UI are not applied.

### Example request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_deal",
    "arguments": {
      "account_id": 48213,
      "name": "Acme Grocery restock",
      "idempotency_key": "deal-acme-2026-09-29-1",
      "order": {
        "payment_term": "Net 30",
        "line_items": [
          {
            "product_variant_price_id": 5601,
            "quantity": 2
          }
        ],
        "discount": {
          "discount_id": 78
        },
        "tax": {
          "tax_id": 9
        }
      }
    }
  }
}
```

### Example response (`structuredContent`, illustrative data)

```json
{
  "id": 9031,
  "name": "Acme Grocery restock",
  "amount": 70.15,
  "amount_owed": 70.15,
  "notes": null,
  "close_date": "2026-09-29",
  "created_at": "2026-09-29T14:30:00-05:00",
  "updated_at": "2026-09-29T14:30:00-05:00",
  "status": "Proposal",
  "is_revenue": false,
  "user": "Jordan Rivera",
  "lead_contact": null,
  "orders": [
    {
      "order_number": "1042",
      "order_date": "2026-09-29",
      "due_date": "2026-10-29",
      "payment_term": "Net 30",
      "memo": null,
      "notes": null,
      "subtotal": 72.0,
      "is_reserved": true,
      "is_fulfilled": false,
      "line_items": [
        {
          "label": "Cold Brew 12oz",
          "quantity": 2,
          "price_per_unit": 36.0,
          "is_sample": false,
          "product_name": "Cold Brew",
          "variant_label": "12 oz can, 24 pack",
          "sku": "CB-12-BLK",
          "product_kit": null,
          "discounts": []
        }
      ],
      "discounts": [
        {
          "label": "Fall promo 10%",
          "amount": 10.0,
          "discount_type": "percentage",
          "bogo_buy_count": null,
          "bogo_get_count": null,
          "kit_max_count": null,
          "quantity_min_count": null,
          "multiply_by_line_item_quantity": null
        }
      ],
      "taxes": [
        {
          "name": "TX Sales Tax",
          "rate": 8.25
        }
      ],
      "id": 1042,
      "total": 70.15
    }
  ],
  "deal_status_id": 4,
  "user_id": 7311,
  "currency_unit": "$",
  "account": {
    "id": 48213,
    "name": "Acme Grocery"
  },
  "deduplicated": false,
  "warnings": []
}
```

### Response fields

- `id` (integer)
- `name` (string | null)
- `amount` (number)
- `amount_owed` (number | null)
- `notes` (string | null)
- `close_date` (string | null): ISO8601 date
- `created_at` (string | null): ISO8601 timestamp
- `updated_at` (string | null): ISO8601 timestamp
- `status` (string | null)
- `is_revenue` (boolean)
- `user` (string | null): Deal owner display name
- `lead_contact` (string | null)
- `orders` (object[])
  - `order_number` (string | null)
  - `order_date` (string | null): ISO8601 date
  - `due_date` (string | null): ISO8601 date
  - `payment_term` (string | null)
  - `memo` (string | null)
  - `notes` (string | null)
  - `subtotal` (number | null)
  - `is_reserved` (boolean | null)
  - `is_fulfilled` (boolean | null)
  - `line_items` (object[])
    - `label` (string | null)
    - `quantity` (number)
    - `price_per_unit` (number | null)
    - `is_sample` (boolean | null)
    - `product_name` (string | null)
    - `variant_label` (string | null)
    - `sku` (string | null)
    - `product_kit` (object | null)
      - `name` (string | null)
      - `description` (string | null)
      - `components` (object[])
        - `product_name` (string | null)
        - `variant_label` (string | null)
        - `sku` (string | null)
    - `discounts` (object[])
      - `label` (string | null)
      - `amount` (number | null)
      - `discount_type` (string | null)
      - `bogo_buy_count` (integer | null)
      - `bogo_get_count` (integer | null)
      - `kit_max_count` (integer | null)
      - `quantity_min_count` (integer | null)
      - `multiply_by_line_item_quantity` (boolean | null)
  - `discounts` (object[])
    - `label` (string | null)
    - `amount` (number | null)
    - `discount_type` (string | null)
    - `bogo_buy_count` (integer | null)
    - `bogo_get_count` (integer | null)
    - `kit_max_count` (integer | null)
    - `quantity_min_count` (integer | null)
    - `multiply_by_line_item_quantity` (boolean | null)
  - `taxes` (object[])
    - `name` (string | null)
    - `rate` (number | null)
  - `id` (integer | null)
  - `total` (number | null): Order total after discounts and taxes
- `deal_status_id` (integer | null)
- `user_id` (integer | null)
- `currency_unit` (string | null)
- `account` (object | null)
  - `id` (integer)
  - `name` (string | null)
- `deduplicated` (boolean)
- `warnings` (string[])

Related tools: [search_contacts](https://run.outfieldapp.com/docs/mcp/tools/search_contacts.md), [get_deal_options](https://run.outfieldapp.com/docs/mcp/tools/get_deal_options.md), [get_inventory](https://run.outfieldapp.com/docs/mcp/tools/get_inventory.md), [get_product_kits](https://run.outfieldapp.com/docs/mcp/tools/get_product_kits.md)
