Input for Session.notifyLogin.

Only customerId is required. The known user attributes are passed as top-level fields. Anything else you want to forward to the SDKs that accept denormalized data goes inside extras as free-form key/value pairs.

Minimum payload (just the required field):

await modules.session.notifyLogin({
customerId: 'cust-12345'
});

Typical e-commerce login:

await modules.session.notifyLogin({
customerId: 'cust-12345',
email: '[email protected]',
phone: '11987654321',
first_name: 'Ana',
last_name: 'Silva',
birthday: '1990-05-12',
gender: 'female',
city: 'Rio de Janeiro',
state: 'RJ',
country: 'BR',
zipcode: '20510-000'
});

Loyalty program data (arbitrary keys go in extras):

await modules.session.notifyLogin({
customerId: 'cust-12345',
email: '[email protected]',
extras: {
loyalty_tier: 'gold',
loyalty_points: 1500
}
});
interface NotifyLoginInput {
    birthday?: string;
    city?: string;
    country?: string;
    customerId: string;
    email?: string;
    extras?: Record<string, unknown>;
    first_name?: string;
    gender?: "male" | "female" | "other";
    last_name?: string;
    name?: string;
    phone?: string;
    state?: string;
    street?: string;
    zipcode?: string;
}

Properties

birthday?: string

Date of birth as ISO date string YYYY-MM-DD.

city?: string

City.

country?: string

Country code.

customerId: string

Unique identifier for the customer in your system. Required.

email?: string

User's email address (e.g. [email protected]).

extras?: Record<string, unknown>

Free-form bag of arbitrary attributes (any key/value).

first_name?: string

User's first/given name.

gender?: "male" | "female" | "other"

Self-declared gender. Use 'male' | 'female' | 'other'.

last_name?: string

User's last/family name.

name?: string

Full name of the user.

phone?: string

User's phone number.

state?: string

State / region.

street?: string

Street address.

zipcode?: string

Postal code.