
Hi all,
I have created a hardware ordering app, the app works like this:
1. Users orders x quantity of a predefined hardware item, this is added as a row in the 'Shopping Cart' collection. Each additional hardware item order is created as a new row in the 'Shopping Cart' collection. Each row costs are totaled up (quantity ordered by item price).
2. The user then reviews the rows of items ordered (gallery view - see image) checks out and completes a few more questions about delivery of the items.
3. The user then clicks 'Submit' and the 'Shopping Cart' rows are patched to the 'Hardware Orders' SharePoint list
4. I then have a Flow that starts an approval process and sends a number or emails each time a new row is added to the 'Hardware Orders' SharePoint list.
The issue I have is that the flow initiates each time a new row is patched, and a single order may have multiple rows generating many approvals and emails for a single order. I need to reduce this so that lonely one approval and set of emails (which detail the items patched in the email) is sent even if there are multiple rows patched.
My thoughts are to try and merge the collection rows into a single row once the shopping cart has been reviewed and then patch this into SharePoint as a single row? Are there any other clever ways of achieving what I need to, perhaps using flow? Any help or advise will be greatly appreciated.
Instead of triggering the Flow from when an item is created in SharePoint, why not trigger the flow from PowerApps
Your approver will get a PDF of the entire shopping cart and they can then approve or reject the entire order?
In your SP List, I will create two lists -
1. for order header like who ordered, what $ value, when ordered, approval status. This is where I will store PDF as well.
2. for order details, so for each order ID, what were the individual items.
Edit:
If you don't like PDF (and/or trigger from PowerApps), then you can have a Flow from when a SharePoint List item is created in order header List. This will be a single row for each order.