# Customer Profiles artifacts: order object type example + E.164 helper

Companion to the FactualMinds post "Amazon Connect Customer Profiles (Oct 2026)".

| File | What it is |
| --- | --- |
| `order-object-type.example.json` | EXAMPLE object type mapping for an eCommerce order. Follows the `Fields` / `Keys` shape in the AWS page "Examples of object type mappings". Not created in a live domain. Remove the `_comment` key before using it, and pass `DomainName` and `ObjectTypeName` yourself. |
| `phone.mjs` | `toE164(raw, defaultCallingCode = '1')`. Custom engineering. Returns `+<digits>` or `null`. Not libphonenumber: no per-country validity. |
| `phone.test.mjs` | `node --test`. Phone cases, plus a local lint of the example mapping against the documented rules (one `UNIQUE`, a durable `PROFILE` key, standard-object identifier paired with its targets, reserved key names unused, ContentType on indexed email and phone). The lint is a sanity check, not Customer Profiles validation. |

Run (Node 24, no dependencies, no AWS credentials):

    node --test

Design choices in the mapping: the store order number is `ORDER` + `UNIQUE`, so re-sending an order replaces it. Email is the primary `PROFILE` key. Phone is `PROFILE` + `SECONDARY`, so it is consulted only when email gives no unambiguous match (shared household phones). `ExpirationDays: 365` is a placeholder; set your own retention.

Not covered: the AWS-side validation of this JSON, ingestion, identity resolution settings.
