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%>
Available from |
---|
v12 |
POST [REST URL]/message/sendTransactionalWithEventDetails
Parameter | Type | Description |
---|---|---|
recipientId | Long | ID of the user |
messageId | Long | ID of the message or prepared message |
externalTransactionFormula | String | External transactional identifier |
Example body
{ "parameters": [ {"name" : "Parameter Name 1","value" : "Parameter Value 1"}, {"name" : "Parameter Name 2","value": "Parameter Value 2"} ], "attachments": [ { "name": "twitter_logo.png", "contentType": "image/png", "content": "iVBORw0KGgoAAAANSUhEUgAAABUAAAARCAYAAAAyhueAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAASFJREFUeNqslM0NgkAQhRdiAdiAgQ6468EO1INntQOpwFABdqBe9aAdiIl3twS1AbECfJPMkhVZftSXjJPsDh87z2WsNE1Fb3d3z+POVVQIdQ5ShJhqywdEgEgQQ1qwutsbFT4QM4DXFcALwi3YJqDD2bPx4/PGCg/OSw46NwAFA0nU7d7ObUYAHxF+wYMDUU8jiz19aG9TihEbyuS3oSavNmoT5Sm1thA/CkCLsvJ0In5XdnsIKkv+gCaSGZQ8QF7+AXrST0peBH8Ar9+grKfuS1Mgd/wBjb/0lmChvmBr14GgMy5qoiA/N+zcPSNfPN2fCoVF86KlDQxqvc93tl8DaBxALcAi/qLqKuaWpalAffsOz8iB4ZRSzYIymNJLgAEAYsJkJOLW//gAAAAASUVORK5CYII=" } ], "eventDetails": [ { "itemDetails":[ {"name":"productName","value":"Chair C1"}, {"name":"brandName", "value":"aaa aaa"} ] }, { "itemDetails":[ {"name":"productName","value":"Sofa S1"}, {"name":"brandName", "value":"bbb bbb"} ] }, { "itemDetails":[ {"name":"productName","value":"Bed B1"}, {"name":"brandName", "value":"cccc cccc"} ] } ] } |
Successful response
HTTP 204 |