AI Connect tools
Every tool an AI assistant can use through AI Connect, which permission switch each one needs, the guided tasks, example requests, and how to call the same tools from WP-CLI or the REST API.
These are the tools a connected assistant can use. You don’t call them yourself: you ask in plain language, and the assistant picks the tools. This page tells you what it can reach, and which switch on Settings → AI Connect each tool needs. Setup and permissions are on the AI Connect page.
Every tool is named b2b-suite/…. In MCP apps the / shows as -, so b2b-suite/list-groups appears as b2b-suite-list-groups.
Each tool is one of four kinds:
| Kind | Needs | Notes |
|---|---|---|
| Read | AI Connect on | Looks things up. Changes nothing. |
| Write | Make changes on | Previewed and confirmed first, then logged. |
| Destructive | Make changes and Also trash and reject on | Same as writes. Trashed items can be restored for 30 days. |
| Guided task | AI Connect on, Pro | A ready-made, step-by-step task you start from your AI app. |
Things to ask
A few requests that work well, to get started:
- “Give me an overview of my B2B store.”
- “What does jane@acme.com pay for 10 of SKU ESP-1KG?”
- “Why is this customer getting that price?”
- “List the pending trade applications and approve the ones from .co.uk addresses into Wholesale.”
- “Add a Gold group with 15% off the Coffee category, and show me what it does before you create it.”
- “What would a 20% discount on the whole shop do to my best-selling products?”
- “Who owes us money, and who is on credit hold?” (Pro)
- “Which quotes are waiting for me? Offer the Acme one at 10% under list.” (Pro)
- “What did you change yesterday?”
Store and settings
| Tool | Kind | What it does |
|---|---|---|
store-overview |
Read | A summary of how the store runs B2B: whether guests see prices, how many groups, price rules, B2B customers and pending applications there are, which features are on, what the assistant may do, and the installed versions. Assistants call this first. |
get-settings |
Read | Reads the B2B Suite settings, each with its type: price visibility, registration and approval, price display, the bulk order form, invoices, integrations. Secrets such as CAPTCHA keys are never included. |
update-settings |
Write | Changes settings. AI Connect’s own switches, data-removal options, CRM and CAPTCHA settings can’t be changed this way. |
list-ability-log |
Read | The AI activity log, newest first, so the assistant can answer “what did you change?”. Personal details in logged inputs are masked unless Share customer details is on. |
Customer groups
| Tool | Kind | What it does |
|---|---|---|
list-groups |
Read | The customer groups (wholesale tiers), with how many customers and price rules each has. Can include trashed groups. |
get-group |
Read | One group: its settings, how many customers it has (and the first few), and all of its price rules. |
create-group |
Write | Creates a group, such as “Gold”. It starts with no customers and no rules. |
update-group |
Write | Changes a group’s name, description, or whether coupons are allowed. Its customers and rules are untouched. |
trash-group |
Destructive | Moves a group to the Trash. Its customers go back to retail prices straight away, and its price rules go to the Trash with it. |
restore-group |
Write | Brings a trashed group back, with the customers and rules its trash took. Customers who have joined another group since stay where they are. |
Price rules
| Tool | Kind | What it does |
|---|---|---|
list-price-rules |
Read | Price rules, highest priority first. Filter by group, by target (whole shop, category, tag, product or one customer) or by active/paused. Can include trashed rules. |
preview-price-rule |
Read | What a rule would do, without creating it: how many products it reaches, and before → after prices for a sample. Good for “what if” questions. |
create-price-rules |
Write | Creates up to 50 rules at once: percent off, amount off or a fixed price, on the whole shop, a category, a tag, a product or one customer, optionally within a quantity range. The assistant can name the target (a SKU, product name, category or customer email) instead of knowing its id. If any rule is invalid, none is created. |
update-price-rule |
Write | Changes one rule. Only the fields given change. Pausing and resuming a rule is a change to its “active” field. |
trash-price-rule |
Destructive | Moves a rule to the Trash. Prices it set go back to normal straight away. |
restore-price-rule |
Write | Brings a trashed rule back. A rule whose group is in the Trash comes back with restore-group instead. |
resolve-price |
Read | The price a customer pays for a product at a quantity, through the same pricing engine as the shop and checkout, with a plain-words explanation of which rule decided it. Leave the customer out for the retail price. |
When several rules match a product, the most specific one wins: a customer rule, then product, then category or tag, then the whole shop. preview-price-rule looks at one rule alone. resolve-price gives what the shopper will actually pay with every rule in play.
Customers and registrations
| Tool | Kind | What it does |
|---|---|---|
find-customers |
Read | Searches B2B customers by name, email or login, optionally within one group: group, company, order count and spend. |
get-customer |
Read | One customer or applicant, by user id or email: group, registration status, company, order count and spend. |
assign-customer-group |
Write | Moves up to 50 customers into a group, or back to retail prices. Their prices change straight away. Staff accounts are refused. |
list-registrations |
Read | Trade-account applications by status (pending, approved or rejected), newest first. |
approve-registration |
Write | Approves up to 50 pending applications into a group (your default group for new applicants if none is given). Each customer gets the approval email and trade prices straight away. |
reject-registration |
Destructive | Rejects up to 50 pending applications, with an optional reason the applicant sees in the rejection email. They keep a normal retail account. |
Email addresses, registration answers and business details are only returned while Share customer details is on. Without it, searching by an email still works. It only tells the assistant whether that address belongs to a customer.
Company accounts (Pro)
| Tool | Kind | What it does |
|---|---|---|
list-companies |
Read | Company accounts by name, optionally searched or within one group: member count and the group each prices with. |
get-company |
Read | One company: its group, members and their roles (admin, approver, buyer) with any spending limits, its credit, and how many quotes are open. |
add-company-member |
Write | Adds an existing customer to a company as an admin, approver or buyer. They switch to the company’s prices straight away. A customer can belong to one company only. |
remove-company-member |
Destructive | Takes a member out of a company. They go back to their own pricing straight away. |
VAT numbers, members’ emails and billing details are only returned while Share customer details is on.
Quotes (Pro)
| Tool | Kind | What it does |
|---|---|---|
list-quotes |
Read | Quote requests, newest first, by status (submitted, in review, offered, accepted, declined, expired) or for one company. |
get-quote |
Read | One quote with every line: product, quantity, the buyer’s requested price and the price offered, totals and the offer’s expiry. The conversation is included only while Share customer details is on. |
offer-quote |
Write | Sends the buyer your prices: a unit price per line, how many days the offer stays open, and an optional message. The buyer is emailed and can accept it as an order. The preview shows each line’s requested → offered price and the new total. |
add-quote-message |
Write | Posts a message from the shop on the quote’s conversation. The buyer is emailed. The assistant shows you the exact wording first. |
decline-quote |
Destructive | Declines a quote, with an optional message. The buyer is told. A declined quote is closed for good. |
Net terms and credit (Pro)
| Tool | Kind | What it does |
|---|---|---|
credit-overview |
Read | Every company on net terms: credit limit, balance, what they can still spend, open invoices, and whether they are overdue or on credit hold. Can show only overdue or on-hold accounts. |
get-credit-account |
Read | One company’s account: limit, balance, available credit, each unpaid invoice with its due date, and the latest ledger entries. |
set-credit-terms |
Write | Sets a company’s credit limit and payment terms (days). Opens a credit account if it has none. A limit below what they owe stops new orders on terms until they pay. |
record-credit-payment |
Destructive | Records a payment against the balance (a bank transfer, a cheque), optionally against one order. It can lift a credit hold. The ledger can’t be edited afterwards. |
adjust-credit |
Destructive | Corrects the balance up or down, with a required note saying why. The ledger can’t be edited afterwards. |
Ledger entries are permanent by design, so a mistaken payment is corrected with an adjustment, not deleted. That is why payments and adjustments sit behind Also trash and reject.
Guided tasks
Guided tasks (MCP “prompts”) are ready-made tasks you start from your AI app instead of typing the request. They come with Pro. In Claude Desktop, find them under the + menu next to the message box, under the B2B Suite connection. In Claude Code, type / and pick the b2b entries.
Set up a wholesale tier
setup-wholesale-tier creates a customer group with a discount and moves customers into it, step by step. Everything is previewed and confirmed with you before it changes, so it needs Make changes on.
| Field | Example |
|---|---|
| Tier name | Gold |
| Discount percent | 15 |
| Applies to (optional) | The whole shop, or a category name |
| Customers (optional) | Emails or names, comma-separated |
Weekly B2B digest
weekly-b2b-digest is a short summary of what needs your attention: quotes waiting for you, overdue credit, and new trade applications. It only reads, so it works with changes off.
For developers
The tools are standard WordPress abilities, so the same tools, with the same switches, previews and log, are reachable three ways.
MCP. B2B Suite registers its own MCP server, b2b-suite, at /wp-json/b2b-suite/mcp, which lists every tool and guided task directly. The MCP Adapter’s default server only shows a few generic tools.
WP-CLI.
wp smb2b ability list # table, json, or md
wp smb2b ability run list-groups --user=admin
wp smb2b ability run create-group --input='{"name":"Gold"}' --dry-run --user=admin
wp smb2b ability run create-group --input='{"name":"Gold"}' --confirm=<token> --user=admin
--dry-run previews a write and prints its confirmation token. Pass the token back with --confirm to apply it.
REST. Through the WordPress Abilities API, with an application password:
GET /wp-json/wp-abilities/v1/abilities?category=b2b-suite
GET /wp-json/wp-abilities/v1/abilities/b2b-suite/list-groups/run?input[per_page]=20
POST /wp-json/wp-abilities/v1/abilities/b2b-suite/create-group/run
{"input": {"name": "Gold", "dry_run": true}}
Read tools run with GET and take their input as an input query parameter. Writes, including the destructive ones, run with POST and a JSON body.
Writes. Every write takes dry_run and confirm_token. Call it with dry_run: true, show the result, then call it again with the same input and the confirm_token the preview returned. The token is bound to the user, the exact input and the current state of the data, and expires after 10 minutes.
Permissions. Every tool needs the smb2b_use_abilities capability. The AI Agent role (b2b_ai_agent) has it, and so does anyone who can manage WooCommerce.
Extending. Add your own tools, lock switches, or react to every applied change with the AI Connect hooks.
Was this page missing something?
Documentation gaps are treated as bugs here.Tell us →