I didn’t know how to properly formulate my inquiry in one short search on the Forum, so please feel free to remove it if this creates a duplicate.
My question is how to send messages via email, in bulk, for customers with a specific code in the excel file.
I have an excel file and an orchestrator queue. All the information, line by line goes from excel to the Orchestrator, as a queue item.
When it comes to Send Outlook Activity, I’d like to group all transactions corrisponding to a certain customer, to be able to extract all information from the queue for that particular customer and build an email with details from queue items.
Process is supposed to be built with ReFramework, so general initialization\get transactions happen in corresponding parts of the state machine provided by UiPath.
Please, can someone share ideas on how to achieve this? Thanks
While reading the email, send the queue item with Reference that is unique to one user. May be you can have abbreviated names ending with digits.
Then while in get transaction state, first use the Get Queue Items, you’ll have all the queue items at once.
Then group them as per user names, then send one group at a time to Process Transaction state. In this was you’ll process one user data at a time
Grouping can ve done using linq or simply a for loop and if condition to group the same user reference
Remember, Get queue items is just to take the data at once and group
You’ll have to change the state of that transaction item manually once you process it
Sorry, so I get the list of all the queue items on Orchestrator. Now I am going to iterate over the items with the help of “For each”. The queue is full of items and some elements have same ‘reference’. Can I group them? When I group them I can’t proceed with creation of an email just yet, can I?
This is actually what my Orchestrator queue looks like
I am going to have to make something like that:
Get all transactions with the reference “X” and create one email.
Get all transactions with the reference “Y” and create one email.
…and so on.
Thank you @rahulsharma ,
Even if I can’t know the IDs that will be uploaded to the Queue beforehand, will I be still able to use this approach?
Here’s my kind of input file. I am going to upload each line to the Orchestrator first. Then I want to send only one email to the recipient who has 123 code, and the second email will be sent to the 321 code. The tricky part actually is that I never know values in column 2, so I can’t build a dictionary, can I?
we are referencing the data, that can be anything…
Whatever the data is, just send the reference for the part you want to group, ie., in your case Column 2 data and in collection, mention the remaining data
Sorry @rahulsharma, could we in theory get the inner fields out of the queue items this way by using in_Transaction argument?
Or how can this activity be adjusted to accept more fields, like TransactionItem.SpecificContent…?
Thank you.
We pass a string at the end of execution on to the output, which represents a table. So, when I print the values out, it actually writes it in form of a table.
I am wondering if there is a way to deserialize that string, because the email message should be created, based on what is inside a queue item?
Thank you very much @rahulsharma for bearing with me, can you clarify please if the values in the table have to be explicitly accessed with number (e.g. dt.Row(0)(0).toString) or is there any way to get them differently?
I’d like to be able to access the value of transaction.specificitem(“first argument”) and so on… but the tricky part is that I don’t know the final number of records in filtered data table and might lose some data, am I wrong?