Contact Us 1-800-596-4880

Set Transaction Id

The Set Transaction Id component enables you to set an identifier for all tracked events so that meaningful information, such as an order number, is displayed for a transaction when analyzing tracked events at runtime, whether using Anypoint Runtime Manager or CloudHub.

The transaction ID supports DataWeave expressions, which enables you to create an ID dynamically and include information related to the event into the ID.

Customize the Transaction ID

Follow these steps to set a transaction ID either in Anypoint Studio or by editing the configuration XML:

  • In the Studio UI:

    1. Drag the Set Transaction Id component to your flow.

    2. In the Set Transaction ID configuration screen, set an ID value for the Transaction ID field:

      custom-transaction-id

  • In the XML editor:

    • Add a child element to the flow element:

      <flow name="flow">
      ...
        <tracking:transaction id="#[payload.orderId]" />
      ...
      </flow>

Set Transaction ID Reference

Field Description

Transaction ID (id)

Defines the value of the identifier. It can be an expression or a literal. By default, the component assigns a numeric value.