[dynamic_help_sidebar root="leads"]

AI Propensity Score – Automatically Predict Conversion Chances

1. Feature Overview

In LeadSquared, lead conversion potential was traditionally measured using Lead Scores, Engagement Scores, and Lead Quality Scores. While these metrics offer valuable insights, they are static, require manual setup, and assess each parameter independently without understanding their interrelation.

To overcome these limitations, LeadSquared introduces the AI-powered Lead Propensity Score – a dynamic and automated way to predict how likely a lead is to convert.
This score is generated using a proprietary AI/ML model that analyzes behavioral and historical data across your account to identify the attributes most associated with conversions. It eliminates manual scoring setup and provides a unified, data-driven prediction to help you prioritize high-potential leads efficiently.

LeadSquared Lead Propensity

Key Benefits

  • Objective, data-driven lead prioritization
    Engage with the right leads first based on AI-based predictions rather than subjective judgment.
  • Reduced manual effort
    No manual configuration or scoring logic is required – the system automatically learns and adapts.
  • Improved sales efficiency
    Helps sales teams focus their time on high-propensity leads to improve conversion rates and optimize sales performance.
  • Actionable insights
    Correlate lead attributes, activities, and behaviors with conversion outcomes to improve sales strategy and customer engagement.

 

2. Prerequisite

This is a paid feature. To get it enabled on your account, contact your account manager, or write to support@leadsquared.com.

Note: This feature can be trained on either lead or opportunity data. When enabled on your account, consult your account manager to determine which option best fits your use case.
If you train this feature on opportunity data, select the Opportunity Type it should use. You can train it on only one opportunity type in your account.

 

3. How it Works

  • Identifies Conversion Attributes
    The AI model automatically analyzes historical lead data to identify the attributes and behaviors that have influenced conversions in the past.
  • Builds a Predictive Model
    The system continuously learns from your lead and activity data, building a model that determines which characteristics best predict successful outcomes.
  • Predicts Conversion Likelihood
    Every new or updated lead is evaluated by the model and assigned a conversion likelihood (e.g., High, Medium, or Low), helping users focus on the most promising leads.
  • Continuously Refines Predictions
    As lead data evolves, the model retrains itself to refresh propensity scores, ensuring predictions remain accurate and relevant over time.

 

4. Manage Leads Page

On this page, Propensity Scores are visible by default for all leads. You can use the score in Advanced Search to filter leads based on their propensity.

LeadSquared Lead Propensity

 

5. Lead Details Page

The Propensity Score is visible on the vCard.

LeadSquared Lead Propensity

 

6. Smart Views Page

The Propensity Score can be used to create a Smart Views page.

LeadSquared Lead Propensity

 

Any Questions?

Did you find this article helpful? Please let us know any feedback you may have in the comments section below. We’d love to hear from you and help you out!

Create Meeting Types on Flostack

1. Feature Overview

The Meetings Type feature in Flostack enables users to define and manage different categories of meetings with tailored scheduling rules. It supports instant scheduling, allowing users to specify availability for specific purposes, while controlling duration, time slots, visibility, and participant capacity.

Meeting types can be one-on-one or group meetings, and can be virtual (with calendar integration) or in-person. This ensures smooth scheduling, prevents conflicts, and improves the overall attendee experience.

Benefits

  • Targeted Scheduling: Allocate time for specific purposes, such as KYC verification, interviews, training sessions, or client meetings.
  • Efficient Time Management: Control availability by day, time, and meeting type to reduce conflicts and no-shows.
  • Automation-Friendly: Preconfigured meeting types integrate with booking links, events, and UDS (e.g., LeadSquared) to automate lead capture.
  • Enhanced Attendee Experience: Participants see only relevant time slots and available capacity, simplifying the booking process.

meeting types overview

 

2. One-on-One Vs Group Meetings

The following are the differences between One-on-One and Group Meetings –

2.1 One-on-One Meetings

These are private sessions with a single attendee. They are ideal for interviews, consultations, or client calls where focused, individual attention is required. Each slot is booked by one participant, and availability is blocked automatically via calendar integration.

Use Case

  • A prospective student wants a personal consultation with an admissions advisor about program eligibility.
  • A potential customer needs a detailed walkthrough of a product or service.

