Skip to main content

Notifications

Supply chain | Supply Chain Management, Commerce
Suggested answer

Commerce SDK Customization

Posted on by 45

Hi, I am a beginner at D365 Commerce. 

I have cloned D365 Commerce SDK from Dynamics 365 Commerce Github Repo. I have to fetch extension properties during the checkout process.

To do so I have added a post-trigger corresponding to CreateOrderFromCartRequest.

pastedimage1642076396857v2.png

The above trigger is supposed to fetch the custom property by leveraging the extension property of the request object.

This Commerce SDK is on my local machine and I am looking for a way to run it and test the functionality. 

Is there any way to run Commerce SDK locally and connect it to the commerce website?

Thanks 

Aman Soni

  • Aman Soni Profile Picture
    Aman Soni 45 on at
    RE: Commerce SDK Customization

    Hi,

    You can refer to https://docs.microsoft.com/en-us/dynamics365/commerce/dev-itpro/channel-db-extensions for channel DB extension so that you can add your custom properties corresponding to an existing table.

    To update the custom property in the extension table you can check https://docs.microsoft.com/en-us/dynamics365/commerce/dev-itpro/commerce-runtime-extensibility#scenario

    Once the above steps completed, you can refer https://docs.microsoft.com/en-us/dynamics365/commerce/dev-itpro/cdx-extensibility to pull/push the data from/to HQ or channel DB.

    Thanks,

    Aman

  • Pupadhyay Profile Picture
    Pupadhyay 85 on at
    RE: Commerce SDK Customization

    Hi ,

    I want to update customer property in D365 Fo from D365 commerce Signup. I am using triggers for updating existing fields .Please let me know the process for update custome field of custtable from trigger.

  • Aman Soni Profile Picture
    Aman Soni 45 on at
    RE: Commerce SDK Customization

    Hi Sam,

    I appreciate your response.

    I have already set up the commerce website and running with a node server on my local machine.

    In my case instead of Retail SDK, I am using Commerce SDK by referring Commerce SDK and have cloned the project from Github Commerce SDK Github REPO.

    My concern is If I have to implement any business logic corresponding to these API Commerce Scale Unit API then what should be the steps.

    As per my understanding till now, we should create a trigger for the corresponding request which is being served by the API. So I did the same in the commerce SDK project. 

    But now I want a way to test it whether it is going to work or not? Is it possible to debug the commerce SDK?

    Thanks,
    Aman Soni

  • Suggested answer
    Sam Jarawan Profile Picture
    Sam Jarawan on at
    RE: Commerce SDK Customization

    Hi Aman,

    Did you follow the steps here to install the SDK? Set up a development environment - Commerce | Dynamics 365 | Microsoft Docs

    You can then edit the .env file to point to an environment to test against: Configure a development environment (.env) file - Commerce | Dynamics 365 | Microsoft Docs

    This document goes into more details around setting up against a cloud environment: Configure an e-commerce development environment against a Commerce cloud environment - Commerce | Dynamics 365 | Microsoft Docs

    Or you can use MOCKs to test against: Test modules with module mocks - Commerce | Dynamics 365 | Microsoft Docs and Test modules by using page mocks - Commerce | Dynamics 365 | Microsoft Docs

    Hope that helps,

    Sam

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans