I eventually found my answer in the help documentation under User Guide/Case Store/Building Case Store Definitions/Other properties/Background processing script syntax:
To reference any Case Store field in your script, regardless of whether it is an input or an output, use the caseData keyword.
For example:
if(caseData.Age <= 30) {
caseData.Age_Bucket = ‘Under 30';
}
Consider this question answered!