Print this page

Work.com: Recognition - How to batch add badge access records via Workbench

Knowledge Article Number 000205462
Description Adding WorkAccess records allows you to grant Give privileges to Badges.  Wherever possible, give access within the UI by specifying a User or a Public Group in the Access related list for a badge.  The following should only be used if there is a bug preventing a user from granting give privileges through the UI. 
Resolution 1. Login to Workbench with your Salesforce credentials 

2. Agree to the terms and click the Login with Salesforce button 

3. For Jump to select SOQL Query and for Object select WorkBadgeDefinition 

4. Enter the following query in the Enter or modify a SOQL query below: text-area

 
SELECT Id,Name FROM WorkBadgeDefinition WHERE Name = 'Salesforce Admin Certification'

Be sure to replace the 'Salesforce Admin Certification' with the name of your badge (with single quotes) 

5. Hit the Query button 

6. Copy the Id of your badge to Notepad.  You'll need this for the next step.

7. Enter the following query in the Enter or modify a SOQL query below: text-area

 
SELECT Id FROM WorkAccess WHERE ParentId = '0W1i0000000LGr6CAG'

Be sure to replace '0W1i0000000LGr6CAG' with the Id of your badge (with single quotes) 

8. Hit the Query button 

9. Copy the Id of the WorkAccess record to Notepad.  You'll need this later.

10. Open up Excel and create a CSV file with the following headers: AccessLevel, ParentId, UserOrGroupId 

11. For every user you want to give badge access to create a row for them where AccessLevel = Read, ParentId = Id from step 9 and UserOrGroupId = Salesforce Id of the user who should be given access 

12. Save the file and go back to Workbench 

13. Select data | Insert from the top menu 

14. For Object select WorkAccessShare 

15. Choose the file you saved in step 12 and hit the Next button 

16. Click Map Fields then click Confirm Insert 




promote demote