01Run it
Straight from the command's own help.
p202 ltv engagement-event record --customer-ref CUST-77 --event demo_requested02What 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 formats03Build your command
Pick values and the command line writes itself, quoted and ready to paste.
p202 ltv engagement-event recordSet flags below; the command updates as you type.
04Flags
7 flags, plus the global flags every command takes.
| Flag | What it does |
|---|---|
| --customer-crmstring | CRM fields as a JSON object, applied only when this call creates the customer, e.g. '{"email":"[email protected]","first_name":"Ada"}' |
| --customer-idstringrequired, or --customer-ref | The customer's internal id (p202 ltv customers) |
| --customer-refstringrequired, or --customer-id | Your system's id for the customer; the server finds it, or creates a customer for it |
| --customer-ref-typestring | What kind of reference --customer-ref is (default custom): email_md5, email_sha256, esp_id, merchant_id, subid, customemail_md5email_sha256esp_idmerchant_idsubidcustom |
| --eventstringrequired | The event's name, e.g. demo_requested (required) |
| --occurred-atstring | When it happened, unix seconds (default now) |
| --valuestring | A number that goes with it: seconds, a percentage, a score |
05How it works
Adds one event to the customer's engagement history (p202 ltv engagement <id>, p202 ltv abm).
It is not a conversion and pays nothing; a click's web events for its goals go through
p202 event send.
p202 ltv engagement-event record --customer-ref CUST-77 --event demo_requested
06For agents
Running this from an agent
- Read the same facts as JSON:
p202 commands ltv engagement-event record --json. - With
AI_AGENT,CLAUDECODEor another agent variable set, output is compact JSON and errors arrive on stderr as a JSON envelope with ahint. - Exit codes: 0 ok, 1 bad input, 2 auth, 3 network, 4 server error, 5 partial failure.
- This command writes and cannot be staged:
--stagedis refused before anything is sent. Have a person run it, or give the agent a key without write scope.
{
"path": "p202 ltv engagement-event record",
"use": "record --event <name> (--customer-ref <id> | --customer-id <id>)",
"short": "Record an engagement event (demo_requested, pricing_viewed, …) on a customer for the ABM and engagement views",
"long": "Adds one event to the customer's engagement history (`p202 ltv engagement <id>`, `p202 ltv abm`).\nIt is not a conversion and pays nothing; a click's web events for its goals go through\n`p202 event send`.\n\n p202 ltv engagement-event record --customer-ref CUST-77 --event demo_requested",
"runnable": true,
"flags": [
{
"name": "customer-crm",
"type": "string",
"default": "",
"usage": "CRM fields as a JSON object, applied only when this call creates the customer, e.g. '{\"email\":\"[email protected]\",\"first_name\":\"Ada\"}'",
"required": false
},
{
"name": "customer-id",
"type": "string",
"default": "",
"usage": "The customer's internal id (`p202 ltv customers`)",
"required": false
},
{
"name": "customer-ref",
"type": "string",
"default": "",
"usage": "Your system's id for the customer; the server finds it, or creates a customer for it",
"required": false
},
{
"name": "customer-ref-type",
"type": "string",
"default": "",
"usage": "What kind of reference --customer-ref is (default custom): email_md5, email_sha256, esp_id, merchant_id, subid, custom",
"allowed_values": [
"email_md5",
"email_sha256",
"esp_id",
"merchant_id",
"subid",
"custom"
],
"required": false
},
{
"name": "event",
"type": "string",
"default": "",
"usage": "The event's name, e.g. demo_requested (required)",
"required": true
},
{
"name": "occurred-at",
"type": "string",
"default": "",
"usage": "When it happened, unix seconds (default now)",
"required": false
},
{
"name": "value",
"type": "string",
"default": "",
"usage": "A number that goes with it: seconds, a percentage, a score",
"required": false
}
]
}