An App developer may wish to add tags to transaction events generated as a result of running their App.
Tags added to the Transaction Analytics generated by a P6 instance can be used to generate charges that will directly remunerate an App developer.
Tags are defined using entries with the type
AppTag in the App Config Service:
The format of an appTag entry in AppConfig is:
[Unique tag name] : [Data type]=[XPATH1 expression to evaluate as tag value]
App Specific Data Type¶
It is important that your application uses data type values that are unique to ensure tag evaluation only takes place on your App transactions.
For example, when creating transaction primary keys, ensure the datatype field is prefixed with your appKey:
def pk = p6.transaction.buildPK("p6_demo.TransactionInfo", "123", "456")
AppTagAppConfig entries are collected into a memory map
- When a transaction event occurs, its DataType field is used to identify all matching tags
- The XPATH1 expression is evaluated against the XML content of the transaction
- The resulting tagValue is attached with the appKey and tagName to the emitted event