Graphrt

WooCommerce

Products, variations, orders, customers, product updates and on-hold status agent opt-in (no prices, stock, completion, cancels or refunds), refunds node only

Beta v0.1.0 Node.js 12 actions
Use in Graphrt Desktop

About

A Graphrt plugin for the WooCommerce REST API v3 of one store: products and variations, orders, customers and refunds. It is built with the declarative REST layer (definition.mjs) plus small agent-safety wrappers in lib/.

What it can do

  • Products: list_products, get_product, list_product_variations, update_product
  • Orders: list_orders, get_order, update_order_status, list_order_refunds, create_refund (node only)
  • Customers: list_customers, get_customer
  • api_request: any other endpoint under /wp-json/wc/v3 (agents: GET and allowlisted paths only), e.g. /reports/sales or /coupons

Actions

Each action is a step you can add to a workflow. Agents can also use most of them as tools.

  • List products woocommerce.list_products
  • Get product woocommerce.get_product
  • List product variations woocommerce.list_product_variations
  • Update product woocommerce.update_product
  • List orders woocommerce.list_orders
  • Get order woocommerce.get_order
  • Update order status woocommerce.update_order_status
  • List order refunds woocommerce.list_order_refunds
  • Create refund woocommerce.create_refund
  • List customers woocommerce.list_customers
Show all 12 actions
  • Get customer woocommerce.get_customer
  • WooCommerce REST API request woocommerce.api_request

Settings

Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.

  • WOOCOMMERCE_SITE_URL Required
    The store's https URL, e.g. https://shop.example.com (a WordPress subdirectory like https://example.com/store works). http is refused
  • WOOCOMMERCE_CONSUMER_KEY Required
    REST API consumer key (ck_...)
  • WOOCOMMERCE_CONSUMER_SECRET Required
    REST API consumer secret (cs_...), sent with the key as Basic auth
  • WOOCOMMERCE_TOOL_ALLOW_PRODUCTS Optional
    1 lets agent tools update products (not prices or stock)
  • WOOCOMMERCE_TOOL_ALLOW_ORDER_STATUS Optional
    1 lets agent tools put an order on hold (on-hold only)
  • WOOCOMMERCE_TOOL_API_EXTRA_PATHS Optional
    More GET paths agents may reach with api_request, comma-separated, * = one segment

How to use it

In Graphrt Desktop

  1. Open Plugins and search for WooCommerce.
  2. Click Install and approve it.
  3. Follow the setup steps on the plugin's page, then paste the settings it needs.
  4. Describe a job that needs it, and the builder adds the steps.
Plugins in Graphrt Desktop

With the CLI

terminal
$ graphrt plugin install woocommerce
workflow.yaml
- id: complete
  type: woocommerce.update_order_status
  order_id: "{{#start.order_id#}}"
  status: completed
- id: refund
  type: woocommerce.create_refund
  order_id: "{{#start.order_id#}}"
  amount: "25.00"
  reason: Damaged in transit
Plugins in the docs