Description
Sends a previously prepared message as a transactional message including transaction details such as purchase confirmation.User can iterate through the list of items using <%ForEach%> expression to access the individual item from provided eventDetails. User can specify any number of attributes aka TransactionalItemDetails and access them using expression language in CMS. Since the user is in control of JSON, it is strongly recommended to use the same structure for each itemDetails to avoid inconsistency inside <%ForEach%>
ForEach syntax for displaying transactional details in transactional message (use ${ transaction _details} placeholder inside ForEach)
See Example HTML<%ForEach var="product" items="${transaction_details}" max="10"%>
<%${product['productName']}%>
<%/ForEach%>
Example body
Successful response
HTTP 204
Explanation
Var value refers to a single object inside the list of itemDetails, the name can by anything, in this case, it’s the product.Items value refers to eventDetails which is a placeholder for the list of items we want to show.
Max value is a limit of items to be displayed.
If you have max=”50” but your JSON has less items, all of them will be displayed.
In the case of JSON with a number greater than the limit, the first 50 items will be shown and the rest will be ignored.
Inside ForEach, user can access itemDetails property using an array index with the name of the property user wants to access.
Available from |
---|
v12 |
Request path
POST [REST URL]/message/sendTransactionalWithEventDetails
Query Parameters
Parameter | Type | Description |
---|---|---|
recipientId | Long | ID of the user |
messageId | Long | ID of the message or prepared message |
externalTransactionFormula | String | External transactional identifier |