2.2 Group Meetings

These sessions accommodate multiple participants at the same time. They are suitable for workshops, webinars, or training sessions. Users can define the maximum capacity for each slot, while availability is managed for the organizer, allowing multiple attendees to book until the capacity is reached.

Use Case

  • A university wants to run a campus tour or program orientation for multiple students simultaneously.
  • A company runs a product demo webinar where multiple leads join at the same time.

 

3. Creating Meeting Types

From the FloStack dashboard, navigate to Meeting Types in the left-hand menu. You’ll see all created types with details like name, duration, and type. Click + Create Meeting Type and choose the type, One-on-One or Group.

3.1 Add Meeting Details

  • Name: e.g., “Campus Orientation Session”
  • Mode: In-Person or Virtual
    • Location: Required if In-Person
  • Private Option: Select if the meeting should not appear publicly. Only you can view and use this meeting type.
  • Meeting Capacity (Group Only): For Group Meetings, you have the option to limit the number of spots and display remaining spots on the booking page.

3.2 Set Schedule & Availability

  • Date Range: Defines when the meeting type is available for booking.
    • You can choose between fixed range or indefinite.
  • Duration: Length of each meeting in minutes.
    • For example, 15, 30, or 60 minutes.
  • Weekly Hours: Days of the week and time ranges when the advisor is available for booking.
    • For example, Monday and Wednesday, 9:00 AM–5:00 PM.
  • Calendar Sync: Connects the advisor’s external calendar (Google, Outlook, etc.) to FloStack and automatically blocks times that are already booked, preventing conflicts.
    • You can sync your calendar on the My Integrations page.
  • Timezone: Select your preferred timezone.
  • Meeting Buffers: Buffer time added before and after each meeting.
    • For example, add a 10-minute buffer before a 30-minute call so that an advisor has time to prepare.
  • Minimum Schedule Notice: Minimum lead time required before a lead can book a meeting. It prevents last-minute bookings that the advisor cannot accommodate.
    • For example, if you add a 2-hour notice and the current time is 2 PM, the earliest bookable slot is 4 PM.
  • Start Time Increments: Defines the frequency at which time slots appear for booking.
    • For example –
      • 15-minute increments → slots at 9:00, 9:15, 9:30, 9:45, etc.
      • 30-minute increments → slots at 9:00, 9:30, 10:00, etc.

3.3 Customize Booking Form

  • By default, the form collects Name and Email of the attendees, these are mandatory fields. 
  • Additionally, configure up to 10 custom questions to ask the attendees, and even mark them as mandatory.
    • The following Answer Types can be configured: Dropdown, Checkbox, Radio Buttons, Multiple Lines Text, Single Line Text, Count, Phone Number, and Email Input Box.
  • Post-booking re-direction can show a FloStack confirmation page or redirect to a custom URL. Configuration for auto-redirect after a certain duration is also available.
    • Note: This selection will not be applied if the meeting is booked through the microsite.

configure meeting types new

 

4. Generate the Booking Link and Routing Rule

Once you’ve set up a meeting type, you can use it in Bookings & Events and configure Meeting Type Rules to automatically route leads based on form submissions.

  • Booking and Event links can be shared on microsites, emails, or other channels.
  • Leads can view available time slots and book meetings directly.

 

Any Questions?

Did you find this article helpful? If you have any questions or comments, please let us know in the comments section below. We’d love to hear from you and help you out!

Flostack – Booking and Events

1. Feature Overview

The Bookings & Events module is the central hub for publishing, managing, and sharing all scheduling experiences created in Flostack. Whether you’re hosting personal consultations, running large-scale webinars, or offering multiple types of sessions to leads and customers, this module brings everything together in one place.

It consists of three core components:

  • Booking Links – Personalized one-on-one scheduling pages that let individuals book time directly with an advisor, counselor, or team member.
  • Events – group sessions such as webinars, orientations, demos, or training programs with configurable capacity, presenters, and landing pages.
  • Listing Pages – A single, public-facing catalog displaying all your booking links and events, making it easy for users to browse and register.

