p202 ltv customer update

Change a customer's CRM fields, custom fields or aliases (a flag given empty clears that field)

New in 1.9.77Writescannot be staged
All commands

01Run it

Straight from the command's own help.

p202 ltv customer update 42 --email [email protected] --phone "" --field plan=pro

02What you get

Pick the shape you need. People get a table. Add --json, --csv or --ndjson for scripts, or -q for ids only. An AI agent gets compact JSON without asking. All output formats

03Build your command

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

p202 ltv customer update

Set flags below; the command updates as you type.

04Flags

13 flags, plus the global flags every command takes.

FlagWhat it does
--address-line1stringAddress line 1 ("" clears it)
--address-line2stringAddress line 2 ("" clears it)
--aliasstringArrayAnother identifier for this customer, type=value (repeatable; type is one of email_md5, email_sha256, esp_id, merchant_id, subid, custom)
--citystringCity ("" clears it)
--companystringCompany: attaches the customer to that company (created if new); "" detaches ("" clears it)
--countrystringCountry ("" clears it)
--emailstringEmail address ("" clears it)
--fieldstringArrayA custom field value, key=value (repeatable; key= with nothing after = clears it; p202 ltv fields list shows the keys)
--first-namestringFirst name ("" clears it)
--last-namestringLast name ("" clears it)
--phonestringPhone ("" clears it)
--postal-codestringPostal code ("" clears it)
--regionstringRegion or state ("" clears it)

05How it works

Changes only what the flags name. A flag given empty clears that field (--phone ""); --field key= clears a custom field; a flag not given is not sent.

p202 ltv customer update 42 --email [email protected] --phone "" --field plan=pro

06For agents

Running this from an agent

  • Read the same facts as JSON: p202 commands ltv customer update --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.
  • This command writes and cannot be staged: --staged is refused before anything is sent. Have a person run it, or give the agent a key without write scope.
p202 commands ltv customer update --json
{
  "path": "p202 ltv customer update",
  "use": "update <customer-id>",
  "short": "Change a customer's CRM fields, custom fields or aliases (a flag given empty clears that field)",
  "long": "Changes only what the flags name. A flag given empty clears that field (--phone \"\");\n--field key= clears a custom field; a flag not given is not sent.\n\n  p202 ltv customer update 42 --email [email protected] --phone \"\" --field plan=pro",
  "runnable": true,
  "flags": [
    {
      "name": "address-line1",
      "type": "string",
      "default": "",
      "usage": "Address line 1 (\"\" clears it)",
      "required": false
    },
    {
      "name": "address-line2",
      "type": "string",
      "default": "",
      "usage": "Address line 2 (\"\" clears it)",
      "required": false
    },
    {
      "name": "alias",
      "type": "stringArray",
      "default": "[]",
      "usage": "Another identifier for this customer, type=value (repeatable; type is one of email_md5, email_sha256, esp_id, merchant_id, subid, custom)",
      "required": false
    },
    {
      "name": "city",
      "type": "string",
      "default": "",
      "usage": "City (\"\" clears it)",
      "required": false
    },
    {
      "name": "company",
      "type": "string",
      "default": "",
      "usage": "Company: attaches the customer to that company (created if new); \"\" detaches (\"\" clears it)",
      "required": false
    },
    {
      "name": "country",
      "type": "string",
      "default": "",
      "usage": "Country (\"\" clears it)",
      "required": false
    },
    {
      "name": "email",
      "type": "string",
      "default": "",
      "usage": "Email address (\"\" clears it)",
      "required": false
    },
    {
      "name": "field",
      "type": "stringArray",
      "default": "[]",
      "usage": "A custom field value, key=value (repeatable; key= with nothing after = clears it; `p202 ltv fields list` shows the keys)",
      "required": false
    },
    {
      "name": "first-name",
      "type": "string",
      "default": "",
      "usage": "First name (\"\" clears it)",
      "required": false
    },
    {
      "name": "last-name",
      "type": "string",
      "default": "",
      "usage": "Last name (\"\" clears it)",
      "required": false
    },
    {
      "name": "phone",
      "type": "string",
      "default": "",
      "usage": "Phone (\"\" clears it)",
      "required": false
    },
    {
      "name": "postal-code",
      "type": "string",
      "default": "",
      "usage": "Postal code (\"\" clears it)",
      "required": false
    },
    {
      "name": "region",
      "type": "string",
      "default": "",
      "usage": "Region or state (\"\" clears it)",
      "required": false
    }
  ]
}