# Pricefx MCP

> Pricefx MCP Server gives your AI agent direct access to enterprise CPQ logic. Use it to find base SKUs, manage B2B customer records, and generate complex pricing quotes instantly via chat commands.

## Overview
- **Category:** erp-operations
- **Price:** Free
- **Tags:** cpq, pricing-optimization, margin-analysis, b2b-sales, quote-generation, dynamic-pricing

## Description

Listen, your agent gets direct access to enterprise CPQ logic with this server. You don't have to mess with structured JSON payloads or clunky API calls just to build a quote. This thing lets your AI client handle core pricing tasks—from checking product rules to building final quotes—all through simple chat commands.

### Product Intelligence and Catalog Checks

When you need to know what's available, the server gives you tools for deep catalog dives. To check specific products, run **`get_product`**. This pulls detailed information including its explicit cloud logging status and defined limits. If you gotta see every rule attached to your product line, use **`fetch_products`**; it lists out all structured rules in your catalog, exporting live active pricing data right away.

### Managing B2B Customer Accounts

You deal with accounts constantly, so the server gives you ways to manage those records. To get deep details on an existing account—the kind of info that drives current billing and pricing logic—your agent uses **`get_customer`**. If you need a comprehensive list of all bounded CRM records in Pricefx, you run **`fetch_customers`**. Need to spin up a brand new B2B profile? You use **`create_customer`** to build the record from scratch by generating and binding all necessary structured payloads. If an account already exists but needs tweaks, **`update_customer`** accepts bulk bounds and handles complicated plan math rules for you.

### Generating and Auditing Quotes (The CPQ Flow)

This is where the magic happens. To build a dynamic quote in real time using natural language commands, your agent kicks off the process with **`create_quote`**. This tool generates the full quote structure while verifying that every complex CPQ calculation is correct. If you need to check on an existing deal's progress, run **`fetch_quotes`** for a list of active or stalled quotes tied to the native Gateway authentication. You can also pull the complete history for any given quote ID using **`get_quote`**. And if that draft document turns out to be junk and you gotta wipe it clean, use **`delete_quote`** to permanently remove specific drafts after extracting all rich validation flags.

## Tools

### create_customer
Creates a new customer record by generating and binding the necessary structured payload.

### create_quote
Generates a dynamic quote structure, verifying that all complex CPQ calculations are correct.

### delete_quote
Permanently deletes specific draft quotes after extracting rich validation flags.

### fetch_customers
Retrieves a list of bounded CRM records stored in the Pricefx platform.

### fetch_products
Lists all structured rules attached to your catalog, exporting active pricing data.

### fetch_quotes
Identifies a list of active quotes that span the native Gateway authentication.

### get_customer
Extracts detailed properties for an account, driving current billing and pricing logic.

### get_product
Retrieves specific product details, including its explicit cloud logging and defined limits.

### get_quote
Runs an automated check to pull the full history of a given quote ID.

### update_customer
Updates existing customer records by accepting bulk bounds and mitigating specific plan math rules.

## Prompt Examples

**Prompt:** 
```
Can you fetch all our active Quotes and find any that are still in Draft status?
```

**Response:** 
```
Querying `fetch_quotes`. I found 35 recent quotes mapped in your partition. Exactly 4 of them are flagged as `DRAFT`. Quote IDs `Q-990` and `Q-991` belong to Customer 105, indicating stalled approvals in their pipeline.
```

**Prompt:** 
```
We need to create a new customer record manually. Give me the JSON for a generic B2B profile named `Acme Corp`.
```

**Response:** 
```
I've structured the payload and fired `create_customer`. The array injected `{"customerId": "ACM-001", "name": "Acme Corp", "status": "ACTIVE"}` mapping natively into the CPQ core. The partition confirms success, generating internal Pricefx node ID 8841.
```

**Prompt:** 
```
Look up product ID 'MX-Mouse-001'. Tell me its base price bracket before discounts.
```

**Response:** 
```
Using `get_product` to hit the Pricing Gateway natively. For `MX-Mouse-001`, the specific arrays return a base ceiling of `49.99 USD`. The explicit attribute tree dictates no hard floor restrictions for Tier-1 Accounts.
```

## Capabilities

### Check Product Pricing Rules
The server lets your agent look up base SKUs in the catalog and retrieve their explicit pricing limits using `get_product`.

### Manage Customer Accounts
Your AI client can read existing customer data (`fetch_customers`), update records (`update_customer`), or generate entirely new B2B profiles (`create_customer`).

### Generate and Validate Quotes
The agent builds dynamic quotes in real time using `create_quote`. It also checks the history of existing quotes with `get_quote`.

### Audit Quote Status
You can find out which quotes are active or stalled by running `fetch_quotes`, and you can permanently remove draft documents using `delete_quote`.

## Use Cases

