10

We use the Commerce (CSU) OData API to send orders from a home-made website in D365. Sometimes, the "Checkout" API request ends with success (HTTP 200) but the order is not created because of some advanced checks (for example: the product can not be sold in a specific country).

To detect these cases, we are sending requests on the RetailTransactionsAuditable data entity to detect which retail transaction is in error (the retrail transaction is created by 2 scheduled batch jobs: the job "P-0001" to create the retail transaction, and another job to synchronize all retail transactions in automatic).

If the value of the field AsynchronousOrderStatus is "Failed" then it means the sales order is in an error state. In this case, there is a very precise error message in the "Retail and Commerce" > "Inquiries and reports" > "Online store transactions" page. But this message is not accessible using OData requests. This is a problem for us because if the sales order contains 200 lines, we can't tell the customer which one failed.


So the idea is: add the "order error details" text value visible in the UI in a new field in the "RetailTransactionsAuditable" data entity.


See https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/481393/get-retail-transaction-error-message-in-odata

STATUS DETAILS
Needs Votes