Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Get retail transaction error message in OData

(0) ShareShare
ReportReport
Posted on by 38

I'm using OData requests to get informations of sales order in retail transactions (the sales orders are created using the Commerce/CSU API, then a job creates the retail transaction, then another job synchronize them in F&O headquarter).

When the synchronization fails, I can get the status in the RetailTransactionsAuditable entity (field is AsynchronousOrderStatus). But I don't know where I can find the error message displayed in the F&O user interface. Do you guys know which data entity it is?

Here's a example of a failed retail transaction (menu is "Retail and Commerce" > "Inquiries and reports" > "Online store transactions" :

pastedimage1678356403116v1.png

And here's the OData request to get the details:

GET /data/RetailTransactionsAuditable?cross-company=true&$filter=TransactionId eq 'CBtsToRKWv0LGyOm0y9veqM5yECr1snm'

{
"@odata.context": "">test.sandbox.operations.dynamics.com/.../$metadata
"value": [
{
"@odata.etag": "W/\"JzEsNTYzNzE0NTM0ODsyMDc1NjI2NTMsNTYzNzE1MjgyOSc=\"",
"dataAreaId": "hfxx",
"OperatingUnitNumber": "00000006",
"StoreNumber": "",
"RegisterNumber": "",
"TransactionId": "CBtsToRKWv0LGyOm0y9veqM5yECr1snm",
"TimeWhenTransactionClosed": 54523,
"IsTaxExemptedForPriceInclusive": "Yes",
"OperatingUnitRecId": 5637148336,
"OperatorID": "",
"DiscountAmount": 0,
"ModeOfDelivery": "FED-Nation",
"NetPrice": -59.18,
"LastValidationTime": "1900-01-01T00:00:00Z",
"TotalManualDiscountPercentage": 0,
"CustomerAccount": "CS929000",
"BusinessDate": "2023-02-28T12:00:00Z",
"TransactionOrderType": "SaflesOrder",
"AsynchronousOrderStatus": "Failed",
"ChannelReferenceId": "0CAB8D5MORGA",
"TransactionDate": "2023-02-28T12:00:00Z",
"RequestedReceiptDate": "2023-02-28T12:00:00Z",
"PaymentAmount": 0,
"SalesOrder": "",
"NumberOfPaymentLines": 1,
"Comment": "",
"Warehouse": "PON",
"GiftCardActiveFrom": "1900-01-01T00:00:00Z",
"TransactionType": "PendingSalesOrder",
"RequestedShipDate": "2023-02-28T12:00:00Z",
"EntryStatus": "None",
"CreatedAtRegister": "",
"GiftCardBalance": 0,
"IsTaxIncludedInPrice": "No",
"FiscalDocumentId": "",
"InvoiceComment": "",
"TaxCalculationType": "Regular",
"DiscountAmountExcludingTax": 0,
"GiftCardIdMasked": "",
"ValidationStatus": "None",
"LoyaltyCardNumber": "",
"FiscalSerialId": "",
"TransCode": "None",
"Site": "",
"GiftCardExpireDate": "1900-01-01T12:00:00Z",
"NetAmount": -69.78,
"NumberOfProducts": 2,
"Description": "",
"SkipAggregation": "No",
"CustomerAccountAsync": "",
"SalesPaymentDifference": 69.78,
"SuspendedTransactionId": "",
"Invoice": "",
"ExchangeRate": 100,
"SalesInvoiceAmount": 0,
"TotalDiscountAmount": 0,
"NumberOfProductLines": 2,
"SalesGroup": "",
"CustomerDiscount": 0,
"SaleOnAccount": "No",
"ShiftRegisterID": "",
"IncomeExpenseAmount": 0,
"StatementNumber": "",
"Channel": 5637144581,
"GrossAmount": -69.78,
"ReceiptEmail": "test@test.com",
"TransactionTime": 54522,
"CreatedOffline": "No",
"StatementCode": "",
"GiftCardIssueAmount": 0,
"ShiftID": 0,
"Currency": "EUR",
"SaleIsReturnSale": "No",
"ReceiptNumber": "",
"FinancialDimensionDisplayValue": "",
"GiftCardHistoryDetails": "",
"TotalManualDiscountAmount": 0
}
]
}

We can see the status in the response: "AsynchronousOrderStatus": "Failed". But I can't find the error message.

  • JuniorD Profile Picture
    38 on at
    RE: Get retail transaction error message in OData

    Idea suggested. See https://experience.dynamics.com/ideas/idea/?ideaid=c88699dc-20c7-ed11-9ac7-0003ff45ac6d

  • Suggested answer
    huijij Profile Picture
    19,811 on at
    RE: Get retail transaction error message in OData

    I'm afraid it is not available for now. But you can create a new idea through the below URL, then ask your colleagues to raise up the votes.  

    experience.dynamics.com/.../

    Our product team has direct visibility of these ideas and they will implement it on the basis of the highest number of votes received.

    Best Regards,

  • JuniorD Profile Picture
    38 on at
    RE: Get retail transaction error message in OData

    "you can customize a new one according to your requirements."

    So I need to create a new data entity based on "RetailTransactionsAuditable", add a field, fill it using X++ code and use this entity in OData? Just to get the error details?

    That seems over-complicated. Why Microsoft does not provide this out of the box?

    Anyway, thanks for the response but I will probably don't do it, it's not worth the shot.

  • huijij Profile Picture
    19,811 on at
    RE: Get retail transaction error message in OData

    All fields of the current OData 'RetailTransactionsAuditable' are already displayed, but only the error status is provided without detailed error information. If you want to see detailed error information in the OData, you can customize a new one according to your requirements.

  • JuniorD Profile Picture
    38 on at
    RE: Get retail transaction error message in OData

    Hi,

    Thanks for the response, but this definitely not answer my question. I would like to know is: "how to get a retail transaction synchronization error message (like shown in the screenshot) using an OData API request"

  • huijij Profile Picture
    19,811 on at
    RE: Get retail transaction error message in OData

    Hi sir,

    I think the methods mentioned in the old thread that you can refer to.

    community.dynamics.com/.../the-odata-api-is-not-returning-any-error-code-for-errors-to-handle-based-on-error-codes

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 565

#2
Martin Dráb Profile Picture

Martin Dráb 536 Most Valuable Professional

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 402 Super User 2025 Season 1

Product updates

Dynamics 365 release plans