All these components are powered by Meeting Types, which define the underlying rules—availability, duration, buffers, capacity, form fields, and more. Meeting Types ensure consistent scheduling behavior across every booking experience, while Bookings & Events determine how these experiences are shared with your audience.

 

2. Prerequisites

To learn more about FloStack (www.flostack.io), and enable it on your account, contact flostack@leadsquared.com.

 

3. Booking Links

Booking Links allow you to create personal or team scheduling pages for one-to-one meetings. Each link is powered by either your default availability or Meeting Type and automatically respects your availability, duration, buffers, and calendar sync settings.

booking link preview

Create a Booking Link

  1. Navigate to Booking & Events>Booking Links.
  2. Click Create Booking Link.
  3. Configure:
    • Booking Link URL – The public link attendees will use to book time with you
    • Name – Internal name for identifying the booking link
    • Use Default Availability –When enabled, the link will use the default availability configured on your Settings page.
      • Duration – Pulled from the default calendar, this can be overridden.
    • Meeting Type – Instead of the Default Availability option, you can select a meeting type that defines the availability, buffers, increments.
    • Welcome Message – Shown on the public scheduler
  4. Save to generate your booking link.

Create booking link

Note: Click the booking link icon icon to copy the booking link.

booking link copy

 

4. Events

Events let you create group sessions such as webinars, workshops, or open houses. An event uses a meeting type as its base configuration and allows you to add presenters, capacity limits, and a fully customizable landing page.

The Events section in Flostack provides a centralized view of all scheduled and created events. It includes two primary tabs—Agenda and All Events—along with options to create new events and manage attendees.

4.1 Agenda Tab

The Agenda tab displays the full calendar of upcoming and past event occurrences, helping organizers quickly track what’s scheduled.

Note: For an event to show up in the agenda tab, it must have at least one registered attendee.

Key Features

  • Upcoming / Past View: A side toggle lets you switch between upcoming and past event occurrences.
  • Event Overview: Each event entry shows details about the events.
  • Manage Attendees: Click the Manage Attendees button on an event to – 
    • View the list of all registered attendees
    • Check in attendees who have arrived, and specify if they’ve brought guests.
    • Export the attendee list
    • Add attendees manually

This tab is ideal for tracking real-time event activity and managing participant lists.

Atendee management

4.2 All Events Tab

The All Events tab shows every event that has been created in your workspace—regardless of event status or number of attendees. This tab acts as your complete repository of events.

Creating an Event

Click Create Event to start building a new event. You will first choose between two creation modes:

4.2.1 Event Scheduler

Choose this when you want a standard scheduler-based booking experience. This option is ideal for straightforward scheduling without a custom landing page.

event scheduler preview

You can configure:

  • Event Details
    • Name
    • Description
    • Meeting type
    • Organizers & Presenters
    • Capacity management
  • Schedule
    • Date & event duration
    • Availability/working hours
    • Meeting limits.
  • Booking Form
    • Create Event Link
    • Invitee Form Questions
      • Enable or disable the option to allow the registrants to bring guests.
    • Confirmation Page

Most of the configuration for the Schedule and Booking Form section will be autopopulated with the Meeting Type configuration you’ve selected. It’s possible to further modify some of the configuration once it’s autopopulated.

create event scheduler

4.2.2 Event Landing Page

Choose this when you want a fully branded event page with images, highlights, multimedia, and custom sections. This option provides a richer, marketing-friendly page to promote the event.

event scheduler landing page

You can configure:

  • Type of Event Landing Page – Select either one-off or recurring. Select one-off if you want to create a fresh events landing page without a pre-configured meeting types template. 
  • Event Details
    • Name
    • Description
    • Meeting type (only available in the recurring type, in the one-off event you can select the Mode of meeting).
    • Organizers & Presenters
    • Capacity management
  • Schedule
    • Date & event duration
    • Availability/working hours
    • Meeting limits.
  • Booking Form
    • Create Event Link
    • Invitee Form Questions
    • Confirmation Page
  • Landing Page Design
    • Upload Images: Add Banner and Main Image to the page.
    • Register Button: Configure the button label and color for the Register/CTA button.
    • Landing Page Widgets: The following widgets are available –
      • Highlights: Add highlights to showcase important numbers or information.
      • Embed URL: Enter URL to embed resources from web in your landing page.
      • Image Gallery: Add images alone or with text content as cards.
      • Text Block: Add heading and body text.

