Mavis DB – Portals Integration

1. Feature Overview

Mavis DB enables you to create databases to store master data (for courses, programs, projects, etc.) directly within your LeadSquared account. Integrating Mavis DB with LeadSquared portals makes this data easily accessible to your customers. Doing this lets you pull data from Mavis based on rules and real-time lead inputs to populate portal fields. You can also hide specific portal display cards depending on whether certain Mavis DB conditions are met.

Note: This document does not cover creating a Mavis database or a portal. It only explains how to integrate an existing Mavis DB with portals.

 

2. Example Use Case

Use Case 1

Let’s look at the example of a school where the fees for each grade vary based on the mode (live classes, live + recorded classes, recorded classes, etc.) and curriculum. The school stores their course data in a Mavis table with columns for monthly tuition, curriculum, grade, etc.

Mavis Portal Integration

On our Portal page, we want to display the monthly tuition for a lead interested in opting for Language as English, Grade as Year 8, and Mode as Live + Recorded.

Use Case 2

We want to display a Payment Status block on the portal to leads whose Language is English and Curriculum is British.

Note: You can set up a variety of rules, both simple and complex, to pull data from your Mavis DB for display in your portal. This article only illustrates a generic use case.

LeadSquared Mavis Portal Integration

 

2. Prerequisites

  • You must be an admin user.
  • Mavis DB should be enabled on your account. To get this feature, please reach out to your account manager, or write to support@leadsquared.com.
    • Once enabled, create a Mavis table from where data can be displayed.
  • Create a LeadSquared Portal.

 

3. How it Works

3.1 To Fetch and Display Mavis DB Data in your Portal

  1. First, create a Mavis database to store your data.
    • To create a Mavis database using APIs, see Mavis APIs.
    • To create a Mavis database using the LeadSquared web application UI, please refer to Mavis Database.
  2. Next, create a LeadSquared portal.
  3. Then, set up a rule that fetches data from your Mavis table, and displays it on the portal.
    • This action fetches the specific information (from your Mavis DB) that you want to display to your leads when they meet the configured conditions.
  4. Preview and Publish your Portal.
    • After you’ve added all the necessary rules, preview and publish the Portal.

3.2 To Display or Hide a Portal Block.

  1. Set up a rule that determines which blocks are shown to your leads.
    • This rule must contain a minimum of two conditions, and only if both conditions are met will the block be displayed to your lead. The two conditions we’ll be configuring are leads must have English as their Language and British as their Curriculum.
      • If both these conditions are satisfied, the block will be displayed to the lead.
      • If even one of these conditions is not satisfied, the block will not be displayed to the lead.
    • If even one of the conditions is not satisfied, the block will be hidden from your lead.
  2. Preview and Publish your Portal.
    • After you’ve added all the necessary rules, preview and publish the Portal.

 

4. Integrate Mavis with Portals

Here, we want to display the monthly tuition for a lead interested in selecting their Language as English, Grade as Year 8, and Mode as Live + Recorded.

Note: Before setting up the rule, ensure the Requires Login setting is enabled for the portal page you’re integrating with Mavis. This is mandatory, and without it, the integration will fail.
  1. On the Portals Designer screen, navigate to the page you want to integrate with your Mavis table.
  2. On the page, inside a textbox or form field, enter the ‘@’ symbol, and select Fetch Mavis Data.
  3. On the Manage Mavis Data pop-up, select the Database, Table, and Column from which you want to display the data. We want to display the data present in the Monthly Tuition column.
  4. Next, add the conditions that need to be satisfied for the data to be fetched from the Mavis table. We’re adding Language is English AND Grade is Year 8 AND Mode is Live + Recorded*.
    • We’ve configured the conditions to fetch the value if all the conditions are met. You can also configure it to fetch the value if any of the conditions are met.
    • You can also use the Mail Merge option to fetch data from lead fields. If the mail merged data satisfies the conditions, the value will be fetched from the Mavis column.
  5. Once you’re done, click Save.

Preview the portal, and click Publish. When a lead visits this page, and if they satisfy the configured conditions, the value will be fetched from the Mavis column and displayed to the lead.

Note: *You can add up to 10 filter conditions.

Mavis Portal Integration

 

5. Show or Hide Portal Blocks Using Mavis Data

Hide or display various blocks in your portal based on the values fetched from your Mavis table. This is useful when you want to show specific blocks only to leads that meet certain conditions.

Note: 

  • Before setting up the rule, ensure the Requires Login setting is enabled for the portal page you’re integrating with Mavis. This is mandatory, and without it, the integration will fail.
  • You can hide or display blocks only if activities are associated with the blocks you want to control. To know more, refer to Link Activities with Portal Blocks. This is mandatory, and without it, the integration won’t work.

Here, we want to show the “British Students Payment Status” portal block, for all leads who select English as their Language and British as their Curriculum.

  1. On the Portals Designer screen, navigate to the block you want to hide or display.
  2. Click the outer border of the Element, and from the Components panel, click Display Rules.
  3. On the Dashboard Item Display Rules pop-up, select whether you want to display the block if Any or All of the conditions you configure are satisfied.
  4. Next, on the first dropdown, select Mavis Data.
  5. Select the database, table, and column you want to display on the block. We’re selecting the Language.
  6. Next, add the filter condition that needs to be satisfied to display the block. We’re selecting Curriculum is British.
  7. Then, from the dropdown below IF, select the relevant function, and the corresponding value. We’re selecting is English.
    • The logic here is that if the Language is English and the Curriculum is British, the block will be displayed to the lead.
    • If a lead visits this portal block and their Language is English with a South African Curriculum, or Afrikaans with a British Curriculum, the block will NOT be displayed.
    • If required, you can add multiple similar conditions.
  8. Once you’re done, click Save.

Preview the portal, and click Publish. When a lead visits this page, and if they satisfy the configured conditions, this block will be displayed to them. If they don’t satisfy the configured conditions, this block will be hidden from them.

Note: When configuring conditions, you can also use the Mail Merge option to fetch data from lead fields. If the mail merged data satisfies the conditions, the block will be displayed to that lead.

Mavis Portal Integration

 

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!

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments