If a certain amount is reached, an alert should be sent to an email address, so that the respective smart campaigns of that program could be deactivated on time. This could be easily achieved if I just create a new custom field, but since this value is rather relevant for the program than for the lead itself, I settled for the my.token.
There are a couple of ways to accomplish this.
- The way that uses only native Marketo functions (albeit in a hacky-slash-elegant way): create a Resource Contact (RC). This is a Marketo person record that represents the Program itself (it's like when Microsoft Exchange or another collabo platform lists conference rooms and copy machines as resources). Whenever someone is added to the Program, send out a webhook to the /save endpoint on your instance. This will do a form post on behalf of the RC. A trigger campaign hears those form posts and increments a score field on the RC's record. When score is exceeded, alert, turn off SC, profit, etc.!
- The way that uses an external service to maintain the counter. FlowBoost* has a feature designed for this called FBCounter. FBCounter is not only used to add, remove, and count event registrants, it also has the advantage (vs. the RC method) of being readable from the client side, so you can check the current count and redirect the page to an "event full" page automatically (even if the SC is still running).
You might want to try the RC method first and see how it works out for you. I'm rather a fan of it really (AFAIK, I came up with the concept!).
* I'm the tech lead of the FlowBoost platform.