Power BI Embedded Contoso Sales Demo is a demo application which showcases Power BI Embedded capabilities
Перейти к файлу
ali-hamud a2c27d16d8
Merge pull request #7 from microsoft/gh-mirror
Mirror internal ADO
2021-03-08 14:57:59 +02:00
ContosoSalesDemo Merged PR 142556: Upload PBIT and update README 2021-03-04 05:19:45 +00:00
.gitignore Merge remote-tracking branch 'powerbi/master' into main 2020-09-21 16:16:14 +03:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2020-08-18 03:33:34 -07:00
ContosoSalesDemo.sln Merged PR 112891: Rename project to 'ContosoSalesDemo' 2020-09-18 13:40:02 +00:00
LICENSE Initial LICENSE commit 2020-08-18 03:33:35 -07:00
LICENSE.txt Merged PR 105268: Add README and LICENSE 2020-09-14 11:59:24 +00:00
README.md Merged PR 142556: Upload PBIT and update README 2021-03-04 05:19:45 +00:00
SECURITY.md Initial SECURITY.md commit 2020-08-18 03:33:38 -07:00

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:

  1. Open the Contoso Sales Demo application.
  2. Select Salesperson.
  3. 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 applications 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 applications 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:

  1. 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"
  2. Import the Microsoft Dataverse schema
    Note: Insert data as required

Power BI report

  1. 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.

  2. 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

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.