Hi guys,
I want to do the following and I was wondering if you could help me with step 2:
0. Read E-mails and check if a customer wants to order smth (Status: Working)
1. Luis makes predictions and I recieve that prediction and parse the JSON information (Status: Working)
2. Read/Extract the composite/Entities (parent/child) in an array (or object?) so I can later select itemnumber,unit and quantity to create a Sales Order line. My Code (I guess you only needed the "Composite Entitites" part but I copied the whole code just in case):
"entities": [
{
"entity": "pcs",
"type": "unit",
"startIndex": 10,
"endIndex": 12,
"resolution": {
"values": [
"PCS"
]
},
"role": ""
},
{
"entity": "kg",
"type": " unit ",
"startIndex": 28,
"endIndex": 29,
"resolution": {
"values": [
"KG"
]
}
},
{
"entity": "a00001",
"type": "itemnumber",
"startIndex": 0,
"endIndex": 5,
"role": ""
},
{
"entity": "a00002",
"type": " itemnumber",
"startIndex": 18,
"endIndex": 23
},
{
"entity": "10",
"type": "qty",
"startIndex": 7,
"endIndex": 8,
"role": ""
},
{
"entity": "20",
"type": "qty",
"startIndex": 25,
"endIndex": 26
},
{
"entity": "a00001",
"type": "item",
"startIndex": 0,
"endIndex": 5,
"score": 0.7192809
},
{
"entity": "10",
"type": "item",
"startIndex": 7,
"endIndex": 8,
"score": 0.7887993
},
{
"entity": "pcs",
"type": "item",
"startIndex": 10,
"endIndex": 12,
"score": 0.5503607
},
{
"entity": "a00002",
"type": "item",
"startIndex": 18,
"endIndex": 23,
"score": 0.6375311
},
{
"entity": "20",
"type": "item",
"startIndex": 25,
"endIndex": 26,
"score": 0.93265295
},
{
"entity": "kg",
"type": "item",
"startIndex": 28,
"endIndex": 29,
"score": 0.968041658
}
],
"compositeEntities": [
{
"parentType": "item",
"value": "a00001",
"children": [
{
"type": "itemnumber",
"value": "a00001"
}
]
},
{
"parentType": "item",
"value": "10",
"children": [
{
"type": "qty",
"value": "10"
}
]
},
{
"parentType": "item",
"value": "pcs",
"children": [
{
"type": "unit",
"value": "pcs"
}
]
},
{
"parentType": "item",
"value": "a00002",
"children": [
{
"type": "itemnumber",
"value": "a00002"
}
]
},
{
"parentType": "item",
"value": "20",
"children": [
{
"type": "qty",
"value": "20"
}
]
},
{
"parentType": "item",
"value": "kg",
"children": [
{
"type": "unit",
"value": "kg"
}
]
}
],3. Do a "Apply to each" and extract each object with its content into single variables so I can use them as an Input for Step 4. (Status: Not working)
4. Create Sales Order Lines in Finance and Operations (Status: not there yet).
I know there are simple manuals out there to create excatly one sales order line but they are not flexible enough and they do not use "composite Entitites" which i think are required.

Report
All responses (
Answers (