event landing page one-off

Note: Click the events link icon icon to copy the Event link.

events link copy

 

5. Listing Page

A Listing Page serves as a unified public catalog for all your Events and Booking Links, making it easy for visitors to discover and register for any session you offer.

Use Case

  • A university publishes a Listing Page to showcase all available sessions—counseling appointments, campus tours, orientation events, and workshops—allowing prospective students to browse and register from one central page.
  • A multi-specialty clinic uses a Listing Page to display all consultation types and group health sessions in one place, enabling patients to quickly find and book the right appointment without contacting the clinic.

listing page

How It Works

On the Listing Page screen, you can create dedicated listings for Events or Booking Links.

  • In the Events tab, click Create to build a listing page that showcases selected events.
  • In the Booking Links tab, click Create to publish a listing page containing selected one-on-one scheduling links.

For either type, you can configure:

  • Name – Internal and public-facing title of the page
  • Link – The URL for sharing the listing page
  • Description – A short summary shown at the top of the page
  • Items to Display – Add the specific events or booking links you want to include

Once saved, the listing page becomes a single, shareable destination for visitors to browse and register for your events or book one-on-one sessions.

Listing page

Note: Click the events link icon icon to copy the listing link.

listing page link copy

 

FAQs

1. What happens to guests added to a booking?

When the person scheduling a booking adds guests (by entering the number of guests and their email addresses), those details are stored for reference only. FloStack does not create leads from the guest email addresses, and no notifications are sent to the guests. Only the person who created the booking receives the booking notification.

 

Any Questions?

Did you find this article helpful? Please let us know any feedback you may have in the comments section below. We’d love to hear from you and help you out!

How to Use Iframes or Custom Code on Portals and Landing Pages Pro

1. Overview

Iframes let you embed custom designs or external tools inside Portals or Landing Pages Pro without affecting the main layout. To ensure your embedded content works smoothly, follow the guidelines listed on this page.

 

2. Guidelines For Iframe or Custom Code

1. When using AI tools to generate custom designs or widgets

If you’re using AI to generate HTML, CSS, or JavaScript:

  • Clearly specify that the code will run inside an iframe.
  • Prompt the AI not to use external JavaScript libraries—stick to basic HTML, CSS, and JS to avoid slow load times and reduced conversions.
  • Request the design in small sections, and embed each section in its own iframe instead of placing everything inside one large block.
  • Ensure all buttons, scrolling, and interactions work even within the confines of the iframe.

2. Do not use AI-generated code for forms

If you need a form next to your custom design, use the built-in drag-and-drop form builder. Place your LSQ form beside a custom code block to create a hybrid layout—this ensures proper tracking, reliable submissions, and consistent behavior across portals and landing pages.

3. Adjust spacing, width, and styling for a seamless embed

To make the iframe full width, remove padding, and align it neatly with your layout, refer to the platform’s instructional video (shown below) for spacing and container setup.

If the embedded content looks cut off or doesn’t extend fully at the bottom, add this CSS:

body, iframe {
    height: 1000px;
}

This helps the iframe appear smooth and continuous, without borders or unwanted scrolling.

adding iframe in lp and portals ai

Portal Redirection & Error Handling

1. Overview

This document outlines the Portal’s redirection rules and provides explanations to assist in debugging your implementation.

 

2.SmartLink Auto-Evaluation Matrix

When configuring a SmartLink—a feature designed to automatically log users into the Portal—options are available to configure associated activities and opportunities. Once an activity or opportunity is configured within the SmartLink and subsequently triggered via automation, the relevant activity ID or opportunity ID is integrated into the SmartLink’s URL.

Although this table specifically illustrates activity-based SmartLinks, the principles apply similarly to opportunity-based and combined activity-and-opportunity integrations.

Example: Activity-Based SmartLink

