Assigning Package Manager License to Community User using Flow

Use case: 

A Community user needs to get permission automatically for the installed package to access the features inside the portal once they signup. We can achieve this using a flow. A Flow automates the business process, and it is part of Salesforce that collects data and performs actions in your org, or an external system. It helps to minimize post user creation manual activities. Let us see how we can achieve our scenario. 

Objects Overview: 

We are going to use two main Objects inside the flow as shown below, 

Object Name Description 
UserPackageLicense This Object references a license of an installed package where we are going to assign the user. 
PackageLicense This Object refers to a license of an Installed Package 

Steps to be followed: 

  1. Create a Flow and choose Record-Trigger  
  1. Define a formula whether user is created or updated 
  1. Use a Decision element check above formula outcome 
  1. Add get records element to find our package License id 
  1. Use a Decision element to check whether license found ID or not 
  1. Use a Create element to assign the package license id to the user 

Step 1: Create New Flow: 

Setup -> Flow -> New Flow 

Select Record-Trigger Flow 

  • Object: User 
  • Trigger the Flow When: A record is created or updated 
  • Set Entry Criteria 
  • Condition Requirements: None 
  • Optimize the Flow for Action and Related Records 

 Click Done. 

Step 2: Define formula whether user is created or updated 

Here, we are checking the conditions as below criteria: 

  • User Created record is active  
  • User profile is your custom profile name (Here, we have chosen ‘Beneficiary which is my community profile) 

Step 3: Use Decision element check above formula outcome 

  • Drag and drop the decision element 
  • Label: Created 
  • Condition Requirements to Execute Outcome: All Conditions are met 
  • Define the condition as decided above: 

                    $Record->Active Equals to True 

                    $Record->Profile Id-> Name Equals to ‘Beneficiary’ (your Custom Profile Name)    

Step 4: Add get records element to find our package License id 

Drag and Drop the Get Record element into the flow designer 

Edit the Element with the properties below: 

Object: Package License 

Condition Requirement: Name Prefix: vlocity_ins (Your Installed Package Name prefix) 

  To find out the name prefix for your installed package, 

  • Go to -> Setup -> Installed Package -> Your Package -> ‘Namespace Prefix’ column 

Step 5: Use Decision element to check whether license found ID or not 

  • Drag and drop the Decision element 
  • Label: License Found 
  • Condition: Package License from VloctiyInsPackageID -> Package License ID -> isNull -> False 

Step 6: Use Create element to assign the package license id to the user 

Drag and Drop Create Element, next to If License found step 

Properties: 

How many records to create: One 

How to set the record fields: Use separate resources, and literal values 

Object: User Package License 

Fields: 

     PackageLicenseId – packageLicense from VlocityPackageID-> Package License ID 

      User Id -> $Record -> User ID 

Click Done. 

Flow Overview: 

Outcome

As a result, we will be able to assign the Package Manager License Id automatically when the user gets created to our community. So that community user can access the access the package features. 

About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Harnessing Generative AI in Healthcare Insurance: Streamlining Operations and Enhancing Member Insights

Healthcare insurance providers are navigating new ground and capitalizing on new opportunities made possible through artificial intelligence. AI can be utilized to lower costs for payers and improve the member experience as well as the overall health and well-being of members, leading to greater member satisfaction and improving trust and reputation for the payer’s brand.

Read Article »

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.