- Share data across supported Actions, such as API responses or intermediate calculations.
- Eliminate the need to re-fetch or re-calculate the same information in different Actions.
- Pass information from a Custom Token Exchange Action forward to Post Login Actions.
Before using transaction metadata in development, we recommend reviewing the limitations and coding guidelines;
How it works
Use theapi.transaction.setMetadata to set the key/value pair in order to store transaction metadata.
Use the event.transaction.metadata to access stored key/value pair in the same Action or subsequent Actions for a single execution.
The API and Event objects accept the following parameters:
To learn more about writing Actions, read Write Your First Action.
Supported Action types
Currently, the following Action types are supported:Cross-trigger capabilities
Some of the supported Action types allow passing custom metadata across different triggers that execute one after the other for an specific transaction. The diagram below shows a few of the execution lines which allow cross-trigger transaction metadata sharing. Particularly:- Transaction metadata set and shared by a Custom Token Exchange Action flowing into the Post-Login trigger
- Transaction metadata set and shared forward between Post-Login Actions in the same execution sequence
Latency
Using Actions Transaction Metadata could cause a nominal additional latency. Any latency would be proportional to the metadata payload size and would be relevant when Action suspensions happen. For example, triggering , redirecting from Actions, or rendering Forms, could cause latency issues due to the need of reloading data from storage. Still, the potential latency should be minimal than the redundant outgoing HTTP requests to retrieve data the sequence of Actions needs.Examples
Basics
Single Trigger and Cross-trigger
- Share Values Between Actions within the same Trigger
- Share Values from Custom Token Exchange to Post Login