p202 ltv engagement-event record

Record an engagement event (demo_requested, pricing_viewed, …) on a customer for the ABM and engagement views

New in 1.9.77Writescannot be staged
All commands

01Run it

Straight from the command's own help.

p202 ltv engagement-event record --customer-ref CUST-77 --event demo_requested

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 engagement-event record

Set flags below; the command updates as you type.

04Flags

7 flags, plus the global flags every command takes.

FlagWhat it does
--customer-crmstringCRM 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-refThe customer's internal id (p202 ltv customers)
--customer-refstringrequired, or --customer-idYour system's id for the customer; the server finds it, or creates a customer for it
--customer-ref-typestringWhat kind of reference --customer-ref is (default custom): email_md5, email_sha256, esp_id, merchant_id, subid, custom
email_md5email_sha256esp_idmerchant_idsubidcustom
--eventstringrequiredThe event's name, e.g. demo_requested (required)
--occurred-atstringWhen it happened, unix seconds (default now)
--valuestringA 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, 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 engagement-event record --json
{
  "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
    }
  ]
}