DescriptionSends
from provided eventDetails aka TransactionalItemDetails in CMS. Since the user is in control of JSON, it is itemDetails to avoid inconsistency inside <%ForEach%>
ForEach syntax for displaying transactional details in transactional message (use ${ transaction _details} placeholder inside ForEach)
See Example HTML
ExplanationVar 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 Parameter Type Description recipientId Long ID of the user messageId Long ID of the message or prepared message externalTransactionFormula String External transactional identifier Note that all query parameters are case-sensitive. Take a look at an example below:
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.
Note that all query parameters are case-sensitive. Take a look at an example below:
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
.
User can specify any number of attributes
aka ${transaction_details} and access them using expression language
.
It is strongly recommended to use the same structure for each
ForEach syntax for displaying transactional details in transactional message (use ${ transaction _details} placeholder inside ForEach)
See Example HTML
item.
Expand | ||
---|---|---|
| ||
<%ForEach var="product" items="${transaction_details}" max="10"%>
|
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.
Request path
POST [REST URL]/message/sendTransactionalWithEventDetails
Query Parameters
Note that all query parameters are case-sensitive. Take a look at an example below:
- not "eventdetails" but "eventDetails"
- not "itemdetails " but "itemDetails"
Request Body Type
TransactionalMessageContent additionalContentExpand | ||
---|---|---|
| ||
|
Expand | ||
---|---|---|
| ||
|
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 |