p202 ltv customers

List customers with LTV rollups, or show one customer in full (CRM, aliases, custom fields, recent revenue)

All commands

01Run it

Straight from the command's own help.

p202 ltv customers --search acme --segment repeat
p202 ltv customers --cf plan=pro --cf score.min=50 --all
p202 ltv customers 42

02What you get

Captured from the real binary, run against a demo store with 30 days of traffic. Switch tabs to see the same run as JSON, the shape scripts and agents parse.

p202 ltv customers
$ p202 ltv customers
status  active_subscription_count  city  company  country  customer_id  email                          first_click_id  first_name  first_seen_time  last_activity_time  last_name  mrr       order_count  primary_ref  refunded_amount  region  total_revenue
------  -------------------------  ----  -------  -------  -----------  -----------------------------  --------------  ----------  ---------------  ------------------  ---------  --------  -----------  -----------  ---------------  ------  -------------
active  0                                                  111          [email protected]     2800            Diego       1789733060       1789733060          Vance      0         1            cust-1111    0                        636
active  0                                                  18           [email protected]       548             Lena        1791356492       1791356492          Grant      0         1            cust-1018    0                        607
active  1                                                  115          [email protected]    2871            Mason       1791243739       1791243739          Morgan     49        1            cust-1115    0                        588
active  1                                                  83           [email protected]     1996            Mateo       1790547397       1790547397          Morgan     49        1            cust-1083    0                        588
active  1                                                  67           [email protected]       1597            Zoe         1790184516       1790184516          Okafor     49        1            cust-1067    0                        588
active  1                                                  10           [email protected]     295             Felix       1790777698       1790777698          Jensen     49        1            cust-1010    0                        588
active  0                                                  78           [email protected]       1869            Lena        1790480065       1790480065          Quinn      0         1            cust-1078    0                        577
active  0                                                  20           [email protected]     600             Grace       1789064541       1789064541          Foster     0         1            cust-1020    0                        548
active  0                                                  68           [email protected]     1611            Lena        1790276733       1790276733          Bennett    0         1            cust-1068    0                        518
active  0                                                  1            [email protected]       3               Kenji       1790595724       1790854924          Vance      0         1            cust-1001    59                       518
active  1                                                  89           [email protected]      2149            Rhys        1789500439       1789500439          Carter     29        1            cust-1089    0                        348
active  1                                                  55           [email protected]        1294            Zoe         1790423437       1790423437          Patel      29        1            cust-1055    0                        348
active  1                                                  46           [email protected]     1101            Grace       1791539206       1791539206          Foster     29        1            cust-1046    0                        348
active  1                                                  22           [email protected]  677             Elias       1789416983       1789416983          Lindqvist  29        1            cust-1022    0                        348
active  1                                                  11           [email protected]       364             Lena        1790768967       1790768967          Reyes      29        1            cust-1011    0                        348
active  1                                                  4            [email protected]        85              Elias       1791303994       1791303994          Diaz       29        1            cust-1004    0                        348
active  0                                                  31           [email protected]     801             Clara       1790089761       1790841089          Foster     0         2            cust-1031    0                        286
active  0                                                  21           [email protected]        627             Ivy         1789902011       1790100430          Hayes      0         2            cust-1021    0                        276
active  0                                                  2            [email protected]       15              Grace       1790626426       1790921878          Quinn      0         2            cust-1002    0                        252
active  0                                                  79           [email protected]    1887            Kenji       1791065921       1791065921          Bennett    0         1            cust-1079    0                        242
active  0                                                  13           [email protected]      421             Ethan       1789767743       1790353372          Grant      0         2            cust-1013    0                        242
active  0                                                  44           [email protected]       1042            Isla        1790174263       1790174263          Quinn      0         1            cust-1044    0                        232
active  0                                                  7            [email protected]       176             Silas       1790715099       1790715099          Walsh      0         1            cust-1007    0                        225
active  0                                                  19           [email protected]       569             Nora        1791231148       1791231148          Walsh      0         1            cust-1019    0                        214
active  0                                                  66           [email protected]     1544            Mateo       1790674883       1790674883          Jensen     0         1            cust-1066    0                        198
active  0                                                  72           [email protected]     1673            Grace       1791357768       1791539176          Moreau     0         2            cust-1072    0                        180
active  0                                                  65           [email protected]      1470            Arlo        1789770031       1789770031          Moreau     0         1            cust-1065    0                        175
active  0                                                  49           [email protected]     1145            Mateo       1790432452       1790432452          Tanaka     0         1            cust-1049    0                        175
active  0                                                  24           [email protected]    705             Hugo        1791296228       1791539176          Kowalski   0         2            cust-1024    0                        175
active  0                                                  36           [email protected]      895             Diego       1789159933       1789159933          Quinn      0         1            cust-1036    0                        174
active  0                                                  98           [email protected]       2522            Rhys        1789044827       1789268422          Zhang      0         2            cust-1098    0                        171
active  0                                                  86           [email protected]     2107            Miles       1789575919       1789575919          Jensen     0         1            cust-1086    0                        164
active  0                                                  35           [email protected]  862             Diego       1791377586       1791539176          Underwood  0         2            cust-1035    0                        164
active  0                                                  96           [email protected]      2336            Omar        1791219616       1791219616          Morgan     0         1            cust-1096    0                        156
active  0                                                  110          [email protected]      2756            Arlo        1790097838       1790776628          Reyes      0         2            cust-1110    0                        150
active  0                                                  82           [email protected]      1951            Lucas       1791149199       1791539176          Grant      0         2            cust-1082    0                        150
active  0                                                  76           [email protected]    1782            Hazel       1789130506       1789130506          Bennett    0         1            cust-1076    0                        150
active  0                                                  43           [email protected]     1041            Hazel       1791022077       1791022077          Morgan     0         1            cust-1043    0                        150
active  0                                                  39           [email protected]      962             Lena        1788952578       1789644838          Moreau     0         2            cust-1039    0                        150
active  0                                                  73           [email protected]       1726            June        1789051454       1789051454          Hayes      0         1            cust-1073    0                        146
active  0                                                  61           [email protected]      1397            Hazel       1789330864       1789330864          Vance      0         1            cust-1061    0                        146
active  0                                                  109          [email protected]      2711            June        1789215886       1789215886          Reyes      0         1            cust-1109    0                        141
active  0                                                  74           [email protected]     1748            Chloe       1790639259       1790639259          Haddad     0         1            cust-1074    0                        130
active  0                                                  62           [email protected]       1446            Ruby        1789466643       1789466643          Vance      0         1            cust-1062    0                        130
active  0                                                  29           [email protected]       747             Felix       1790726688       1791539176          Diaz       0         2            cust-1029    0                        126
active  0                                                  99           [email protected]       2528            Leo         1790716612       1790716612          Haddad     0         1            cust-1099    0                        125
active  0                                                  52           [email protected]       1187            Arlo        1790809126       1790809126          Grant      0         1            cust-1052    0                        125
active  0                                                  51           [email protected]      1182            Isla        1789418375       1789418375          Foster     0         1            cust-1051    0                        125
active  0                                                  71           [email protected]       1651            Ava         1790817267       1791314745          Morgan     0         2            cust-1071    0                        120
active  0                                                  92           [email protected]     2169            Elias       1791143047       1791539176          Keller     0         2            cust-1092    0                        102
Total: 115 | Limit: 50 | Offset: 0
Warning: Showing 50 of 115 results. Use --all to fetch all.
Real output · p202 1.9.77 · demo dataexit 0