### Handling an Urgent Deal Close
A sales engineer is negotiating with a major client. They need to know if their current pricing tier qualifies for a discount. Instead of pulling up the Pricefx dashboard, they ask their agent: 'What are the base price limits for Product X?' The agent runs `get_product` and instantly tells them the ceiling and any hard floor rules, keeping the momentum going.

### Onboarding a New Client
A pricing manager needs to set up a client profile before sending quotes. They use the agent to first check if the customer exists via `fetch_customers`. If not, they ask the AI to run `create_customer` and injects the required JSON payload automatically.

### Auditing Stalled Quotes
A finance team needs to find all quotes that were started last week but never moved past 'Draft.' They prompt the agent: 'Show me all drafts from the last seven days.' The agent runs `fetch_quotes`, isolates the draft records, and flags them for review.

### Updating a Client's Pricing Tier
The account team confirms a client's contract changed. Instead of manually updating multiple fields in the system, they ask their agent to run `update_customer` with the new parameters. The tool handles applying complex internal plan math and saving the changes.

## Benefits

- Stop waiting for dashboards. You can instantly check live Price Grids or simulate pricing logic by asking the agent to use `get_product` and `get_customer`, getting immediate answers without loading heavy partition views.
- Building a new quote used to require writing perfect JSON payloads. Now, just tell your AI client: 'Create a Quote for X.' The agent handles all the structure needed to call `create_quote` correctly.
- Need to clean up drafts? Instead of navigating complex menus, ask your agent to run `delete_quote`. It obliterates draft quotes matching specific constraints from your partition instantly.
- When you need account data, don't pull it manually. Use `fetch_customers` or `get_customer` through the chat interface. You get the exact properties needed for CPQ without leaving the conversation window.
- If a quote fails approval and you need to know why, running `get_quote` gives you the full history trace—all in one prompt, not across multiple tabs.

## How It Works

The bottom line is, you talk to your AI client like a human talking to a sales rep; it handles the complex API calls underneath.

1. Subscribe to the MCP server, then provide your Pricefx Cluster, Partition Name, and active JWT Token.
2. Engage your AI client (Claude, Cursor, etc.) with a natural language prompt: 'Create quote for X using product Y.'
3. The agent automatically runs the necessary sequence of tools (`create_customer` -> `fetch_products` -> `create_quote`) and returns the result.

## Frequently Asked Questions

**How do I use create_quote to build a pricing document?**
Just ask your AI client: 'Create a new quote for customer ABC with product XYZ.' The agent automatically gathers the necessary IDs and runs `create_quote`, generating the full structured quote.

**Can I find out why my old quote failed validation using get_quote?**
Yes. You provide the Quote ID, and the tool executes `get_quote`. It returns the automated validation check history, letting you see exactly what caused the failure.

**What's the difference between fetch_customers and get_customer?**
Use `fetch_customers` when you need a list of many accounts (like 'Show me all active customers'). Use `get_customer` when you already know an ID and just need to pull specific properties for that single account.

**How do I delete a draft quote using delete_quote?**
You ask your agent to run `delete_quote`. You provide the necessary constraints (like matching IDs or dates), and it irreversibly vaporizes the specified drafts from your partition.

**When using `create_customer`, what format should I use to ensure the JSON payload is robust?**
You must provide a fully structured JSON payload. The system requires specific keys (like customer ID and status) to provision hard bindings correctly. Sending malformed data will fail before reaching the CPQ core.

**If I need to check every product rule, how do I use `fetch_products`?**
`fetch_products` enumerates all attached structured rules and exports the active pricing catalog. This tool gives you a comprehensive list of SKUs available across your partition's scope.

**How can I check a single product’s price limits using `get_product`?**
`get_product` retrieves specific cloud logging data for one item. This function tells you the exact base ceiling and floor restrictions for a particular SKU, without needing to list every related rule.

**What are the best practices for using `update_customer`?**
Always verify that your incoming data matches existing array structures. The tool requires strictly formatted bounds; otherwise, it won't mitigate specific Plan Math changes and will reject the update.

**Can the AI automatically assemble the correct JSON format for creating quotes?**
Yes, perfectly. By calling `create_quote`, you simply tell the AI: "Make a quote for customer 105 for product XYZ". It understands Pricefx schemas and writes the robust JSON mapping necessary to fulfill the API logic.

**Does the server handle Pricefx partitioned clusters natively?**
Yes. Pricefx securely isolates environments based on `Cluster` (e.g., `eu1`, `us1`) and `Partition` names. Our server intrinsically limits the AI to operate strictly within the bounds you configure.

**If a quote creation fails due to business rules, will the AI tell me why?**
Absolutely. If the CPU logic returns a rejection—like a discount violating a minimum margin—the AI extracts the raw API traceback identifying the specific pricing constraint that halted generation.