Learn how to configure your custom widget to display the user information for different use cases.
The Custom Widget SDK allows you to configure your custom widget to display various user information based on your business use cases.
This tutorial is for advanced developers.
You must have already created a custom widget before proceeding with this tutorial.
In this tutorial, you will learn to display the following in your custom widget:
As this tutorial is designed to help you get started retrieving user information, only a simple use case is shown. You can use this as a base and customize your widget further based on your business use case.
You can configure your custom widget to display user information. Use one of the following functions to retrieve the current user information:
getUserInformation()
getUserInformation(userId)
getUserInformationByExternalId()
getUserInformationByExternalId(externalId)
On completing these steps, you will be familiar with the properties and functions required to fetch user information.
The following user attributes are fetched:
The attributes represent the system profile fields within the Staffbase App or Intranet.
Read more about the Staffbase User Model here and about the Staffbase User Identifier (external ID) here.
In addition to the above attributes, if you want the widget to display the attributes primaryEmail and primaryUsername, you need to reach out to your Customer Success Manager to activate the option for you.
You have configured your widget to display user information.
You can also display custom profile fields of users in your widget by using the custom profile field ID as an attribute key, example {user.customProfileFieldId}
.
On completing these steps, you will be familiar with the properties and functions required to display custom profile fields of a user.
You have configured your the custom widget to display custom fields.