03Build your command

Pick values and the command line writes itself, quoted and ready to paste.

p202 ltv customers

Set flags below; the command updates as you type.

04Flags

11 flags, plus the global flags every command takes.

FlagWhat it does
--allboolFetch every page (500 rows a request)
--cfstringArrayOnly customers whose custom field matches: key=value, or key.min=value / key.max=value for a number or date field (repeatable, at most 3; p202 ltv fields list shows the keys)
--dirstringSort direction: ASC, DESC
ASCDESC
--limit, -lstringRows per page (max 500)
--offset, -ostringPagination offset
--period, -pstringPeriod: today, yesterday, last7, last14, last30, last90, thismonth, lastmonth, thisyear, lastyear, alltime
todayyesterdaylast7last14last30last90thismonthlastmonththisyearlastyearalltime
--segmentstringOnly this segment (repeat: 2+ orders; subscribers: an active subscription; at_risk: a past_due subscription): repeat, subscribers, at_risk
repeatsubscribersat_risk
--sort, -sstringSort: total_revenue, order_count, last_activity_time, first_seen_time, mrr
total_revenueorder_countlast_activity_timefirst_seen_timemrr
--time-fromstringAcquisition window start: unix seconds, a date (2026-10-01, from its first second in the account's timezone) or a time with its offset (2026-10-01T09:30:00Z)
--time-tostringAcquisition window end, inclusive: unix seconds, a date (2026-10-01, through its last second in the account's timezone) or a time with its offset

05How it works

List customers with their LTV rollups, newest-valued first, or show one in full.

p202 ltv customers --search acme --segment repeat
p202 ltv customers --cf plan=pro --cf score.min=50 --all
p202 ltv customers 42

--search matches the customer reference, email, company or name. --cf filters by custom field: key=value, or key.min/key.max for number and date fields (at most 3). Writes are p202 ltv customer (upsert, update, merge, erase, alias).

06For agents

Running this from an agent

  • Read the same facts as JSON: p202 commands ltv customers --json.
  • With AI_AGENT, CLAUDECODE or another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with a hint.
  • Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
p202 commands ltv customers --json
{
  "path": "p202 ltv customers",
  "use": "customers [id]",
  "short": "List customers with LTV rollups, or show one customer in full (CRM, aliases, custom fields, recent revenue)",
  "long": "List customers with their LTV rollups, newest-valued first, or show one in full.\n\n  p202 ltv customers --search acme --segment repeat\n  p202 ltv customers --cf plan=pro --cf score.min=50 --all\n  p202 ltv customers 42\n\n--search matches the customer reference, email, company or name. --cf filters by custom\nfield: key=value, or key.min/key.max for number and date fields (at most 3). Writes are\n`p202 ltv customer` (upsert, update, merge, erase, alias).",
  "runnable": true,
  "flags": [
    {
      "name": "all",
      "type": "bool",
      "default": "false",
      "usage": "Fetch every page (500 rows a request)",
      "required": false
    },
    {
      "name": "cf",
      "type": "stringArray",
      "default": "[]",
      "usage": "Only customers whose custom field matches: key=value, or key.min=value / key.max=value for a number or date field (repeatable, at most 3; `p202 ltv fields list` shows the keys)",
      "required": false
    },
    {
      "name": "dir",
      "type": "string",
      "default": "",
      "usage": "Sort direction: ASC, DESC",
      "allowed_values": [
        "ASC",
        "DESC"
      ],
      "required": false
    },
    {
      "name": "limit",
      "shorthand": "l",
      "type": "string",
      "default": "",
      "usage": "Rows per page (max 500)",
      "required": false
    },
    {
      "name": "offset",
      "shorthand": "o",
      "type": "string",
      "default": "",
      "usage": "Pagination offset",
      "required": false
    },
    {
      "name": "period",
      "shorthand": "p",
      "type": "string",
      "default": "",
      "usage": "Period: today, yesterday, last7, last14, last30, last90, thismonth, lastmonth, thisyear, lastyear, alltime",
      "allowed_values": [
        "today",
        "yesterday",
        "last7",
        "last14",
        "last30",
        "last90",
        "thismonth",
        "lastmonth",
        "thisyear",
        "lastyear",
        "alltime"
      ],
      "required": false
    },
    {
      "name": "search",
      "type": "string",
      "default": "",
      "usage": "Only customers whose reference, email, company or name contains this text (the API's q)",
      "required": false
    },
    {
      "name": "segment",
      "type": "string",
      "default": "",
      "usage": "Only this segment (repeat: 2+ orders; subscribers: an active subscription; at_risk: a past_due subscription): repeat, subscribers, at_risk",
      "allowed_values": [
        "repeat",
        "subscribers",
        "at_risk"
      ],
      "required": false
    },
    {
      "name": "sort",
      "shorthand": "s",
      "type": "string",
      "default": "",
      "usage": "Sort: total_revenue, order_count, last_activity_time, first_seen_time, mrr",
      "allowed_values": [
        "total_revenue",
        "order_count",
        "last_activity_time",
        "first_seen_time",
        "mrr"
      ],
      "required": false
    },
    {
      "name": "time-from",
      "type": "string",
      "default": "",
      "usage": "Acquisition window start: unix seconds, a date (2026-10-01, from its first second in the account's timezone) or a time with its offset (2026-10-01T09:30:00Z)",
      "required": false
    },
    {
      "name": "time-to",
      "type": "string",
      "default": "",
      "usage": "Acquisition window end, inclusive: unix seconds, a date (2026-10-01, through its last second in the account's timezone) or a time with its offset",
      "required": false
    }
  ]
}