Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Migrate POS Extension

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Migrate POS

Extension to the
Commerce SDK

Luke Graham
Mugunthan Mani
1
Dynamics 365 Product
guidance
Implementation Guide General Case
guidance studies
Collective experience gained through
thousands of Dynamics 365 implementations

References to Guide Checklists


other guidance Experience

Highlights Recommended
deliverables
Conceptual
graphic
support

Available at: https://aka.ms/d365implementationguide


2
Agenda
❑ Overview of POS Extension Migration process.
❑ Changed and Unchanged Code Components for migration.
❑ Migration and code sharing Deep dive.
❑ Troubleshoot Extensions.
❑ Session Takeaways
❑ Q & A.

3
Migrate to Commerce SDK

4
Why?

Benefits
❑ Seamless update experience.

❑ Improved performance using the new ASP. Net Core 3.1.

❑ Sample Extensions are published to GitHub

❑ The new Sealed installers are headless.

❑ Automated packaging and configuration of extensions.

❑ Improved build times.

❑ Improved Dev experience, using VS Code for CSU extensions.

5
Timeline

Retail SDK will be deprecated on Oct 2022.

❑ Extension can continue to use Retail SDK and deploy the extension package generated in Retail SDK till Oct
2022.

❑ After Oct 2022, only Commerce SDK will be published and supported for extension deployment.

6
Prerequisites

Local Development Environment

❑ Setup up Commerce in LCS Development Environment - Dynamics365Commerce.ScaleUnit/src/ScaleUnitSample at release/9.33


· microsoft/Dynamics365Commerce.ScaleUnit (github.com)
❑ This includes channel database with demo data or setup a full local development environment with Async client for data
synchronization.

❑ POS - https://docs.microsoft.com/en-us/dynamics365/commerce/dev-itpro/pos-extension/pos-extension-getting-started#set-up-the-pos-
development-environment

Commerce SDK
❑ Packages – Public feed
https://pkgs.dev.azure.com/commerce-partner/Registry/_packaging/dynamics365-commerce/nuget/v3/index.json

❑ Samples - GitHub
microsoft/Dynamics365Commerce.ScaleUnit: Repository for hosting the Dynamics 365 Commerce ScaleUnit Samples (github.com)

microsoft/Dynamics365Commerce.InStore: Repository for hosting the Dynamics 365 Commerce in store Samples (github.com)

7
Sealed Installers

Published in LCS
https://lcs.dynamics.com/V2/SharedAssetLibrary

Prerequisites
❑ Uninstall the legacy installers.
❑ Deploy the new installer and Activate the app.

8
Migrate to the Commerce SDK
https://docs.microsoft.com/en-us/dynamics365/commerce/dev-itpro/retail-sdk/migrate-commerce-sdk

Commerce and Retail SDK


Component Commerce SDK Retail SDK

Samples Samples are published on GitHub. Samples are published in the \Sample extension folder in
the Retail SDK.
Packages or reference Packages are published to the public feed and can be Reference libraries and packages that are required for
libraries consumed via NuGet. Commerce development are available in the /Pkgs folder in
the Retail SDK.
Deployable packages Cloud Scale unit package and separate installers for Combined Retail deployable package.
extensions.
Updates To update the extensions, consume the latest package Updates must be done from LCS. The LCS update process
that is available in the public feed must be followed.

9
Migrate to the Commerce SDK

CRT and API extensions


❑ Updated the project to .NET standard 2.0
❑ Edit the project file to consume from the public feed.
❑ For API extend from IController and EDMMODEL implementation is not required.

Channel Database:
❑ No changes required but packaged part of the Cloud Scale unit extensions and installers.

Hardware Station:
❑ Extend from IController

10
Migrate to the Commerce SDK

POS SDK
Component Commerce SDK

POS app and Extension project No POS app or extension project, samples templates available in GitHub to create
extension
POS API Removed reference to knockout.js, Pos.UI.Sdk library is obsolete. Instead use
POSApi/Consume/Controls.
Deployable packages Separate extension installer for MPOS and CPOS is packaged part of Cloud Scale
unit and Scale unit installer.

