Hello all,
I am seeking some guidance regarding a specific scenario/use case need from a client. I will do my best to detail the scenario below, capture my understanding of what needs to be accomplished to provide such functionality, and am seeking guidance/clarification on what I'm missing. The client has just the Online Store, there is no brick-and-mortar store, so this scenario/inquiry will relate specifically to online store functionality, the SDK where modules can be customized, and the RetailSDK.
Scenario:
- User places order on website.
- User navigates to order history.
- User navigates to order details of specific order.
- User clicks button added to the Order Details module that calls an API and gets back a String.
- The String is stored in a Sales Order Attribute.
- If the User later clicks the same button, the code stored in the Sales Order Attribute is called and displayed to the User.
Sales Order Attributes:
- I understand that order attributes must be defined and assigned to the channel in HQ. This step is completed. To achieve this, we followed the below documentation.
- There is an attribute set at the sales line level that can store a string of text.
- I want to extend the attribute to add business logic at the website level of the online store to interact with this attribute field.
- We will be running a function on a button on the order details page to handle the API call and parse the response at the website level.
- I want to store the parsed string response in this sales order attribute.
- Future button clicks on the order details page will check if the attribute field is empty.
- If the attribute field is not empty, the value held is returned.
- If the attribute field is empty, the button will run its API call and response parsing logic.
- I have reviewed the documentation that goes further into depth regarding extending attributes to add business logic in CRT at the below:
- https://learn.microsoft.com/en-us/dynamics365/commerce/dev-itpro/order-attributes#extend-attributes-to-add-business-logic-in-crt
- and have visited the documentation that covers CRT extensibility and triggers:
- What I don't understand here is, do we need to extend anything else to accomplish our scenario besides CRT?
- Do we need to also extend the Scale Unit or the Channel DB?
- Do we need to make customizations to the CDX?
- These are the things that are not exactly clear to me and I'm hoping for some feedback.
- https://learn.microsoft.com/en-us/dynamics365/commerce/dev-itpro/order-attributes#extend-attributes-to-add-business-logic-in-crt
- I have reviewed the documentation that goes further into depth regarding extending attributes to add business logic in CRT at the below:
If I can offer any clarification, please let me know. If my understanding is completely off and to achieve our desired functionality extending the CRT is not the direction to take, any feedback pointing me in the correct direction would be greatly appreciated.
Thanks,
Josh R.

Report
All responses (
Answers (