Report the customer base by RFM segment
Computes an RFM (Recency / Frequency / Monetary) segmentation over the whole customer base and returns the per-bucket population plus the individual customer rows. Reach for this to answer ‘who should I target’ or ‘how healthy is the base’; use listCustomers when you just need the directory. Buckets: champions (recent, frequent, high value), loyal, at_risk (was good, has gone quiet), new (never purchased) and lost. The optional segment / tier / minMonetaryCents facets are the saved-segment predicate: they narrow the returned customers rows ONLY — total and counts always describe the whole base, so a bucket keeps its true size. monetaryCents is integer cents; recencyDays is null for a customer who never bought. Feed the same facets to createCampaign to target this audience. Note each row carries the customer’s raw email/phone, so this returns contact details for the whole base — narrow it with the facets rather than pulling everything.
Authorizations
Authorization: Bearer <token>. Accepts EITHER a Keycloak access token (scopes-in-token) OR an opaque POS session token; both resolve to the same pos.* scope vocabulary the route guards enforce.
Query Parameters
champions, loyal, at_risk, new, lost 10 <= x <= 9007199254740991