Case
Activity Defined
ActivityId Passed
Same Actvity Type
URL Has ActivityId
Valid Link
Outcome
A
Yes
Yes
Yes
Yes
Yes
Configured SmartLink target
B
Yes
Yes
No
No
No
Home Page
C
No
No
No
Yes
No
Home Page
D
No
Yes
No
Yes
Yes
Configured SmartLink target

2.1 SmartLink Failure Routing

If a SmartLink fails for any reason, such as expiration, the user will be redirected to the Portal’s Home Page.

Scenario
Trigger
Outcome
SmartLink failure
SmartLink cannot be validated/resolved
Home Page

3. Duplicate Activity

If duplicate activity handling is configured within the forms (under Portal Settings), this section outlines how the system behaves when a duplicate is detected. Essentially, the system attempts to redirect to the flow configured in the Login or Signup form.

Step
Check
If True
If False
1
Any page with login action exists (by hierarchy)
Go to first page with login action
Home Page
2
Login action type = Link Page
Configured Link Page, likely dashboard
Home Page
3
Login action type = Rule-Based
Execute rules
Home Page
4
Any rule outputs “Link Page”
To Configured Link Page, likely dashboard
Home Page

4. Mismatch / Unauthorized — Routing

If a user attempts to access the Portal using a Lead, Activity, or Opportunity ID not associated with their account, they will be logged out and redirected to the Home Page.

Scenario
Trigger
Outcome
Activity–Lead mismatch
Activity does not belong to the referenced Lead
Logout → Home Page
Unauthorized entity usage
Using another user’s Lead/Activity/Opportunity Id
Logout → Home Page

How UDS Helps You Sign-up Only Verified Users in Portals

1. Overview

LeadSquared Portals now support UDS-based validation for signup (registration/login) forms. This ensures that only verified and approved users can sign up on your portal

When a user submits a registration form, the portal sends the form data to a UDS flow for real-time validation before the user account is created. UDS can run any custom logic—such as checking duplicates, verifying phone or email, blocking blacklisted users, or validating against external systems.

The validation runs on the Register Save Request at each step of the signup process — applicable to both single-step and multi-step forms.

Note: Non-registration forms are not supported in this integration.

 

2. Core Rules

Parameter

Description

Integration Point

The UDS endpoint can be integrated only with the Portal Signup Form.

Execution Trigger

The UDS flow is executed during the Registration Save Request (Save at Each Step).

Form Compatibility

Supports both single-step and multi-step signup forms.

 

3. Response Handling and Error Logic

The Portal’s behavior depends strictly on the HTTP status code returned by the UDS endpoint.

3.1 Successful Submissions

The signup submission proceeds only if the UDS returns a 200 status code.

Example – Success Response (200)

{
  "statusCode": 200,
  "responseHeaders": {},
  "body": {
    "status": "SUCCESS",
    "success": true,
    "errors": {},
    "data": "{{Write your message here}}",
    "requestId": "c1d2e3f4-5678-9012-3456-abcdefabcdef"
  }
}

3.2 Error Handling

If the UDS returns any other status code (e.g., 400, 500), the save request will be restricted. The error message displayed to the user depends on the response body received from the UDS.

Here are two possible error scenarios:

3.2.1 Scenario 1 – Custom Error Message (From UDS)

If the UDS response includes a correctly formatted body with an errors message array, the portal displays the custom message returned by UDS.

Example:

As seen in the screenshot, the user enters a blacklisted number.

The UDS returns a 500 status code, the UDS response body includes a requestId and an errors.message array containing, “This is a blacklisted number. Please try with another number.“.

The portal UI correctly displays this custom message to the user.

custom error message 1

3.2.2 Scenario 2 – Default Error Message (Fallback)

If the UDS response is not formatted correctly or lacks required fields, the portal shows a default error message.

Default Message: Portal-Form Validation Failed. Please check the Portal-Form Validation service.

Triggers for Default Message:

  • UDS returns an error status, but the response body does not include errors.message field.
  • The UDS response is missing either the status code or the request ID.

Example:

The screenshot shows a 500 status in the network request, but the UI displays the defaultPortal-Form Validation Failed...” error. This indicates the UDS response for that specific error did not provide the required message or Request ID in the expected format.

Default Error Message (Fallback)

 

4. UDS Configuration

