Migrate POS Extension To The Commerce SDK - Microsoft Dynamics

Transcription

Migrate POSExtension to theCommerce SDKLuke GrahamMugunthan Mani1

Dynamics 365Implementation GuideCollective experience gained throughthousands of Dynamics 365 idanceReferences toother supportChecklistsRecommendeddeliverablesAvailable at: https://aka.ms/d365implementationguide2

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 SDK4

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

TimelineRetail SDK will be deprecated on Oct 2022. Extension can continue to use Retail SDK and deploy the extension package generated in Retail SDK till Oct2022. After Oct 2022, only Commerce SDK will be published and supported for extension deployment.6

PrerequisitesLocal 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 datasynchronization. POS - rce SDK Packages – Public gistry/ packaging/dynamics365-commerce/nuget/v3/index.json Samples - GitHubmicrosoft/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 InstallersPublished in rerequisites Uninstall the legacy installers. Deploy the new installer and Activate the app.8

Migrate to the Commerce mmerce and Retail SDKComponentCommerce SDKRetail SDKSamplesSamples are published on GitHub.Samples are published in the \Sample extension folder inthe Retail SDK.Packages or referencelibrariesPackages are published to the public feed and can beconsumed via NuGet.Reference libraries and packages that are required forCommerce development are available in the /Pkgs folder inthe Retail SDK.Deployable packagesCloud Scale unit package and separate installers forextensions.Combined Retail deployable package.UpdatesTo update the extensions, consume the latest packagethat is available in the public feedUpdates must be done from LCS. The LCS update processmust be followed.9

Migrate to the Commerce SDKCRT 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 IController10

Migrate to the Commerce SDKPOS SDKComponentCommerce SDKPOS app and Extension projectNo POS app or extension project, samples templates available in GitHub to createextensionPOS APIRemoved reference to knockout.js, Pos.UI.Sdk library is obsolete. Instead usePOSApi/Consume/Controls.Deployable packagesSeparate extension installer for MPOS and CPOS is packaged part of Cloud Scaleunit and Scale unit installer.11

Migrate to the Commerce SDKPOS Extension migration – No Code changes required.Extension componentsPOS OperationsTriggersRequest handlersConsume APIsView extensions (If you consumed POS UI SDK, then code isrequired).Custom DialogsCustom controls12

Migrate to the Commerce SDKPOS Extension migrationExtension componentsCode changesPOS Controls - Pos.UI.SdkPos.UI.Sdk library is obsolete. Instead use POSApi/Consume/Controls.Knockout.jsRemoved reference to knockout.js, there is no global ko object, use your own thirdparty library.Custom viewExtend from CustomViewControllerBase instead of ExtensionViewControllerBase,Header and Navigation bar are visible by default.Load Extension using the CRT triggerInstead of extension.json, implement the CRTGetExtensionPackageDefinitionsRequest trigger.13

Migrate to the Commerce SDKPOS Code migrationProjectsTypeDescriptionPOS ExtensionscsprojSample project contains all the POS extensions.This project will be shared between Cloud POS andModern POS.Modern POSjsprojSample project to generate the POS appx, proxy andCommerce runtime settings, and sign the appx.Modern POS InstallercsprojSample project to generate the installer.Scale unitcsprojSample project to generate the Cloud POS deploymentpackage for Cloud Scale unit.14

Sample Extension Code Migration Walkthrough.15

Migrate toCommerce Sdk withcontinued Retail Sdksupport Why? Not all customers will switch toCommerce SDK at once 6 month period ISV solutions mayneed to support both models Enable customers to migrate CSUextensions first & MPOS second Enable continued updates throughthe Retail SDK while migration is inprogress16

How tosupportCommerce &Retail SdksOne Approach Create a Commerce Sdk folder/solution in thesame repo as the Retail Sdk solution Retail Sdk & Commerce Sdk solutions haveseparate folder structure No references from the Commerce Sdk to theRetail Sdk Source files are moved to the Commerce Sdksolution/folders Retail Sdk solution links to the new location in theCommerce Sdk folderBenefits No code duplication between Retail Sdk &Commerce Sdk Migrating components in order Enable easy deletion of Retail SDK in the future17

Migrating the Store Hours Sample12Update the Store HoursRepo to add thefolder/project structurefor the Commerce SdksolutionMove the CommerceRuntime, Retail Server &Channel DatabaseExtensions to theCommerce Sdk3Move the POSExtensions to theCommerce Sdk4Create Installer &Packaging Projects inCommerce Sdk18

Troubleshoot Extensions19

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 talksTech talk titleDateDeep dive on Commerce Extension packaging andAzure DevOps Build pipeline setup.Dec 14th, 2021Hardware Station Extension deep dive with theCommerce SDKJan 12th or 13thTBDMigrate Commerce Runtime and HeadlessCommerce (Retail Server) extension to theCommerce SDKJan 26th or 27thTBDPersonaLearn how to package Commerce extension usingthe Commerce SDK and setup Azure DevOps buildpipeline to build and generate packages for theCommerce extensions.Deep dive on how to customize the Hardwarestation (HWS) to integrate with Payment terminal orhardware device with Commerce SDK.Learn how to migrate the Commerce runtime andHeadless Commerce extension to the CommerceSDK.Developer, Technicalconsultant and Architect.Developer, Technicalconsultant and Architect.Developer, Technicalconsultant and Architect.22

Q&A23

6, 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. 7, Prerequisites, Local Development Environment,