Getting Started
Installation
Permissions
Widget & Inline Page
Classic - Distribution Engine Inline Page
Lightning - Distribution Engine Record Detail
Widget - Introduction
Adding Widget to a Lightning App
Adding Widget to a Lightning Page
Adding Widget to Salesforce Mobile
Adding Widget to a Classic Console
Adding Widget to Classic Homepage
Changing the Widget logout reason list
Before you Begin
Installation Overview
Whats in the Package
Triggers
Installation Process
Managed Package Licences
Page Layouts
Leaving A Review
Uninstall
Upgrading Distribution Engine
Configure Distribution Engine
Distribution Classifier
Territories
Territories Introduction
Create a Map
Import Territories
Territory Map Zoom Levels
Object Settings
Detecting Territories
Settings
Territories - Technical Details
Territory Distributor
Lead Matching
Lead Matching - Introduction
Duplicate Rule Setup
Related Owner - Lead Matching
Lead matching vs lookup owner
Classifier Lead Matching Setup
Lead to Account/Contact/Lead Settings
Custom Classification
Custom Classification - Introduction
Stamp Groups
Stamps
Custom Classification - Synchronized Tag Collections
Lead Auto-Conversion
Lead Auto-Conversion - Introduction
Lead De-Duplication
Lead Conversion
Configuring Auto-Conversion
Auto-Conversion Rules
Distribution Classifier - Introduction
Backfill
Delay Filters
Distribution Teams
Distributors
Distribution Methods
Distribution Methods - Introduction
Lookup Owner
Load Balancing
Round Robin
Related Owner
Sticky Assignment
Distributors Introduction
Distributor Types
Standard Distributor Settings
Pull Distributor Settings
Trigger Distributor Settings
Manual Distributor Settings
Distributor Sources
Distributing from a Designated User
Distributor Filters
Distributor Team Member Filters
Distributor Sort Order
Advanced Filter Mode
Distributor Test Tool
Weighting and Caps
Distribution Hours
Tracking & SLAs
Team Settings
Distribution Teams Introduction
Distribution Assignment Process view
Team Summary
Team Members
Team Availability
Team Performance
Assignment Rejection
Post Assignment
Stamp Rejection
Distribution Tags
Distribution Availability
Distribution Availability
Shift Hours
Out of Office
Distribution Holidays
Holiday Regions
Regional Holidays
User Availability Toggle
Distribution Settings
Distribution Settings
Calendar Integration
Advanced Settings
Distribution Engine Running User
Licensed users list
Export & Import
Import Errors
Trigger Settings
Email Notifications
Email Notifications - Introduction
Custom Email Notifications
Disabling Standard Email Notifications
Customising the Email Template
Disabling Custom Email Notifications
From Email Address
Email Notification as Flow
Assignment Simulator
Assignment Simulator - Introduction
Configure Assignment Simulation
Assignment Simulator Result Explorer
Advanced
Q2Q teams
Integrating InsideSales.com power dialer
Pardot
Auto archive feature
Uploading tags via dataloader
Salesforce Mobile
Tuning Distribution Engine
Setup Introduction
Queue Basics
Queues
Distribution Sync
Monitoring
Distribution Console
Console Introduction
Application Monitoring
Today's Distributions
Sources Console
Availability Calendar
Distribution Logs
Distribution Logs
Distribution Logs List
Territories Logs List
Lead Matching Logs List
Custom Classification Log List
Auto-Conversion Logs List
Object Sync Logs List
Scheduler Logs List
Archive Logs List
Exporting Log Data
Distribution Analytics
Distribution Engine Details Object
Distribution Engine Dashboard
Salesforce Reports
Reports - Leads and Distribution Logs
Change History
Setup Examples
Skill Based Matching
Assigning Contacts - Pairing SDRs and AEs
Delaying Distribution
Enforce Cap for Manually Assigned Records
Criteria Caps
Salesforce Admins
Workflow Rule Examples
Formula Examples
Domain Formula
Timezone Bucket Formula
Has Activity Formula
Territory Formula
Age Formula
Distribution Engine Details Formula
id Field to Text
Flow Examples
Chatter Notifications
Slack Notifications
Desktop or Mobile Notifications
Custom Assignment Rejection
Classify on Address Change
Assign on Action
Process Builder Examples
Process Builder - Avoiding Clashes
Opportunity Assignment - Updating Related Accounts & Contacts
Rejection API Process
Assign License and Permission Set on Team Member Addition
Assign License on Team Member Addition
Tasks on Record Assignment by Distribution Engine
Information for New Admins
Validation Rules
Developers
Apex API
Availability API
Classifier API
Out of Office API
Tags API
Team Members API
DE Apex API Introduction
Rejection API
System API
Trigger Distribution API
Apex Trigger Examples
Omni-Channel Presence Integration
Salesforce Presence Integration
Invalid Email trigger
Custom Triggers
Visualforce Examples
Troubleshooting
Warnings and Errors
Health Checker Messages
Scheduler Restarted
Distributor Failures - Records on Hold
Assignment Errors
Classifier Errors
Apex CPU time limit exceeded
Timeout when deleting a Team Member or Distributor
Records Stuck / Not Being Assigned
Support
Previous Releases
2.9
3
4
4.12
4.15
Armadillo
Bison
Chameleon
Dragon
Dragon beta release - install guide
Eagle upgrade process
Eagle
Fox
Gorilla
Gorilla Upgrade Process
Hummingbird
Hummingbird Upgrade Process
Impala
Impala Upgrade Process
Jellyfish
Jellyfish Upgrade Process
Koala
Koala Upgrade Process
Llama
Llama Upgrade Process
Meerkat
Meerkat Upgrade Process
Upgrade Links
Frequently Asked Questions
Legacy Widget - New status
Distribution Engine Aborted
Alerts not Firing
Distribution Engine Delayed
Can one Distributor Assign from Multiple Queues / Users?
Can't See Distribution Engine
Distribution Engine Not Running
Manual Shutdown of Distribution Engine
Exclude members from Holidays
Distribution Engine Health Checker Restart
Dashboard Running User Error
Assignments going to wrong user
Contact Support
Grant Login Access
Upgrading Distribution Engine Steps
Purchase
Purchasing Steps
Purchasing FAQs
Support Packages
Legal Agreement Details
GDPR
Policies
Migrating Licences
Contact us
Latest Release
- All Categories
- Salesforce Admins
- Process Builder Examples
- Assign License and Permission Set on Team Member Addition
Assign License and Permission Set on Team Member Addition
Managed Package Licenses are required for users to have access to Distribution Engine tabs and fields and for Auto-Action to occur. These steps will allow you to create a process builder flow that will add a managed package license when a user is added to a team. Any user who needs access to the functionality of Distribution Engine will need a Permission Set.
This is a three part process that starts with Creating a Custom Label, then Creating a Flow, and then Creating a Process Builder process.
Creating the Custom Label
The first step in the process will be to capture the Permission Set ID for the Distribution Engine User permission set and assign it to a Custom Label.
1). Open the Developer Console by clicking on your name in the upper right and selecting Developer Console from the dropdown.
2) In the Query Editor tab enter the following text "Select id, Name from PermissionSet where Label= 'Distribution Engine User' and select Execute.
3) This is the ID you will need for your Custom Label to use in the flow. Be sure to copy this ID. In our example, the ID is 0PS1r000001CA4GGAW
4) Now we will create a custom label - Navigate to Setup and search for Custom Labels.
5) Name your Custom Label "Distribution Engine User" and place your ID in the value section and select Save.
Creating the Flow
The first step in the process will be to create the flow that will be used in your process builder. This flow will lookup the Distribution Engine package License ID, verify if the user already has a license, and assign if they do not.
Images can be clicked on to enlarge
1) Navigate to the Flows section by going to Setup and searching for Flows.
2) Create a New Flow, Navigate to the Resources tab, and double click the Variable option.
3) We will create 3 varialbes. One will hold the Distribution Engine License Id, one will hold the UserId passed from your process builder, and one will be used to determine if the user has a license already.
4) Navigate back to the Palette tab and drag and drop the Record Lookup data step to your design canvas.
5) The first Record Lookup will be to get the Managed Package License ID.
- Choose a name for this step
- Set the Look up object to PackageLicense
- Set the Field Criteria to be NamespacePrefix equals n2de
- Assign the Id field to the n2de_PackageLicenseID variable previously created
6) Drag a second Record Lookup data step to your canvas. This one will be used to determine if the user already has a license.
- Choose a name for this step
- Set the Look up object to UserPackageLicense
- Set the Field Criteria:
- PackageLicenseId equals n2de_PackageLicenseID
- UserId equals n2de_UserID
- Assign the Id field to the has_license variable previously created
- Check the "Assign null values to the variable(s) if no records are found" option.
7) Drag and drop a Decision logic step to your canvas.
8) Configure the decision.
- The first outcome will be "Yes" and will look at the has_license variable to see if it does not equal null (value is left blank.)
- The default outcome can be named "No" and will be the default outcome if the user does not have a license already assigned to them
9) Drag and drop a Record Create step to your canvas:
10) Configure the Record Create step:
- Choose a name for this step
- Set the Create object to UserPackageLicense
- Set the field values we'll be setting:
- Field: PackageLicenseId Value: n2de_PackageLicenseID
- Field: UserId Value: n2de_UserID
11) Create a Formula for your PermissionSetID by selecting the Resources tab and clicking Forumula
12) Set the criteria for your formula
- Name - we have used PermissionSetID
- Value Data Type = Text
- Select Resource > System and Global Variences > $Label > Distribution_Engine_User > Ok
13) Drag and drop the Record Create to your flow window
- Name - we used Add Permission Set
- Create - PermissionSetAsssignment
- Feild Values
- AssigneeId = [n2de_UserD}
- PermissionSetID = {PermissionSetId}
14) Link everything together
- Make sure the first step (Record Lookup DE Managed License ID) is marked as the starting element
- Make sure to choose the "No" action (Default Outcome previously named No) when linking the Decision to your Record Create
15) Save your flow and activate it
Create the Process Builder process
Once you have the flow created, you'll need to tie this in to a Process Builder process.
Images can be clicked on to enlarge
1) Navigate to Setup / Process Builder
2) Create a New process builder process
- Set the process to start when a record changes
3) Click the + Add Object section and choose the object to start the process
- The object is Distribution team member
- only when a record is created should be selected for when to start the process
4) Click the + Add Criteria option
- Name the critera anything you'd like
- Set the Criteria for Executing Actions to No criteria-just exxecctue the actions!
5) We're going to create this as a Scheduled Action due to certain update types not being able to occur at the same time.
- Click Set Schedule
- Set to 0 days after CreatedDate
- Click +Add Action in the Scheduled Action section
- Action Type = Flows
- Name the action anything you'd like
- Flow = The flow you created in the first part of this tutorial (a drop down is provided)
- Set Flow Variables
- Click + Add Row
- Flow variable = n2de_UserID created in the first part of this tutorial
- Type = Field Reference
- Value = selecct n2de__User__c
- Click + Add Row
6) Save the action and Activate the process