---
title: Nue Price Builder
slug: nue-price-builder
createdAt: 2026-06-13T02:22:32.475Z
---

The **Nue Price Builder** (formerly the **Price Builder MCP**) is the orchestration layer behind [Price Builder AI](https://docs.nue.io/price-builder-ai) — the AI product that lets pricing teams design products, pricing rules, and bundles in natural language. The MCP exposes tools for creating and managing **products, pricing rules, bundles, and SKU config** — backed by Nue's Price Builder APIs.

:::hint{type="warning"}
**Prerequisites — Licenses and Permissions**

- **Price Builder AI license** is enabled on your tenant. This license is **available by default on every Nue tenant** — no separate purchase needed. See [Configure Nue AI](https://docs.nue.io/eX_7-configure).
- A **Nue API key** issued for the right environment (Sandbox or Production). The Nue user role tied to that key determines which plugins and products the MCP can read or modify. Provision with the least-privilege role appropriate to the agent's job.
- For Salesforce-side use of the Price Builder Chatbot in the Quote Line Editor, the user's role must have the **AI → Price Builder Chatbot** functional permission.
:::

## What it covers

The Nue Price Builder exposes a focused set of tools for **authoring, managing, testing, and deploying pricing plugins** — both **UI plugins** (browser-side, run in the Quote Line Editor) and **Pricing Engine plugins** (server-side, run during pricing calculation, including **Change Order** scope). It also exposes the active product catalog so the AI can resolve products by name without asking for SKUs.

Teams can define complex pricing logic — discount restrictions, product inclusion/exclusion logic, quantity auto-fills, ramp merging, header-scoped caps, change-order overrides — in natural language, and validate them in real time against the Salesforce quote environment.

For the AI-product walkthrough (chat, deploy, validate), see [Price Builder AI](https://docs.nue.io/price-builder-ai).

### Generate plugin code

| Tool                          | What it does                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `generateUIPlugin`            | Generate a **UI plugin** from a natural-language prompt. UI plugins run in the browser inside the Line Editor and respond to user field edits, lock fields read-only, validate input, show or clear messages, and adjust values before/after browser-side calculation. The generator picks the right UI trigger event automatically.                                                                                                                                                                                                                                                                              |
| `generatePricingEnginePlugin` | Generate a **Pricing Engine plugin** from a natural-language prompt. Pricing Engine plugins run server-side and silently modify pricing math — used for ramp manipulation, price-tag injection, final-value overrides, header-scoped logic, and change-order pricing. Requires `triggerEvent` (`BeforeCalculation` / `AfterCalculation` / `AfterRampGeneration` / `AfterEdit`) and optionally `pluginType` (`LineItem` / `HeaderObject` / `ChangeOrder`). `AfterEdit` is `LineItem`**-only** — it reacts to a field edit and is the event behind cascading a Line Attribute from a bundle parent to its children. |

### Persist plugins

| Tool                        | What it does                                                                                                                                                                                                                                                                         |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `createUIPlugin`            | Save a UI plugin record (defaults to inactive). Accepts user-provided code or code from `generateUIPlugin`.                                                                                                                                                                          |
| `createPricingEnginePlugin` | Save a Pricing Engine plugin record (defaults to inactive). Accepts user-provided code or code from `generatePricingEnginePlugin`.                                                                                                                                                   |
| `editPricingPlugin`         | Apply granular field updates to an existing plugin. Supports three operations: `preview` (show changes), `test-sandbox` (create a test copy), and `apply` (save the changes). Used for both minor code tweaks and metadata updates (name, description, trigger, scope, active flag). |

### List, view, and inspect

| Tool                       | What it does                                                                                                                                                        |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `listUIPlugins`            | List all UI plugins. Sorted active-first; supports filtering by `triggerEvent`.                                                                                     |
| `listPricingEnginePlugins` | List all Pricing Engine plugins. Sorted active-first; supports filtering by `triggerEvent`.                                                                         |
| `viewPricingPlugin`        | Retrieve a single plugin's metadata and code (works for both UI and Pricing Engine plugins).                                                                        |
| `listActiveProducts`       | Retrieve active products from the Nue product catalog — IDs, names, SKUs, pricing models, billing periods. Used by the AI to resolve product references in prompts. |

### Activate, deactivate, delete

| Tool                      | What it does                                                                                       |
| ------------------------- | -------------------------------------------------------------------------------------------------- |
| `activatePricingPlugin`   | Set `isActive = true` — makes the plugin live in the pricing system (UI or Pricing Engine).        |
| `deactivatePricingPlugin` | Set `isActive = false` — safely removes the plugin from the live pricing system.                   |
| `deletePricingPlugin`     | Permanently delete a plugin record. Only inactive plugins can be deleted. Action cannot be undone. |

### Test and validate

| Tool                     | What it does                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `validateJavaScript`     | Validate plugin code for syntax errors and normalize escaped characters before deployment.                                                                                                                                                                                                                                                                                           |
| `testPluginExecution`    | Execute a plugin against mock data and return the result. Supports UI plugins, Pricing Engine plugins, `AfterRampGeneration` (with `lineItem` and `rampItems` mock inputs) and `AfterEdit` (with `changedAttributes` and `previousLineItem` mock inputs — omit `changedAttributes` and the plugin correctly matches nothing, so the tool warns rather than reporting a silent pass). |
| `analyzePluginConflicts` | Check a proposed plugin against existing active plugins for trigger overlaps, field-update conflicts, and execution-order issues. Returns risk assessment and recommendations.                                                                                                                                                                                                       |

:::hint{type="info"}
**Deprecated tool aliases.** Several earlier tool names (`chatLineEditorPlugin`, `submitLineEditorPlugin`, `deployLineEditorPlugin`, `undeployLineEditorPlugin`, `deleteLineEditorPlugin`, `viewLineEditorPlugin`) are still callable but **deprecated** — they route to the new tools above. Use the new names in any new integrations.
:::

## Example: generate a Line Attribute cascade plugin

A common request is that a [Line Attribute](https://docs.nue.io/line-attributes) set on a bundle parent should be inherited by its children and nested children. That takes two plugins, because the editor and the API reach the pricing engine differently — ask for both:

**In the Quote Line Editor** (browser-side), call `generateUIPlugin`:

:::BlockQuote
Create a UI plugin so that when the PO Number field is updated on the parent bundle line, the value of its children line items and nested children line items is updated as well.
:::

**Everywhere else** — Transaction with AI, `updateQuote` / `updateOrder`, and Update Field on a subscription — call `generatePricingEnginePlugin` with `triggerEvent: "AfterEdit"` and `pluginType: "LineItem"`:

:::BlockQuote
Create a pricing engine plugin so that when the PO Number field is updated on the parent bundle line, the value of its children line items and nested children line items is updated as well.
:::

Two things the generator enforces, because both fail silently otherwise:

- **The field must be a member of the&#x20;**`PluginPriceCalculationFields`**&#x20;field set, per object.** That field set is what the engine builds `$$changedAttributes` from, and it also governs which fields a cascade may **write**. A field outside it is invisible on the read side and refused on the write side. Exposing it on Quote Line Item does not expose it on Order Product.
- **A request may name the edited line or any descendant.** Writing a field on the line that was just edited is supported — `$$lineChangeRequests` covers both. If the rep's edit and a request both write the same field in one run, the request wins.

Full behavior, working code and limitations: [Pricing Engine Plugins](https://docs.nue.io/pricing-engine-plugins).

## Connect to Nue Price Builder

Nue Price Builder is reachable **two ways**:

- **Its dedicated endpoint** (`price-builder.mcp.nue.io/mcp`) — a direct connection to just this server. **Recommended for Price Builder**, using a static `nue-api-key`.
- **The Nue MCP Gateway** (`mcp.nue.io/mcp`) — Price Builder is a built-in, default-on server, so its tools are **also** available through the single gateway connection (with per-user OAuth) alongside Nue Lifecycle Manager and Nue Docs. See [Connecting to Nue MCP](https://api-docs.nue.io/connecting-to-nue-mcp).

### Dedicated endpoint (recommended) — with a Nue API key

| Nue Environment | Price Builder endpoint                         |
| --------------- | ---------------------------------------------- |
| Nue Sandbox     | `https://price-builder.mcp.sandbox.nue.io/mcp` |
| Nue Production  | `https://price-builder.mcp.nue.io/mcp`         |

A static `nue-api-key` grants **role-based access** (whatever its Nue user role allows). Add the following to your `mcp.json`:

```json
{
  "mcpServers": {
    "price-builder-sandbox": {
      "type": "http",
      "url": "https://price-builder.mcp.sandbox.nue.io/mcp",
      "headers": {
        "nue-api-key": "YOUR_NUE_API_KEY"
      }
    },
    "price-builder-production": {
      "type": "http",
      "url": "https://price-builder.mcp.nue.io/mcp",
      "headers": {
        "nue-api-key": "YOUR_NUE_API_KEY"
      }
    }
  }
}
```

| Nue Environment | MCP Server Endpoint                            | Authentication |
| --------------- | ---------------------------------------------- | -------------- |
| Nue Sandbox     | `https://price-builder.mcp.sandbox.nue.io/mcp` | `nue-api-key`  |
| Nue Production  | `https://price-builder.mcp.nue.io/mcp`         | `nue-api-key`  |

Replace `YOUR_NUE_API_KEY` with your actual API key. Store it via environment variables in production rather than committing it to source control.

### Via the Nue MCP Gateway (OAuth)

Price Builder is on by default in the [Nue MCP Gateway](https://api-docs.nue.io/connecting-to-nue-mcp), so connecting once to `https://mcp.nue.io/mcp` (or `https://mcp.sandbox.nue.io/mcp`) with OAuth also gives you its tools — no separate setup.

Step-by-step client setup (Cursor, Windsurf, Claude Desktop) follows the same pattern as [Nue Lifecycle Manager](https://api-docs.nue.io/nue-lifecycle-manager) — only the server URL changes.

## Related

- [Connecting to Nue MCP](https://api-docs.nue.io/connecting-to-nue-mcp) — the recommended one-click, per-user way to connect this MCP from ChatGPT, Codex, Claude, Claude Code, and other clients.
- [Price Builder AI](https://docs.nue.io/price-builder-ai) — the AI product that uses this MCP from inside the Nue platform.
- [Nue MCP Servers Overview](https://api-docs.nue.io/nue-mcp-servers-overview) — the MCP protocol, the Nue MCP catalog, and the model-agnostic design.
