Im starting a new project on Salesforce lightning with RPA.
basically I get an Excel file with Policies numbers and need to do some actions on the specific asset.
In my other projects I start with SOQL to get all my needed IDs, but now my starting point is external.
what do you think is the best way to get the asset ID for each policy number? I thought about running a single SOQL with policy number each time my Performer start with a new task. but I prefer a bulk option to do it all in once at the Dispatcher (Just for getting the Asset ID).
You can do the same what you are doing at the performer start in the dispatcher and add them to the specific content of each item(You can add the corresponding ID only by filtering the policy id) you are adding so that when retrieved we can have the required ID as well. And yes moving it to dispatcher makes more sense as it is kind of an input for the subsequent process
You can do bulk get of SOQL in Dispatcher as well β¦as you know all the policy numbers already. Just use a filter for each add queue item to identify the required ID
If bulk is having limitations that is when we can go with one soql for each, because advantage of bulk is that we interact with external application only once.
I dont have a xaml but i can give you more details in steps
Read the policy id from excel
String.join(ββ,ββ,βDt.select(function(c) c(βpolicy noβ).tostring).ToArray) and this will give you a string of policy numbers concatenated with single quotes store it in a variable say str which is used in next step
Fire a soql select policyno,ID from table where policyno IN (βββ + str + βββ) include any extra braces or inverted comma needed this will give you all idβs at once. my assumption is you are trying to get from the same object if objects are different then query changes accordingly
Now pass the output datatable to the io_transactiondata and change your trans item to datarow and add both policy no and id to the queue
Hi
first of all thank you for the detailed solution.
but I thought I have an option with Bulk API to do it and without any SOQL. meaning solution out of the box of Salesforce activity
so I think I will stay with a loop and single SOQL to each line in excel
thanks!