Illustration of a futuristic laptop displaying a glowing globe dashboard, surrounded by tools and gadgets, illustrating the Contoso demo data tool.

Contoso Demo Data Tool and How to Create Custom one

3 min read

The demo tool and data for service scenarios in Business Central help partners demonstrate its advanced capabilities. The Contoso Coffee app provides setup and demo data, supporting various service scenarios such as creating service items, placing loaners, registering time, invoicing, and managing service contracts. The tool identifies dependencies automatically and allows configurations per module.

You have initially Contoso Coffee Demo Dataset, and for different country localizations you will need additional app which adds country specific content on top of the base application. Those localizations Apps can be installed from AppSource:

AppSource search results listing the Contoso Coffee Demo Dataset app for each country localization

Upon creating Business Central SaaS environment, you will get by default Contoso Coffee Demo Dataset app, if you are running supported localization, you will get one more app in addition for the localization part. For example:

Installed Extensions filtered to contoso, showing the base, German and sustainability demo datasets

For created DE Sandbox, we automatically get Contoso Coffee Demo Dataset (This app delivers demo data for the base application) and one more for DE Localization (This app adds country-specific content on top of the base application).

If you are missing Contoso Coffiee Demo Dataset app, you can install it as YZhums described ways to install AppSource Apps, for this one you can use:

Text
?aid= FIN&page=2503&filter=%27ID%27%20IS%20%275a0b41e9-7a42-4123-d521-2265186cfb31%27&signInRedirected=1

Upon creating new company in Evaluation or Production:

Create New Company with the data options list open on Evaluation and Production

Create New Company offering to install the Contoso demo data app on top of the sample data

There is additional Boolean to check if you would like to install Contoso Demo Data App.

💡 Point of this Demo Tool is also to move away slowly from using Rapid Start Packages to generate demo data.

In future point will be to have possibility to choose which Demo Data Modules you would like to generate, since Rapid Start won’t be used for that part anymore.

A future Create New Company step offering per-module demo data toggles for setup, manufacturing and warehousing

You can access it simply by searching for Demo Tool:

Searching for Demo Tool in Tell me, which finds the Contoso Demo Tool page

By default, currently there are following demo data modules covered:

The Contoso Demo Tool listing its modules, from Common and Warehouse to E-Document

💡 More Demo Data modules are coming.

Currently you can read more about Manufacturing, Warehousing and Service Module scenarios for demo data here. Jeremy Vyska has created additional documentation for Service and Jobs scenario, Pull Request is still open but you can expect soon enough to be available on Docs.

Starting from Common Module, it’s used to prepare general settings that Business Central requires. For example, things like number series. Note that Common Module contains supplementary data for the Warehouse, Manufacturing, Service scenarios only. It is not recommended to run it in isolation.

For Common Module you can go to Configure to setup parameters which will be used for Demo Data generation:

The Configure action on the Contoso Demo Tool, opened for the Common Module

The Contoso Coffee Demo Data setup page, with starting year, company type, country and price factor

Speaking about Localization Demo Data App on top, if we go to Warehouse Module Setup and click on Configure:

Warehouse Module Setup, its locations and master data filled with German localization values

You can notice that Location Names are created in German, and whole Demo Data is adjusted to German localization.

Technical part

Its OPENSOURCED! You can get more insights on GitHub if you want to get deeper look into functionality:

The Contoso Coffee Demo Dataset source on GitHub, with its DemoData and DemoTool folders

Data layer’s structure is split to:

  • Setup
  • Master
  • Transactional
  • Historical

The tool code generating each demo layer in turn: setup, master, transactional and historical data

And structure of each module should follow that, for example in Fixed Assed Module:

The Fixed Asset module folder on GitHub, ordered as setup data, master data and transactions

Inside each module on main level codeunit you can take a look on procedures CreateSetupData, CreateMasterData, CreateHistoricalData, and CreateTransactionalData. On that way you will know what data is created.

💡 Demo Data Modules should work together and separately!

Create Custom Demo Data Module

app.json for a custom demo data app, declaring a dependency on the Contoso Coffee Demo Dataset

Define dependency to Contoso Coffee Demo Dataset:

An enum extension registering a Custom Demo Data Module against the Contoso interface

Create first Enum Extension on Contoso Demo Data Module:

The same enum extension with its implementation mapping

Than move on custom Codeunit which implements Contoso Demo Data Module interface:

The codeunit implementing the Contoso Demo Data Module interface, one procedure per demo data layer

Publish the App and you will see new Demo Data Module in the page:

The Contoso Demo Tool after publishing, with the Custom Demo Data Module listed alongside Microsoft's

Try it out for your apps and get most of this functionality!

Related posts

Comments

    Leave a comment

    Reviewed before it appears.