โ12-13-2023 03:07 PM
I have created a Recipe in pilot a step
gets a related list from Opportunity Products in salesforce (which is a list of all the SKUs in an opportunity)
I then have a step
Batch Sales Order in Epicor Kinetic (batch) (Which creates a Sales order and loads all the SKus)
this is super cool
BUT we have 2 different companies in Epicor so I would like to do this exact thing but say 5 of the SKUs are from company 1 and 4 are for company 2
I created a field in SFDC so the opportunity product record would have company 1 or two but I can't figure out how to get the records with the condition for company 1 or 2.
anyway to do the get with conditions? I don't see a get action that has conditions options
Solved! Go to Solution.
โ12-14-2023 10:30 AM
Hi! You need to create a loop and iterate over the product list retrieve. Then, in the loop you will have an if/else condition. If Product Company = 1, proceed with X. Else - proceed with Y.
X & Y executions are essentially the same. But going to different Epicor Companies.
The use case guide and activity in this module can be helpful: https://academy.workato.com/working-with-databases
โ12-15-2023 07:01 AM - edited โ12-15-2023 07:08 AM
Ok @johnw , just a quick comment. In the proposed solution, you are iterating over each of the Opportunity Products instead of creating the Sales Order in Epicor in batch, right? This solution, depending on the number of Opporunity Products and Sales Orders may consume a large number of tasks. My question is, instead of getting all the Opportunity Products in one action, have you tried to make 2 different searches filtering by Company using one of the following actions:
If you are using the "Search records" Action (simpler), you should be able to see the newly created custom field for Company in Salesforce. Ensure that the user you are using in the Workato SFDC connection has permission to access this field. Additionally, don't forget to refresh the recipe schema.
By obtaining the results in this manner, using two separate lists, you will be able to create the Sales Order in Epicor in batches through two different actions. This approach will require fewer tasks compared to the previous method.
Regards
โ12-15-2023 03:51 AM
As far as step 1) this is my confusion the โGet related lists tepโ doesnโt allow me to filter I was hoping there was a conditions option
Same on step 2โฆ within batch add there is no way to filter on which record to add eitherโฆ or at least I donโt see the โConditionsโ options I have seen on other steps
โ12-15-2023 06:21 AM
Hi @johnw , can you share your recipe (using the Sharing option) so we can take a look at it?
โ12-15-2023 06:30 AM
thanks... I went through the link that @rachelnatik suggested and that I had missed previously and that was exactly what I needed...
โ12-15-2023 07:01 AM - edited โ12-15-2023 07:08 AM
Ok @johnw , just a quick comment. In the proposed solution, you are iterating over each of the Opportunity Products instead of creating the Sales Order in Epicor in batch, right? This solution, depending on the number of Opporunity Products and Sales Orders may consume a large number of tasks. My question is, instead of getting all the Opportunity Products in one action, have you tried to make 2 different searches filtering by Company using one of the following actions:
If you are using the "Search records" Action (simpler), you should be able to see the newly created custom field for Company in Salesforce. Ensure that the user you are using in the Workato SFDC connection has permission to access this field. Additionally, don't forget to refresh the recipe schema.
By obtaining the results in this manner, using two separate lists, you will be able to create the Sales Order in Epicor in batches through two different actions. This approach will require fewer tasks compared to the previous method.
Regards
โ12-15-2023 07:47 AM
ok this is what I was looking for... I think this will work better because I was wondering what was going to happen with tasks... I was hoping that each iteration of adding to the list wasn't going to be a task... but you confirmed my fear