Docs RFM Customer Segments

Pro: REST API and WP-CLI

All routes need a user who can manage WooCommerce, for example with an application password.

RouteDoes
GET /wp-json/wfcs/v1/segmentsReady and custom segments with counts.
GET /wp-json/wfcs/v1/customersThe same filters as the screen, plus email, page, per_page, orderby, order.
POST /wp-json/wfcs/v1/recalculateStarts a run.

wp wfcs status, wp wfcs recalculate --wait, wp wfcs segments --format=csv, wp wfcs customers --segment=at_risk --format=csv