Draft and Populate Catalog Item Variables From Flow or Business Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi,
I have a requirement where if a user gets deactivated from our organization, we need a request submitted to revoke their software license. How can this be achieved?
Currently, it's somewhat of a manual process, although it is mostly automated other than two button clicks for the user. We currently have a flow that is triggered when a user's record changes from Active = True to Active = False and when that happens, it checks if any requests exist that have a software license effective date that is still effective as of today's date or in the future. When it finds the request, it sends an email to the Assigned To user that the Requested For user has been deactivated and to click a button on the notification to revoke their software license. The user clicks a button on the email, and it automatically opens the catalog item in our Service Portal and automatically populates the variables in the form, so all the user has to do is click Submit.
Here is a snapshot of the flow:
Here is the mail script on the notification that populates the variables for the user when they click the botton:
var sysid = current.sys_id;
var nameOfPerson = current.variables.name_of_person.getValue();
url = gs.getProperty('glide.servlet.uri') + 'sp?id=sc_cat_item&sys_id=12345678910&sysparm_category=12345678910&request=revoke&name_of_person=' + nameOfPerson + '&revoked=' + sysid;
template.print(global.OutlookRoundedButtonDynamic('Revoke License', '16', 'FFFFFF', 'ce1141', '7', '20%', url) + ' ');
When the Assigned To user clicks the Revoke License button on the email, the catalog item opens in the browser and auto-populates the variables from the URL and the Assigned To user just has to click Submit.
We would like to automate this further to where, instead of sending an email notification and have the Assigned To user click a button to submit the request for revoking the software license, we just want a request automatically submitted without any inputs from users.
Is this possible via flow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi,
Yes, this requirement can be fully automated using Flow Designer, and based on your current setup, you are already very close
From your flow, instead of sending an email and relying on user interaction, you can directly create the revoke request within the flow itself.
Suggested Approach:
Trigger (Already Implemented)
Your flow triggers when the User record changes from Active = true → false, which is correct.Identify Active Licenses
Continue using your lookup step to identify active software license requests (based on effective date).Replace Notification with Automation
Instead of sending an email with a button, remove that step and add a “Create Catalog Request Item” action.Create Revoke Request Automatically
Configure the action as follows:Catalog Item → Revoke License item
Requested For → Deactivated user
Opened By → System / Flow user
Map required variables:
name_of_person = User name
revoked = Original request/sys_id
Any other required fields
Handle Multiple Licenses (If Applicable)
If multiple active licenses exist, add a For Each loop and create one revoke request per license.
