The four levels
Each level adds trust to the one below it. A shopper moves up with stronger proof.
Every visitor starts anonymous. The widget remembers the anonymous profile in the browser, so a returning visitor keeps it until they log in or log out.
Which details win
Crossword tracks where each detail came from and never lets a less trusted source overwrite a more trusted one. From lowest to highest trust:- Anonymous
- Page hint
- Typed by the shopper
- From your systems
- Signed login
Signed login
A signed login is the only way to make a shopper a known customer. The shopper stays a known customer on later logins.1
Create the customer
The customer must exist before you request a token. Read From your systems.
2
Request a token from your backend
When the shopper signs in to your store, your server calls the token endpoint.
3
Pass the token to the widget
Your page passes the token on the script tag or with
login().4
The widget signs the shopper in
Crossword checks the token and treats the shopper as a known customer.
Request a token
Call this endpoint from your server, never from the browser.user_id must belong to an existing customer. The endpoint allows 60 requests per minute per workspace.
Both body fields are optional.
Claims update the profile at sign-in and replace details from every other source.
Pass the token to the widget
If the shopper is already signed in when the page loads, adddata-auth-token to the script tag from your installation snippet. data-workspace-key holds your channel key. The widget signs the shopper in from its first request, so no anonymous profile is created.
login().
login() succeeds, the widget switches from the anonymous profile to the signed-in one, clears the anonymous chat from view, and loads the shopper’s latest conversation. The shopper stays signed in on later sessions.
Sign out
Calllogout() when the shopper signs out of your store.
Signing keys
Each workspace has a signing key pair. Crossword signs every token with the workspace’s current private key.- Crossword keeps the private key. Only the public key is shown. Only the Crossword API issues tokens, so no one can create one without your workspace API key.
- You can rotate the key. The previous key keeps working during rotation, so issued tokens stay valid.
- Managing keys needs permission. A team member needs the signing key permission.
What it unlocks
- Customer data. The Agent can use the shopper’s orders and history. Read Customer memory.
- The logged-in condition. An entry point or rule that tests for a logged-in shopper matches only after a signed login, so you can send signed-in shoppers to a Journey such as Support. Read Rules.
Phone and email verification
Verification confirms that a shopper can receive messages at a phone number or email.Set up verification
Create one verification setup for each field, phone or email. The setup names who sends and checks the code.
A form uses the setup in its code step. The form decides when the code field appears, and the setup decides how the code is sent and checked.
What the shopper sees
1
The shopper enters a phone or email
They type it in a form step. Crossword saves it as a detail typed by the shopper.
2
Crossword sends a code
The code goes to the value saved on the profile, never to a value supplied directly by the browser.
3
The shopper enters the code
If the code is wrong or expired, or the shopper is out of tries, the message shows on the code field.
4
The phone or email is verified
A correct code marks the value as verified on the profile.
Limits
These limits protect your shoppers and your sending costs. A destination is one phone number or email.Telling the Agent
A setup can tell the Agent when a shopper verifies. Turn this on when the Agent needs the verified value to continue, such as booking a callback. The Agent replies as soon as the code is accepted, without the shopper typing anything else.The Agent can trust that the shopper holds that phone or mailbox, but not that they are the customer on file. Customer data stays closed until a signed login.
Details from your site
A name, email, or phone on the profile lets the Agent personalize replies. These details come from your page, the shopper, or your systems. None of them signs the shopper in.From the page
A page hint passes details your page already knows. Page hints are off by default, and you turn them on for each channel. Callidentify() with at least one field.
If the call fails, for example because page hints are off or a value is not valid, the widget ignores it silently.
Instead, the channel can read a cookie your site already sets, named in the channel settings. A value that contains
@ is treated as an email, and any other value as a name. You can name a second cookie for the shopper’s name. The widget reads both when it starts.
A page hint only personalizes, such as greeting the shopper by name. It:
- Never verifies a phone or email.
- Never merges two profiles into one.
- Does nothing to a signed-in shopper.
- Never overwrites details typed by the shopper, from your systems, or from a signed login.
Session context is not identity
The widget’ssetContext() is for session context. It does not change the shopper’s profile and verifies nothing.
Typed by the shopper
A typed phone or email is not verified. To confirm it, add verification to the form.
From your systems
Your systems can create and update customers. These details still do not make a shopper a known customer.- Create a customer with the API or in the dashboard, using your own ID as the
user_id. The request fails if thatuser_idis taken. This is the first step of a signed login, since tokens are only issued for existing customers. - Edit a customer in the dashboard.
- Import a CSV to create or update customers in bulk. Rows match on
user_id: a new one creates a customer, and an existing one updates it. An import never overwrites details from a signed login.

