Capture1

Overview of Dynamics 365 Retail SDK:

To start with, let’s discuss folders & its purpose which exist in retail SDK folder.

  1. Assets

Contains configuration files like commerceRuntime.config etc.

  1. BuildTools

Contains files like customization.settings which have all information regarding build.

  1. CommerceRuntime

Contain a visual studio solution commerceRutime.sln, all customized logic for retail POS can be written & tested here by extending this project.

  1. Database

Contains shared database scripts.

  1. Documents

Contains documentation for Retail SDK sample. A PDF file ‘AX7 Retail Sdk Handbook’ is here which have detailed information about retail SDK components & its customization.

  1. HardwareStation

Contain a visual studio solution HardwareStation.sln

  1. OnlineStore

Contain a visual studio solution OnlineStore.sln.

  1. Packages

Contains multiple projects for project creation.

  1. Payments

Contain visual studio solution PaymentSDK.sln. This folder have different samples to help with implementing different payment methods & payment SDK connectors.

  1. POS

Contains two visual studio solutions CloudPOS.sln & ModernPOS.sln

  • Cloud POS is a browser-based POS, can be used on mobiles & PCs.
  • Retail Modern POS(MPOS) can be used on clients such as PCs, tablets, and phones to process sales transactions, customer orders, and daily operations, and to perform inventory management.
  1. References

All dlls or binaries exist here that are being generated by Retail SDK. All related Projects dlls are found here.

  1. SampleExtensions

It contains sample extension of different components of SDK. I went through Commerce Runtime (CRT) sample extension which I will be discussing here.

  1. proj (File)

A file that directs build order 

 Capture1

Simplest & easiest way to get latest dlls/binaries of multiple solutions of retail SDK can be with simple msbuild command at retail SDK root. All new dlls would be then dropped to References Folder as discussed previously.

Capture2

  1. Microsoft-version.txt

It contains Microsoft’s version information of SDK. This should not be edited.

 

CRT Sample Extension:

There are few sample projects provided in retail SDK among which I tried CrossLoyalty

Consider that there are 2 retailers, AdventureWorks and Contoso. As a part of a deal, Contoso retailer will accept loyalty points of AdventureWorks. The sample shows how to create a simple new CRT service and call it once a button in MPOS is clicked. It simulates the cross loyalty scenario. I will be give an insight of CRT service code here in this space.

Request

Here is request class which expects a loyalty card number.

Capture3

Response

Here is response class which returns discount against loyalty card number.

 Capture4

Service

Here is actual service which “CrossLoyalityCardServices.cs” returns discount as per card number.

Capture5

Program.cs

CRT service can be tested here at host here without getting it through POS.

Capture6

Once you are done with CRT  you need to register it in commerceruntime.config as higlighted.

Capture7

Then you need to add CRT dll extension to customization.settings.

Capture8

Then you can test code in CRT test host. Furthermore there are many steps ahead to get it through POS & simulate scenario which are mentioned at RetailSDK –> Documents –> SampleExtensionInstructions

Credits:

AX7 Retail Sdk Handbook

Leave a Reply

Recent Comments

    Archives

    Categories