The %ApplicationBundleID%n% token return the Bundle ID of the nth application. It takes a parameter indicating which application to use.
The parameter may be:
So for example, %ApplicationBundleID%1% gives the Bundle ID of the front application.