AI assistants

Use an AI assistant with Dynamic Pricing in two ways. Build rules in any AI chat and import them, or connect an AI app to your store.

Build rules in any AI chat

↑ Back to top
  1. Go to WooCommerce › Dynamic Pricing and choose Import on the Rules tab.
  2. Under Build rules with AI, choose Copy prompt, or Download prompt to save it as a file.
  3. Paste the prompt into any AI chat, followed by the rules you want. For example: “10% off orders of $200 or more.”
  4. Download the file dynamic-pricing-rules.json from the answer. When the answer holds one JSON code block in its place, save that block as dynamic-pricing-rules.json. Read the assumptions the assistant lists, one line each.
  5. In Import rules, choose the file under Rules file.
  6. Choose Add after the current rules. This keeps the rules you have. The other choice, Replace the current rules, is selected when the window opens.
  7. Read the preview, then choose Import.

The Import rules dialog with the Build rules with AI steps.

When the file has fields to fix, choose Copy errors, paste them into the same chat and save the corrected file.

The prompt explains how rules work and lists the names and IDs of your categories, brands, tags, user roles and products, up to 200 products. Your rules stay in your store.

Connect an AI app to your store

↑ Back to top

A connected app reads and changes your rules for you. It uses the WordPress Abilities API through the MCP Adapter plugin.

You need

↑ Back to top
  • A store served over HTTPS.
  • An AI app on your computer that supports MCP servers.
  • Node.js on the same computer.
  • A WordPress user who can manage Dynamic Pricing, such as a Shop manager.

Set it up

↑ Back to top
  1. Go to Plugins › Add New Plugin, then install and activate MCP Adapter.
  2. Go to Users and edit the user the app signs in as. Under Application Passwords, enter a name, choose Add New Application Password and copy the password.
  3. Add the server below to your app’s MCP settings. Replace the address with your store’s, the username with that user’s username and the password with the one you copied.
  4. Restart the app and ask: “List my Dynamic Pricing rules.”
{
  "mcpServers": {
    "my-store": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://example.com/wp-json/mcp/mcp-adapter-default-server",
        "WP_API_USERNAME": "your-username",
        "WP_API_PASSWORD": "your application password"
      }
    }
  }
}

WooCommerce’s MCP documentation covers more ways to connect. To disconnect an app, revoke its application password.

What to ask

↑ Back to top
  • “List my pricing rules.”
  • “Which rules did the update convert from version 3, and what warnings do they have?”
  • “What does a wholesale customer pay for 10 of this product, and which rules set that price?”

What the app can do

↑ Back to top

Each ability name starts with woocommerce-dynamic-pricing/.

The assistant canAbility
Read the rules and a product’s rules, including the rules the update converted and their warningslist-pricing-rules
Check the price a shopper pays, with the rules behind itexplain-price, get-pricing-adjustments
Look up the IDs of categories, brands, tags, roles, membership plans, groups and productsget-pricing-lookups
Price a sample cart for a shopper, on a date you chooseprice-cart
Add, update, delete and move a ruleadd-pricing-rule, update-pricing-rule, delete-pricing-rule, move-pricing-rule
Add, update, delete and move a groupadd-pricing-rule-group, update-pricing-rule-group, delete-pricing-rule-group, move-pricing-rule-group
Replace a product’s own rulessave-product-pricing-rules

Stay in control

↑ Back to top
  • Dry run. The assistant can try a change first. A dry run shows the result and saves nothing.
  • Approval. Turn on tool approval in your AI app to confirm each change yourself.
  • Read only. The filter wc_dynamic_pricing_write_abilities_enabled turns off the abilities that save rules. The filter wc_dynamic_pricing_abilities_enabled turns off every ability.
Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.