Need for Digital Invoice Generation:
Invoice generation process for small business generally is a hassle, as it is time-consuming and prone to errors. The process involves spending countless hours on manual data entry, printing and mailing invoices, and chasing payments. The organisation and their customers would also benefiting from a more efficient and convenient billing process, leading to a better overall experience.
Platform Setup:
- Connect the data connectors needed for the App a) Sharepoint Connector - Add the sharepoint list as a data source to PowerApp. The sharepoint list has some details that would be pulled to generate data related to invoices b) Office365Outlook Connector - This connector would be leveraged to
- Enable PDF function (preview) which would help you to create PDF outputs with screen / container controls
Setup and Tricks for Configuration
- Data selection scoping: In order to have smaller data transaction, the control leveraged is a drop down list item which pulls distinct values based on the customer name
Distinct("InvoiceSharepoint",'CustID~customer identifier')
I might have multiple Work / group of tasks performed for a specific customer so the second drop down list is now pulling all the unique task ID
Distinct(Filter(InvoiceSharepoint, 'CustID' = CustID.Selected.Result),TaskIDs)
the User experience would be as below where the associate would select the customer first and then the app will pull all the Tasks / orderID for which the Invoice would be generated subsequently
2.Add Container for datatable: Add the Datatable (Preview) to the container and filter the data to pull all the lineitems against the unique task ID selected by the user
Filter('InvoiceSharepoint', 'Title' = TaskIDs.SelectedText.Value)
The data scoping logic would be something like below
So the data scoping on an App would look something as below
3.PDF Magic and email - The last set is to Wrap the data on the container (Container10) as a PDF document and pushing that using the outlook send email function as an attachment.
Office365Outlook.SendEmailV2(User().Email,"PDF Invoice", "Here is your Invoice",
{Attachments:Table({
Name:"Invoice.PDF",ContentBytes:PDF(Container10)
}
)
}
)
The above magical code would wrap all the data in a container and push it as a PDF to the user.
Conclusion
Digital invoice generation can help small businesses offering logistics services to streamline their billing process, increase efficiency and improve cash flow. Power Platform could assist with automation with invoice generation
Product reference: