How to use entity parameters

An entity parameter is used to filter a query according to a specific instance. Once you've created an entity parameter, you can use it to filter the dimension of a query. The filtering value is chosen from a route at runtime.

Create an Entity Parameter

Add filter on dimension

  1. Click the Add dimension button and select Payment
  2. Edit the Payment dimension and filter its instances by using the previously created parameter.

Set runtime value in route

Create a new Route with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<routes xmlns="" xmlns:u="">
		<!-- This route receives a new message each time a payment is created -->
		<from uri="tnd-event:paymentCreated"/>
		<!-- We store the instanceId of the payment in a header to be used later on -->
		<setHeader name="paymentId">
			<!-- For each change, we execute a sub-routine -->
			<to uri="direct:line"/>
		<from uri="direct:line"/>
		<!-- Build the parameter map for the query -->
		<setProperty name="tnd-query.parameters">
				<u:map-entry key="tnd-query.referenceTime">
				<u:map-entry key="Payment_EntityParameter">
					<!-- filter by instance id -->
		<to uri="tnd-query:paymentDetails"/>                        

Related Links