Alarm Pipeline Notification Calculated Roster: access pipeline properties

I have an alarm notification profile that has been setup as per the Escalation pipeline in the user manual (https://docs.inductiveautomation.com/display/DOC79/Pipeline±+Escalation)

Instead of sending an SMS to all users within a roster at once, I want to send an SMS to each user in the roster sequentially after the delay period. E.g. if i have 3 users in the roster, then numCalls would need to increment from 0 to 2 and the pipeline would SMS user 1, wait, then user 2, wait, then user 3, wait, then finally move on to the next escalation.

I presume this must be done as a calculated roster that will return only one contact dictionary at a time each time the notification block is called, incrementing the user each time it is called.

So I have some test code so far in the Notification → Contact → Calculated roster type script:

users = []
users.append({"username":"Nick", "phone":["22222222222"]})
users.append({"username":"Bob", "phone":["1111111111111"]})
userIndex = event.source.numCalls
roster = [users[userIndex]]
return roster

and this pipeline:

However, userIndex = event.source.numCalls doesn’t work as event is the alarm event, rather than the alarm pipeline object…

How can I access the numCalls property of the pipeline within this function?

Cheers!
Nick

Nevermind, I have the dumb…

‘event’ is a PyAlarmEvent object which has a ‘get’ method to access the alarm pipeline’s properties.

E.g. I can use event.get(‘numCalls’) to get the current numCalls value.