a2c27d16d8
Mirror internal ADO |
||
---|---|---|
ContosoSalesDemo | ||
.gitignore | ||
CODE_OF_CONDUCT.md | ||
ContosoSalesDemo.sln | ||
LICENSE | ||
LICENSE.txt | ||
README.md | ||
SECURITY.md |
README.md
Contoso Sales Demo is an application based on Power BI embedded analytics, demonstrating a sales management portal. The application empowers salespeople and sales managers to make business decisions based on data. Salespeople can monitor and track sales, leads, opportunities and accounts, and manage their calendars. Sales managers can view a summary of the salesforce performance, including sales history and individual accounts. The application also enables managers to provide salespeople with data driven insights, assisting them with their decision making.
Follow the steps below to get a first hand experience of the demo:
- Open the Contoso Sales Demo application.
- Select Salesperson.
- Select Enter in demo mode.
This will log you in as an anonymous user in the role of a salesperson, allowing you to use the app in read-only mode.
Embedded analytics features
This section lists the embedded analytics features demonstrated by the Contoso Sales Demo application.
UI features
Users can do the following in the application’s user interface:
-
Show/hide visuals.
-
Change the layout of report visuals.
-
Enable or disable Q&A support in the report.
-
Apply custom themes to the embedded report, during runtime.
Functionality
Contoso Sales Demo functionalities based on embedded analytics:
-
Exporting reports to PDF, PPT and PNG formats.
-
Showing edit options in the visual context menu.
-
Binding custom actions to button clicks.
-
Editing (insert/update) data in a table using writeback operations. In the Contoso Sales Demo application you can add data to a database directly from the UI.
-
Service principal based authentication. This authentication method is recommended for accessing Power BI and Microsoft Dataverse REST APIs.
Integration
Contoso Sales Demo integration with other Microsoft databases and libraries:
-
Microsoft Dataverse. The application’s integration can be extended to other databases.
-
MSAL.NET used for service principal authentication.
Prerequisites
Cloud resources
Azure | Power BI | Microsoft Dataverse |
---|---|---|
App Service for hosting the application Key Vault for storing certificates/secrets Azure AD app for creating a service principal object Application Insights for telemetry |
Power BI service license for hosting reports Power BI Embedded capacity for embedding report |
Dynamics 365 license for using Microsoft Dataverse as a data source |
Microsoft Dataverse Database
This application is integrated with a Microsoft Dataverse database. Follow the steps below to setup your own Microsoft Dataverse database:
- Setup a Microsoft Dataverse environment
Note: Ensure TDS endpoint is enabled for the environment. It allows to connect to CDS using DQ in a Power BI report
Note: Set the prefix for the CDS Default Publisher to "crcb2" - Import the Microsoft Dataverse schema
Note: Insert data as required
Power BI report
-
The report ContosoSalesDemo.pbix can be used as a reference for development.
Note: This report is connected to a cached datasource using import mode.
Note: As this report is not connected to a Microsoft Dataverse database using Direct Query, it will not support writeback functionality. -
The Power BI template ContosoSalesDemo.pbit can be used as a reference for development.
Note: When you open this file, you would be prompted for Server and Database information. Please enter the corresponding details for your own D365 environment created in the previous step.
Note: This report uses "June Smith" as the salesperson in the definition of the Roles "Anonymous" and "Salesperson". Update the definition of these roles with the user who has the writeback permissions (i.e. corresponding to the Service Principal you are using for writeback).
Architecture
Software Dependencies
Client-side | Server-side |
---|---|
React TypeScript |
.NET 5 |
SDK/ API references
Power BI | Microsoft Dataverse |
---|---|
Power BI SDK | Create table Update table |
Browser support
-
Microsoft Edge
-
Google Chrome
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request (PR), a CLA-bot will automatically determine whether you need to provide a CLA and tag the PR appropriately (using functions such as label or comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ, or contact opencode@microsoft.com with any additional questions or comments.
License
This project is licensed under the MIT license, see LICENSE.