Data Model
The data model is prepared according to the definition in JSON format (JavaScript Object Notation). The defined structure is mapped 1:1.
{
"DocumentType": "Auftrag",
"No": "1003",
"SellToCustomerNo": "10000",
"SellToCustomerName": "Möbel-Meller KG",
"DocumentDate": "2023-11-24",
"LanguageCode": "DEU",
"Lines": [
{
"LineNo": 10000,
"Type": "Artikel",
"No": "1000",
"Description": "Tourenrad",
"RemainingQuantity": 3,
"LocationCodeRecord": {
"Code": "BLAU",
"Description": "Blaues Warenlager"
},
"Amount": 12000
},
{
"LineNo": 20000,
"Type": "Artikel",
"No": "1900-S",
"Description": "PARIS Gästestuhl, schwarz",
"RemainingQuantity": 1,
"LocationCodeRecord": {
"Code": "ROT",
"Description": "Rotes Warenlager"
},
"Amount": 193.90
}
]
}
Note
As the language of the order is German, also the data is prepared in German.
Even if it is only a reduced example, you can clearly see that this JSON file follows a Data Entity Definition from Header/Line/Location. The currency incl. symbol, contact, e-mail etc. would certainly also make sense.
The subject of an e-mail could then look like this if the placeholder prefix and suffix were each a simple "#":
Your #DocumentType# #No# from #format(DocumentDate, 0, "<Closing><Day>. <Month Text> <Year4>")# becomes Your Order 1003 from 24. November 2023
Further information on processing templates can be found here.
Tip
Information on the use of functions (here format()) can be found at Functions.