Help needed - SAM - Bulk User Allocations

Josh Thompson
Mega Contributor

Hello,

I am working on adding User Allocations to a Software Entitlement. I am trying to find a functional way to take the data from my spreadsheet (user email address or user name) and target to the User Allocations table in that Software. I've created the data source using the excel doc and a transform map targeting User Allocation table and  mapping email > assigned to. I've tried using the Asset Tag or the Display name of the Software Entitlement to map to the Entitlement (which gets changed to licensed_by in the Field Maps). I've also added a Quantity to the data source xlsx just for sanity sake and filled those out with 1 across each entry.  I feel like I'm overlooking one simple step here and I cannot figure it out. 

Any tips/suggestions would be hugely appreciated. 

1 ACCEPTED SOLUTION

akash_mehta
ServiceNow Employee
ServiceNow Employee

Josh:  Are you getting an error message?  Is data not getting populated?  Can you add some screenshots of the mappings?  Everything that you mentioned sounds correct; maybe we just need to see some of the pieces that you have done.

View solution in original post

6 REPLIES 6

akash_mehta
ServiceNow Employee
ServiceNow Employee

Josh:  Are you getting an error message?  Is data not getting populated?  Can you add some screenshots of the mappings?  Everything that you mentioned sounds correct; maybe we just need to see some of the pieces that you have done.

Scott Halverso1
Mega Guru

I frequently write bulk importers to bring in both user and device allocations.  I also include the ability to include the license key as part of the import and create the key if needed.  Like Akash stated, I'd need to see more to understand what's not working in your import

 

 

find_real_file.png

Josh Thompson
Mega Contributor

This here is my current Transform Map for 2 fields in the spreadsheet and what I am assuming is a nonsense script that I added to try to target the correct Software that I want to allocate to. 

find_real_file.png

I have also tried it with without a script and using both "Microsoft Office 365 Enterprise F3" (with no quotes, this is the display name in Software Entitlement) and our Software Asset # in the spreadsheet mapped out in the screenshot below. 

find_real_file.png

If I run this one with business rules, I'll get the error below.

Warning Insert of reference field value for licensed_by - SWExxxxxxxx failed. Probably cancelled by a business rule on alm_entitlement

 

Not running business rules I get no errors and no updated user allocations - total: 100, inserts 100, updates 0, processed 0, ignored 0, skipped 0, errors 0

 

Here is a redacted spreadsheet example. There are 100 users in my spreadsheet who are already in ServiceNow. 

find_real_file.png

 

 

 

Josh:  Thank you this is helpful...

1) Use the second transform map -> with business rules

2) In the licensed_by mapping -> there is a field called "Referenced value field name" -> set this to asset_tag

3) In your mappings for assigned_to and licensed_by -> change the choice action to reject -> if the value from your spreadsheet isn't in the user table or the sw entitlement table...then you don't want it to create bad data -> reject it so you know there is an issue and you can fix it

4) Set the coalesce for both assigned_to and licensed_by to true -> basically you are doing a duel coalesce