This guide explains how to automatically pass logged-in customer data to the Popin widget. This ensures a seamless experience by skipping the manual data entry step and directly opening the widget.
Use this method if:
The user is already logged in.
You have access to their name and at least one contact field (mobile number or email).
You want to open the Popin widget directly without asking the user to enter their details.
To pass customer details to Popin, include the following fields using the Popin("captured", {...})
method:
Field | Required | Notes |
---|---|---|
name |
✅ Yes | Full name of the customer. |
mobile |
⚠️ Yes* | Either mobile or email is required. Mobile number should exclude country code. |
email |
⚠️ Yes* | Either email or mobile is required. |
country |
❌ No | If not provided, +91 (India) will be used as the default. |
Important:
name
is mandatory. At least one ofmobile
or
Use the Popin("captured", {...})
function before opening the widget.
Popin("captured", {
name: data["contact[full-name]"], // Required
mobile: data["contact[phone]"], // Optional if email is provided
email: data["contact[email]"], // Optional if mobile is provided
country: data["contact[country-code]"]?.trim() // Optional (defaults to +91)
});
Popin("open"); // Opens the widget directly to the second screen
Popin("captured", {
name: "Ravi Kumar",
mobile: "9876543210"
});
Popin("open");
Popin("captured", {
name: "Meera Das",
email: "meera@example.com"
});
Popin("open");
Popin("captured", {
name: "Arjun Mehta",
mobile: "9123456789",
email: "arjun@example.com",
country: "971" // UAE
});
Popin("open");
If country
is not passed, it will default to +91.
mobile
should be passed without the country code (e.g., "9876543210" instead of "+919876543210").
The widget will open directly to the second screen, skipping the customer input prompt.