To ensure successful validation, the flow should be a custom configuration type with real time response. Configure the UDS flow with the following settings:

Configuration

Required Setting

Flow Trigger

Custom Trigger

Action Type

Return Response (to send data back to Portal)

uds portals config overview

The flow must be initiated by a Custom Trigger and must use the Return Response action to send data back to the portal.

portals uds config custom return response

Next, copy the custom webhook URL.

custom webhook url

On the Portal Designer, select your Registration Form. Under States, paste the webhook URL in the UDS URL field. You should see a succesful validation.

enter uds link on portals

 

5. Trigger Details – Sample Payload data

Note: The following link provides a sample custom UDS app: UDS-POR Phone Number Dup Check. You can import this file directly to create the sample UDS flow (This file contains sensitive information and is accessible only to LeadSquared’s internal team). For assistance, contact support@leadsquared.com.

Below is a sample payload sent from the Portal during registration save. You can copy this payload directly into UDS to create a sample flow.

{ 

    "TaskId": "", 

    "ActivityId": "", 

    "FormId": "bf34eb59-4520-11ef-8227-064299b60867", 

    "PageId": "dllkufl5y", 

    "IsFormPreValidationEnabled": true, 

    "OpportunityId": "", 

    "FormEntity": [ 

        { 

            "FormId": "bf34eb59-4520-11ef-8227-064299b60867", 

            "TabId": "tab1", 

            "SectionId": "bf34eb59-4520-11ef-8227-064299b60867_tab1_section1", 

            "LeadFields": [ 

                { 

                    "SchemaName": "EmailAddress", 

                    "Value": "fjdsi@jifods.com", 

                    "RuleAppliedInfo": { 

                        "Hidden": 1, 

                        "Mandatory": 0 

                    }, 

                    "DataType": "Email", 

                    "RenderType": "Email" 

                }, 

                { 

                    "SchemaName": "Phone", 

                    "Value": "+91-9123411101", 

                    "RuleAppliedInfo": { 

                        "Hidden": 1, 

                        "Mandatory": 0 

                    }, 

                    "DataType": "Phone", 

                    "RenderType": "Phone" 

                }, 

                { 

                    "SchemaName": "FirstName", 

                    "Value": "firstname", 

                    "RuleAppliedInfo": { 

                        "Hidden": 1, 

                        "Mandatory": 0 

                    }, 

                    "DataType": "Text", 

                    "RenderType": "Textbox" 

                }, 

                { 

                    "SchemaName": "mx_Street1", 

                    "Value": "address", 

                    "RuleAppliedInfo": { 

                        "Hidden": 1, 

                        "Mandatory": 0 

                    }, 

                    "DataType": "Text", 

                    "RenderType": "Textbox" 

                } 

            ], 

            "ActivityFields": [], 

            "TaskFields": [], 

            "OpportunityFields": [] 

        } 

    ], 

    "ProcessFormEntity": [ 

        { 

            "FormId": "bf34eb59-4520-11ef-8227-064299b60867", 

            "TabId": "tab1", 

            "SectionId": "bf34eb59-4520-11ef-8227-064299b60867_tab1_section1", 

            "LeadFields": [ 

                { 

                    "SchemaName": "EmailAddress", 

                    "Value": "fjdsi@jifods.com", 

                    "RuleAppliedInfo": { 

                        "Hidden": 1, 

                        "Mandatory": 0 

                    }, 

                    "DataType": "Email", 

                    "RenderType": "Email" 

                }, 

                { 

                    "SchemaName": "Phone", 

                    "Value": "+91-9123411101", 

                    "RuleAppliedInfo": { 

                        "Hidden": 1, 

                        "Mandatory": 0 

                    }, 

                    "DataType": "Phone", 

                    "RenderType": "Phone" 

                }, 

                { 

                    "SchemaName": "FirstName", 

                    "Value": "firstname", 

                    "RuleAppliedInfo": { 

                        "Hidden": 1, 

                        "Mandatory": 0 

                    }, 

                    "DataType": "Text", 

                    "RenderType": "Textbox" 

                }, 

                { 

                    "SchemaName": "mx_Street1", 

                    "Value": "address", 

                    "RuleAppliedInfo": { 

                        "Hidden": 1, 

                        "Mandatory": 0 

                    }, 

                    "DataType": "Text", 

                    "RenderType": "Textbox" 

                } 

            ], 

            "ActivityFields": [], 

            "TaskFields": [], 

            "OpportunityFields": [] 

        } 

    ], 

    "ExecutionId": "", 

    "ActionId": "", 

    "ProcessDesignerId": "", 

    "ActivityCodeToUpdate": "", 

    "FormOpportunityCode": "0", 

    "ActivityCodesToUpdate": [], 

    "FormOperation": 1, 

    "DraftId": "", 

    "ActivityIdsToBeRemoved": [], 

    "RemovedOriginalSubformIds": [], 

    "PaymentVerificationKey": "", 

    "CurrentTabId": "", 

    "IsPortalRegistrationForm": true, 

    "UseRegisterV2": true, 

    "RegisterLeadEntity": { 

        "Email": "fjdsi@jifods.com", 

        "Password": "e5/ttqpaoGaZ8YOwJi1oMhD5G84sNxxxxxxxxxxxxxxxxxxxnQsxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd88fnYUpUG8s4NJYLYSRPuJJiimQCZLnomE5+4E5WTCpP3ok4EAXJt9LEfZxxxxxxxxxxxxxx=", 

        "ConfirmPassword": "iJtO8GCA0LWnogZ0BrjXXZ8lXQKTKxxxxxxxxxxxxxxxxxxxqErxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxDKbOvM0d19OeYujwgDx52sbZlyhry0ZilMBfQs6TqCMZttI/nOECUjaubcxPJ1CUtdKna9AZyYXLQTxxxxxxxxxxxxx=" 

    }, 

    "PortalSpecificDetails": { 

        "TimeZoneInfo": "US/Central" 

    }, 

    "URLSearchParams": {}, 

    "LockKey": "", 

    "PortalDetails": { 

        "URL": "https://landingpagecreate4-dobwavuz.marketxpander.net/", 

        "IPAddress": "10.230.13.6", 

        "ConnectionSpeed": "4g", 

        "Platform": "Windows", 

        "BrowserName": "Chrome", 

        "BrowserVersion": "141.0.0.0", 

        "DeviceType": "Desktop", 

        "PageUrl": "https://landingpagecreate4-dobwavuz.marketxpander.net/", 

        "ReferrerUrl": "" 

    }, 

    "RenderSettings": { 

        "ProcessDesignerId": "", 

        "ActionId": "" 

    }, 

    "SavedTabIds": [], 

    "ConnectionSpeed": "4g", 

    "Platform": "Windows", 

    "BrowserName": "Chrome", 

    "BrowserVersion": "141.0.0.0", 

    "DeviceType": "Desktop", 

    "PageUrl": "https://landingpagecreate4-dobwavuz.marketxpander.net/", 

    "ReferrerUrl": "" 

}

 

