Portal Functions

💡 Create and manage user portals with ease.

Portals often create controlled access points for users to interact with specific content or features. This guide explains the createPortalUser function, which is used to create portal users.

C.createPortalUser

Here's an example of how to configure the function:

async function script(C) {
    const prabhat = 1185813;
    const email1 = "[email protected]";
    const payload1 = {
        email: email1,
        portalContactId: prabhat,
        portalRoleId: 1185799,
        dataScopeEntryId: 25254,
        portalIdentifier: "test-portal-1",
    };
    const response = await C.createPortalUser(payload1);
    return response;
}

In this example, we're creating a portal user with specific details. The payload1 object contains essential information, such as the user's email, portal contact ID, portal role ID, data scope entry ID, and portal identifier.

These details determine the user's role, permissions, and access within the portal.

Output

The response from createPortalUser provides information about the user creation process. Here's an example of the response:

  • createdPortalEmployee: Indicates whether the user was successfully created as a portal employee.
  • createdNewInternalUser: Indicates whether a new internal user was created for this portal user.
  • portalRoleDefaultEmailSent: Specifies if the default email for the portal role was sent to the user.
  • createdNewAuth0User: Indicates whether a new Auth0 user was created for this portal user.
{
"createdPortalEmployee":true,
"createdNewInternalUser":true,
"portalRoleDefaultEmailSent":true,
"createdNewAuth0User":true,
}

📌 Need Help?

If you require assistance or encounter any issues, please don't hesitate to contact us for further support.