- For: section leaders and badge secretaries
- You get: a Badges to order tab with how many of each badge to buy and who each is for
- Time: about five minutes
- Scopes:
badges:readandbadge-stock:read
1. Add the script
In your Google Sheet, choose Extensions → Apps Script. Delete what is there, paste the script below and choose Save.Code.gs
2. Add your key
In the script editor, choose Project Settings (the cog), then Script Properties → Add script property. Property:SCOUTWORKS_API_KEY. Value: the sandbox key to try it, or your own key.
3. Run it
Choose badgesToOrder in the toolbar and press Run. Open the Badges to order tab. Each row is one badge: how many are owed, how many are on the shelf, how many to order, and who they are for. The stages of a staged badge share one shelf count. Run it again each time you place an order. When you give a badge out, mark it as awarded in Scoutworks, or record it through the API withPOST /badge-awards/bulk (badges:write). Either way it leaves this list, and the badge is taken from stock in Scoutworks.
4. Switch to your group
Changeapi-demo.scoutworks.app to api.scoutworks.app, and replace the sandbox key with your own. Your key needs the badges:read and badge-stock:read scopes.
Variations
-
A button in the sheet. Add this function, then reload the sheet. A Scoutworks menu appears with the command in it.
-
Badges on the way. Change
status=completedtostatus=in_progressto see what young people are working on now. It helps you order early. - Badges ticked on the night. The Badge evening sheet signs requirements off from a sheet. A badge whose last requirement it signs off is completed, and appears here.
- Record the delivery. When the order arrives, Reorder badges and uniform adds it to the shelf count in Scoutworks.
-
One young person. Add
&memberId=and a member’sidto see every badge record for one person. Get theidfrom the members list.