Passing Logged-In Customer Details to Popin

Passing Logged-In Customer Details to Popin

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.


📋 When to Use This

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.


🛠️ Required Fields

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 of mobile or email must be provided.


🧩 Implementation

Use the Popin("captured", {...}) function before opening the widget.

✅ Example Code:

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

🔁 Sample Scenarios

Case 1: Mobile and Name Provided

Popin("captured", {
  name: "Ravi Kumar",
  mobile: "9876543210"
});
Popin("open");

Case 2: Email and Name Provided

Popin("captured", {
  name: "Meera Das",
  email: "meera@example.com"
});
Popin("open");

Case 3: Mobile, Email, and Country Code Provided

Popin("captured", {
  name: "Arjun Mehta",
  mobile: "9123456789",
  email: "arjun@example.com",
  country: "971" // UAE
});
Popin("open");

📌 Notes

  • 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.


    • Related Articles

    • Streamline Customer Calls by Passing Logged-in User Data to Popin

      Enhance Your Customer Experience with Pre-filled Data We understand that a seamless user experience is crucial when it comes to customer interactions. To make video calls with your agents even more effortless, Popin allows you to pass logged-in user ...
    • Popin Webhook Integration Guide

      Overview Popin's webhook functionality allows you to receive real-time notifications about events happening in your Popin widget. This guide explains how to set up webhooks and describes the event payloads you can expect to receive. Setting Up ...
    • Popin Zapier Integration Guide

      Popin Zapier App Integration Overview The Popin Zapier App enables you to integrate Popin with thousands of other applications through Zapier. This guide provides instructions on how to connect Popin to Zapier, configure triggers, and use API ...
    • Integrating Popin Sales Tracking on Shopify

      To ensure seamless sales tracking with Popin, please follow the steps below to integrate the new Popin sales tracking pixel into your Shopify store. Steps to Integrate Popin Sales Tracking Step 1: Access Your Shopify Admin Panel Log in to your ...
    • Popin - Freshsales Integration Guide

      Introduction Integrating Popin with Freshsales allows you to sync leads and activities seamlessly between the two platforms. Follow this guide to set up the integration quickly. Prerequisites You must have an active Popin account. You must have an ...