Zopping

Customer segments & targeting

Group customers and target promotions, offers and campaigns at them. The advanced companion to Manage customers.

Two ways to group

  • Static tags — you assign them (e.g. vip, wholesale) via customer tags. Good for groups you curate.
  • Dynamic segments — rule-based, evaluated by the platform (e.g. "new customers", "haven't shopped since a date"). Good for behavioural targeting.

List available segments

curl "https://zopping.com/api/promo-service/segment?organizationId=<org-id>" \
  -H "Authorization: Bearer $ZOPPING_TOKEN"

Segments expose a name and any variables they take, e.g.:

{
  "segment": [
    {
      "name": "NewCustomers",
      "variables": {}
    },
    {
      "name": "CustomersNotShoppedSinceDate",
      "variables": {
        "date": "string"
      }
    }
  ]
}

Check eligibility

Is a customer in a segment right now?

curl "https://zopping.com/api/promo-service/segment/NewCustomers/customer-eligibility/7781?organizationId=<org-id>" \
  -H "Authorization: Bearer $ZOPPING_TOKEN"

Target an offer or coupon

Both offers and coupons take a userSet that restricts them to one or more segments (with variables). Attach it when you create the promotion:

"userSet": {
  "segments": [
    { "name": "NewCustomers", "variables": {} },
    { "name": "HighSpenders", "variables": { "minOrderValue": "5000" } }
  ]
}

See Offer engine and Run promotions.

Campaigns

A campaign (promo-service/campaign) ties offers/coupons to segments and schedules outreach (email/push), reporting totalTargeted / totalSuccess:

curl -X POST https://zopping.com/api/promo-service/campaign \
  -H "Authorization: Bearer $ZOPPING_TOKEN" -H "Content-Type: application/json" \
  -d '{
    "organizationId": "<org-id>", "name": "Summer Sale", "status": "ACTIVE",
    "scheduledTime": "2026-07-01 00:00:00",
    "userSet": { "segments": [ { "name": "NewCustomers", "variables": {} } ] }
  }'

Reference: Promotions · Customers.