Hi there, I am looking for an easy way to create opportunity line items from an excel sheet. My dream solution would be to create a screen flow that is started by a button on the opportunity record page. When the user clicks that button, a window opens where an excel sheet can be uploaded per drag and drop. The excel sheet would contain the article number, the quantity and the sales price. The flow would then match the article number with the products in our pricebook and create opportunity line items with the corresponding quantity and sales price from the excel sheet and add those to the opportunity where the flow was started. I need a simple solution that is easy to use for all users. It would not make sense to use an extra piece of software like dataloader or similar. Is that somehow possible as in my dream? Or are there any other simple solutions on the app store that would achieve this? Any suggestions are highly appreciated!
I agree with you, you can use "File Upload" component in Screen Flows. You'll need a way to read and process the data within the uploaded file. Standard Screen Flows don't have built-in functionality to directly parse Excel files. You need to write Apex code to process the uploaded file (after it's saved as a Salesforce File), extract the data (Article Number, Quantity, Sales Price), and then create the Opportunity Line Item records.
I would suggest three options here, check out these.
- Implement Flow with Apex code: Create a Screen Flow that allows users to upload an Excel or CSV file. Utilize an Apex class to read and process the file data, then create the Opportunity Line Item records.
- Implement LWC component to upload and process: Develop an LWC that handles the file upload directly and incorporates JavaScript and Apex to parse the Excel data and create the Opportunity Line Items.
- Use third party App exchange products: Leverage pre-built solutions from the AppExchange specifically designed for data import and Opportunity Line Item creation.