Sneak peak at the Portal Builder in 10.2 #33
jstanden
started this conversation in
Developer Log
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction to the Portal Builder
For the past several years we've been migrating away from using plugins for customization. Creating a plugin requires a decent amount of experience with writing PHP code. Maintaining plugins requires constant testing so they continue to work with new platform updates. Plugins are also not a good fit for cloud-based deployments -- they don't scale well (divergent environments), and we have to manually audit and verify all third-party code before deploying every update.
Instead, we've been building functionality for creating customizations entirely within the browser. That started with bot behaviors, and it was recently significantly improved with the release of automations.
It's time to finally bring this mindset to community portals.
In the upcoming Cerb 10.2 update we're working on a Portal Builder. This will replace the built-in Support Center and bring many long-requested improvements to community portals.
The Support Center has remained relatively unchanged for the past 10 years. Meanwhile, we've introduced many new major building blocks on the worker side: custom workspaces, custom records, sheets, data queries, KATA, automations, interactions, toolbars, connected accounts, SSO, etc.
The goal is to use these same building blocks to enable you to quickly build and share a wide variety of customer-facing tools: contact forms, surveys, signups, troubleshooters, knowledgebases, FAQs, Q&As, discussion forums, mailing lists, blogs, bug trackers, accessible UIs, and more.
Identities
The Support Center used contact records for portal logins. Contacts were grouped into organizations.
This created problems for companies who manage multiple portals for each brand. A contact created for any portal could be used to log in to any of them.
It also required users to keep track of yet another login/password.
The Portal Builder introduces identities for logging in to portals. Identities are grouped into pools, which can be isolated or shared between portals. The same person could have different identities on each portal, specific to their interactions with that brand, with their own custom fields and preferences.
All portal logins are now based on single sign-in (SSO) functionality using OpenID Connect. This means you can refer to identities in existing identity providers (IdP) -- Azure Active Directory, AWS Cognito, Okta, GitHub, LinkedIn, etc.
If you have an existing identity provider, those logins will "just work", and once user consent is given, the portals will be able to refer to profile data (profile photo, name, email, etc). Any form of multi-factor authentication is available here (one-time codes, biometric, dongles), and you can manage your password policy.
If you don't have an existing identity provider, we're also shipping a new Identity Provider portal in the 10.2 update. This portal allows new account registration, manages profile data, and verifies logins with multi-factor authentication. It can be used as the provider for any portal or service. We'll make it easy to convert your contact logins to an identity pool.
We'll also be using identity providers to allow bots to verify who they're talking to before performing privileged actions.
This was one of the most heavily requested features in the Support Center.
Routes, pages, and widgets
The Portal Builder describes a web-based application entirely in KATA. That means there are no records for portal pages or widgets.
Routes are rules based on the attributes of an HTTP request (verb, host, path, query, identity, browser) that determine which page to show in response. You can define many routes, and the first match for a given request is used.
There are several types of pages:
portal.page
automation which can return any other page type. For instance, you could load a customer record and generate a personalized dashboard based on their specific account type.There are currently two widget types:
interaction.portal
automation. An interaction can display any combination of form elements (text input, choosers), sheets, maps, charts, and more. For instance, a sheet interaction provides searching, paging, and sorting functionality.As KATA, any element of a portal (including the entire portal itself) can be generated "on the fly" by an automation.
For instance, when a client writes in by email, and their intent is detected by a classifier, your auto-reply can include a link to gather other necessary details based on that issue type (software versions, language, etc). By the time your workers review the issue, a bot has already gathered everything they need.
Layouts
Portal pages can have various layouts. A layout is a combination of header, footer, and style/theme.
Headers and footers are built using layout widgets:
All pages and widgets can be targeted individually with a custom stylesheet.
By default, the portal builder has a minimalistic style so you start with a clean slate.
Portal builder layouts are also responsive -- they automatically adapt to different devices (desktops, laptops, tablets, smartphones).
Portal users will also be able to toggle themes, like light/dark mode.
Portal resources
The portal builder also introduces portal resources.
When creating portal layouts, pages, and widgets, you often need to bring your own resources -- images, icons, fonts, etc.
Previously, the Support Center used attachments for files and images in the knowledgebase. This wasn't ideal from a security standpoint, because attachments also included private files from clients. There were security checks, but a future bug shouldn't be able to create a vulnerability.
In 10.2+, these files can be uploaded as portal resources instead, where they are isolated from private customer data.
As well, anywhere you'd use a URL (like an image source) you can use a Cerb URI (
cerb:portal_resource:example.png
), which will automatically generate a URL for the current portal. This makes it seamless to reuse resources between portals, or between a portal and the worker interface.For instance, managing images on knowledgebase articles.
Example
Let's look at a quick example. Keep in mind that this example intentionally uses a basic default style. You would choose or create a theme.
Here's a portal that replicates the legacy Support Center.
The default page of this portal looks like:
You'll find in
routes:
that we send the paths/
and/home
to a page calledhome
:And
home
is a simple text page:The page uses the default layout, which defines the header (logo and nav menu), and the footer (contact info, nav links, about, and copyright).
Announcements
Let's look at a dynamic page. If we click into Announcements we see:
The route is for
/announcements
is:And the
announcements
page is:This page runs a
portal.page
automation namedwgm.portal.page.sc.announcements
.That automation looks like:
With automation policy:
The automation fetches the RSS feed from Cerb's project website with an HTTP request, converts the XML to JSON, and iterates through each feed item. It dynamically creates a 'dashboard' page with text widgets that use one-third width -- except the most recent item, which is full width on top. Each widget externally links to the original article.
In production, this output would be cached by the automation for a reasonable TTL (time-to-live) like an hour. These results don't need to be personalized per visitor.
Unlike the same feature in the Support Center, this automation approach could aggregate multiple RSS feeds into a single set. It could personalize based on the current identity, their region, or language. Announcements could also come from non-RSS sources (Twitter posts, custom records, etc).
Contact
Now let's look at an interaction. The old Support Center contact form frequently confused admins with its "contact situations". This displayed a contact form based on a specific subject, but it lacked customizability.
With the portal builder, we route
/contact
:To the
contact
page:This runs an
interaction.portal
automation namedcerb:automation:wgm.portal.page.sc.contact
.This page first displays a contact reason like the Support Center, but it's now completely customizable. You can prompt for any kind of information to determine the approach destination, and tailor the form to that exact situation. There can be as many steps as you want.
The form displays with prompts for email address, subject, and message. It also displays a CAPTCHA challenge, and shows the visitor's current IP.
Form validation is handled for you automatically:
There are endless customization options, including:
Login
We can click the log in link in the top right to authenticate as an identity. In this example it takes us to one of Cerb's new identity portals:
It supports two-factor authentication:
And asks us for consent:
After logging in, we are seamlessly returned to the portal.
The layout previously hid the 'Ticket history' menu option unless we were logged in:
The page was also disabled for direct requests (by URL not menu) without an identity:
We can see the menu option now that we're logged in:
After clicking the link, we see the page:
This is a dashboard page, with an interaction (
cerb:automation:wgm.portal.page.sc.tickets
) that displays a sheet of tickets for the current identity. The sheet is filterable and pageable.This sheet can be completely customized to meet your needs.
In this case, clicking on a ticket routes to
/history/ticket/
with the ticket's mask as the third part of the path.And the
historyTicket
page is an automation that receives the mask as input and generates a dashboard page (with widgets) as output:The dashboard includes an interaction widget for Messages named
cerb:automation:wgm.portal.sc.widget.messages
that pages through all messages on the ticket:NPS
Since portal widgets are dynamic, you can occasionally prompt an identity to complete a one-click NPS survey:
Conclusion
You can use the Portal Builder to quickly create customer-facing tools with complete customization.
While our example replicated the Support Center, there are countless uses.
We're working hard to ship this feature in 10.2 within the next few months.
Beta Was this translation helpful? Give feedback.
All reactions