11
Migrate to the Commerce SDK

POS Extension migration – No Code changes required.


Extension components

POS Operations

Triggers

Request handlers

Consume APIs

View extensions (If you consumed POS UI SDK, then code is


required).
Custom Dialogs

Custom controls

12
Migrate to the Commerce SDK

POS Extension migration


Extension components Code changes

POS Controls - Pos.UI.Sdk Pos.UI.Sdk library is obsolete. Instead use POSApi/Consume/Controls.

Knockout.js Removed reference to knockout.js, there is no global ko object, use your own third-
party library.
Custom view Extend from CustomViewControllerBase instead of ExtensionViewControllerBase,
Header and Navigation bar are visible by default.
Load Extension using the CRT trigger Instead of extension.json, implement the CRT
GetExtensionPackageDefinitionsRequest trigger.

13
Migrate to the Commerce SDK

POS Code migration


Projects Type Description

POS Extensions csproj Sample project contains all the POS extensions.

This project will be shared between Cloud POS and


Modern POS.
Modern POS jsproj Sample project to generate the POS appx, proxy and
Commerce runtime settings, and sign the appx.
Modern POS Installer csproj Sample project to generate the installer.

Scale unit csproj Sample project to generate the Cloud POS deployment
package for Cloud Scale unit.

14
Sample Extension Code Migration Walkthrough.

15
Migrate to
Commerce Sdk with
continued Retail Sdk
support
• Why?
• Not all customers will switch to
Commerce SDK at once
• ~6 month period ISV solutions may
need to support both models
• Enable customers to migrate CSU
extensions first & MPOS second
• Enable continued updates through
the Retail SDK while migration is in
progress

16
One Approach
 Create a Commerce Sdk folder/solution in the
same repo as the Retail Sdk solution
 Retail Sdk & Commerce Sdk solutions have
separate folder structure
 No references from the Commerce Sdk to the
How to Retail Sdk
support  Source files are moved to the Commerce Sdk
solution/folders
Commerce &  Retail Sdk solution links to the new location in the
Commerce Sdk folder
Retail Sdks Benefits
 No code duplication between Retail Sdk &
Commerce Sdk
 Migrating components in order
 Enable easy deletion of Retail SDK in the future

17
Migrating the Store Hours Sample

1 2 3 4
Update the Store Hours Move the Commerce Move the POS Create Installer &
Repo to add the Runtime, Retail Server & Extensions to the Packaging Projects in
folder/project structure Channel Database Commerce Sdk Commerce Sdk
for the Commerce Sdk Extensions to the
solution Commerce Sdk

18
Troubleshoot Extensions

19
Troubleshoot Extensions
❑ Use JavaScript Console.

❑ Extensions Packages not showing/loading in the settings view


❑ Validate CRT Trigger implementation.
❑ Manifest formatting.

❑ Windows compatibility issue


❑ Packages not supported in UWP app.

❑ Use GitHub to report and search issues.


❑ Not able to compile the sample project in GitHub because of the Certificate issue.

20
Key Takeaways
❑ Retail SDK is getting deprecated in Oct 2022.
❑ Code sharing between Retail SDK and Commerce SDK.
❑ Sealed installers.
❑ GitHub issues.

21
Upcoming Tech talks
Tech talk title Date Persona

Deep dive on Commerce Extension packaging and Dec 14th, 2021 Learn how to package Commerce extension using Developer, Technical
Azure DevOps Build pipeline setup. the Commerce SDK and setup Azure DevOps build consultant and Architect.
pipeline to build and generate packages for the
Commerce extensions.
Hardware Station Extension deep dive with the Jan 12th or 13th Deep dive on how to customize the Hardware Developer, Technical
Commerce SDK TBD station (HWS) to integrate with Payment terminal or consultant and Architect.
hardware device with Commerce SDK.
Migrate Commerce Runtime and Headless Jan 26th or 27th Learn how to migrate the Commerce runtime and Developer, Technical
Commerce (Retail Server) extension to the TBD Headless Commerce extension to the Commerce consultant and Architect.
Commerce SDK SDK.

22
Q&A

23

You might also like