What are they?
Batch categories are a batch setting (no UI) that allow a single survey to be used for multiple scenarios. Adding a category allows you to attach some more information to the batch that is highly specific (and that is not otherwise "known" by Presto). For example, if you create a batch titled "October 2026", that's just a label without meaning to Presto. Presto knows that that batch's shops belong to that batch, but "October" (the batch name) has no meaning to it. By using batch categories, you can provide information to Presto that can (with custom Javascript) be used to do things.
Applications
Common applications that we've seen so far are:
- To indicate what month the shop was (which may be other than the actual shop date, because there's always overlap)
- To indicate what period or round the shop is part of
- To indicate the shop type (tobacco, alcohol, vape)
All the pieces
Using batch categories requires the following pieces
- A batch category. This is simply a text string that is entered in the categories field of the run. Support decides on the text string. This should be lowercase without spaces (dashes are all right). We have to set this on the batch. Once set on the batch, the category will be copied with the batch.
- A single select question with a response for each category that may be used (e.g., "Month of shop" with answer options "September", "October", "November"). This should be hidden from the shopper (but can be visible for the purposes of testing).
- Javascript to set the single-select question (from 2, above) based on the batch category. For example, if you had a question with qtext "Month" and qid 763715 and responses "August 2026" (ansoptid 621122) and "September 2026" (ansoptid 621123), and batches with categories "august-2026" and "september-2026", the javascript would say:
- if(eval.runContainsCategory('august-2026'))
eval.getQuestion('763715').val('621122');
if(eval.runContainsCategory('september-2026'))
eval.getQuestion('763715').val('621123')
- (optional) Presto Logic to do something based on the response to the single-select question in step 2 (and possibly other things too. For example:
If Month=August 2026 then (do whatever)
The Presto Logic is created and maintained by the MSP.
Note: not all MSPs do anything with this information in Presto (for example HS Brands). They just want to mark the "wave". The response is imported into SASSIE and stuff is done based on the "wave". In other cases, MSPs use the wave and other stuff as well (for example BBY, where they use the category and the location's group membership).
Setting them up
Basic steps:
- MSP: create a survey beginning with a single-select question that has one answer option for each category that you want to have.
- (optional) MSP: add whatever plogic you want to the survey, to show questions based on which answer option is selected for that first question.
- Support: create custom javascript, making note of the batch categories that you decide to use.
- MSP: Create batch(es) and tell support which batch(es) get which categories
- Support: set runs.categories to match the information from 2 and 3. NOTE: a batch can have multiple categories. If it does, they are separated by commas