Hi,
I got a list of emails content with sender address and recipient address.
There are a few different recipient and a lot of different senders.
I have put them in a data structure (“date of email | sender | recipient | message”).
I would like to read all datas, grouped by recipient and generate an order number to all messages. I would like to reset this number if recipient change and update datastore with this order number. I will use it later in another scenario.
I have tried a lot of loop, increment, but nothing works.
That’s why, I have reset scenario and start with the only right path I thought : an array aggreagtor and an iterator (see blueprint below)
May have you some tips to help me finding the way to my goal ?
Thank you in advance for you help.
Best,
Arnaud
blueprint.json (7.7 KB)
The result I would like (generate order number)
recipient | sender | order number
john | bob | 1
john | tom | 2
peter | mick | 1
peter | susane | 2
peter | fred | 3
with this input data :
[
{
“key”: “fee4f0b107d4”,
“data”: {
“Recipient”: “john”,
“Sender”: “bob”,
“OrderNumber”: null
}
},
{
“key”: “4f60368eeb6c”,
“data”: {
“Recipient”: “john”,
“Sender”: “tom”,
“OrderNumber”: null
}
},
{
“key”: “cd03c8c34d57”,
“data”: {
“Recipient”: “peter”,
“Sender”: “mick”,
“OrderNumber”: null
}
},
{
“key”: “310a819884ab”,
“data”: {
“Recipient”: “peter”,
“Sender”: “susane”,
“OrderNumber”: null
}
},
{
“key”: “1962f4e43bac”,
“data”: {
“Recipient”: “peter”,
“Sender”: “fred”,
“OrderNumber”: null
}
}
]