6. Sample Return Response Logic

Here’s an example of how the Return Response action can handle phone number validation within a UDS Custom Flow.

const main = (input) => { 

    const phoneField = input?.data?.FormEntity?.[0]?.LeadFields?.find( 

        field => field?.SchemaName === "Phone" 

    ); 

 

    const phone = phoneField?.Value; 

 

    function findLead(phone) { 

        if (!phone) { 

            return { 

                statusCode: 200, 

                responseHeaders: {}, 

                body: { 

                    status: "SUCCESS", 

                    success: true, 

                    errors: {}, 

                    data: "Number is not provided", 

                    requestId: "c1d2e3f4-5678-9012-3456-abcdefabcdef" 

                } 

            }; 

        } else if (String(phone) === "+91-9876543210") { 

            return { 

                statusCode: 500, 

                responseHeaders: {}, 

                body: { 

                    status: "ERROR", 

                    success: false, 

                    errors: { 

                        message: [ 

                            "This is a blacklisted number. Please try with another number." 

                        ] 

                    }, 

                    data: null, 

                    requestId: "3bfcfe46-39dd-7c86-6a87-5196d2c65971" 

                } 

            }; 

        } else if (String(phone) === "+1-9876543210") { // +1 -> 400 

            return { 

                statusCode: 400, 

                responseHeaders: {}, 

                body: { 

                    status: "ERROR", 

                    success: false, 

                    errors: { 

                        message: [ 

                            "Bad request for this US number." 

                        ] 

                    }, 

                    data: null, 

                    requestId: "a1111111-2222-3333-4444-555555555001" 

                } 

            }; 

        } else if (String(phone) === "+93-9876543210") { // +202 -> 202 

            return { 

                statusCode: 202, 

                responseHeaders: {}, 

                body: { 

                    status: "SUCCESS", 

                    success: true, 

                    errors: {}, 

                    data: "Accepted for asynchronous processing", 

                    requestId: "a1111111-2222-3333-4444-555555555002" 

                } 

            }; 

        } else if (String(phone) === "+98-9876543210") { // +98 -> 400 

            return { 

                statusCode: 400, 

                responseHeaders: {}, 

                body: { 

                    status: "ERROR", 

                    success: false, 

                    errors: { 

                        message: [ 

                            "Invalid or malformed number for +98 sample." 

                        ] 

                    }, 

                    data: null, 

                    requestId: "b2222222-3333-4444-5555-666666666098" 

                } 

            }; 

        } else if (String(phone) === "+95-9876543210") { // -> 401 

            return { 

                statusCode: 401, 

                responseHeaders: {}, 

                body: { 

                    status: "ERROR", 

                    success: false, 

                    errors: { 

                        message: [ 

                            "Unauthorized - sample number." 

                        ] 

                    }, 

                    data: null, 

                    requestId: "c3333333-4444-5555-6666-777777777401" 

                } 

            }; 

        } else if (String(phone) === "+355-9876543210") { // -> 405 

            return { 

                statusCode: 405, 

                responseHeaders: {}, 

                body: { 

                    status: "ERROR", 

                    success: false, 

                    errors: { 

                        message: [ 

                            "Method Not Allowed - sample number." 

                        ] 

                    }, 

                    data: null, 

                    requestId: "d4444444-5555-6666-7777-888888888405" 

                } 

            }; 

        } else if (String(phone) === "+213-9876543210") { // -> 415 

            return { 

                statusCode: 415, 

                responseHeaders: {}, 

                body: { 

                    status: "ERROR", 

                    success: false, 

                    errors: { 

                        message: [ 

                            "Unsupported Media Type - sample number." 

                        ] 

                    }, 

                    data: null, 

                    requestId: "e5555555-6666-7777-8888-999999999415" 

                } 

            }; 

        } else if (String(phone) === "+376-9876543210") { // -> 429 

            return { 

                statusCode: 429, 

                responseHeaders: {}, 

                body: { 

                    status: "ERROR", 

                    success: false, 

                    errors: { 

                        message: [ 

                            "Too Many Requests - sample number." 

                        ] 

                    }, 

                    data: null, 

                    requestId: "f6666666-7777-8888-9999-aaaaaaaa429" 

                } 

            }; 

        } else if (String(phone).toUpperCase() === "NA" || String(phone).toUpperCase() === "N/A") { 

            return { 

                statusCode: 422, 

                responseHeaders: {}, 

                body: { 

                    status: "ERROR", 

                    success: false, 

                    errors: { 

                        message: [ 

                            "Phone value marked as NA (not applicable)." 

                        ] 

                    }, 

                    data: null, 

                    requestId: "09876543-21ab-cdef-0000-00000000NA01" 

                } 

            }; 

        } else { 

            return { 

                statusCode: 200, 

                responseHeaders: {}, 

                body: { 

                    status: "SUCCESS", 

                    success: true, 

                    errors: {}, 

                    data: "Valid number for registration", 

                    requestId: "96d8df97-0c27-821f-5cc8-ee04ac8c91b7" 

                } 

            }; 

        } 

    }

 

7. Debugging Errors

Refer to the UDS logs for any failures in execution. The Logs feature in UDS allows you to monitor and troubleshoot the execution of your data sync flows: Universal Data Sync (UDS) – Logs.

uds logs for portals

 

Any Questions?

If you have any questions related to forms that weren’t answered here, please leave comments below. We’ll be happy to help!