Hi,
Building an integration with Shopify for a client. I am using custom fields to store the order ID keys and there is a PXCheckUnique in place on this field to prevent duplication.
#region UsrMAXXShopifyOrderID
[PXDBString(30)]
[PXCheckUnique(
Where = typeof(Where<SOOrderExt.usrMAXXShopifyOrderID,
Equal<Current<SOOrderExt.usrMAXXShopifyOrderID>>>))]
[PXUIField(DisplayName = "Shopify Order ID", Enabled = false)]
public string UsrMAXXShopifyOrderID { get; set; }
public abstract class usrMAXXShopifyOrderID : PX.Data.BQL.BqlString.Field<usrMAXXShopifyOrderID> { }
#endregionThis validation works as expected in the UI

However, if an identical request is made then in the response all Usr fields that are on the SOOrder object are null and the order is created without any of these fields created. (There is a Usr field on the SOLine that is still populated)
I have done integrations for other clients with the same set up and the behavior in these cases is that the API would return an error for the fields that field the PXCheckUnique and no order would be created.
Has anyone come across this before?
Simplified API request below, ShopifyCustomerID, ShopifyOrderID, ShopifyStoreID & Details/ShopifyLineItemID are the Usr fields. ShopifyOrderID id the only field with the PXCheckUnique property.
{
"OrderType": {
"value": "WS"
},
"CustomerID": {
"value": "CU165785"
},
"ShopifyCustomerID": {
"value": "6100247478401"
},
"ShopifyOrderID": {
"value": "4618371235969"
},
"ShopifyStoreID": {
"value": "STORE"
},
"CustomerOrder": {
"value": "SSO14612"
},
"CurrencyID": {
"value": "AUD"
},
"ExternalRef": {
"value": "4618371235969"
},
"Details": [
{
"Branch": {
"value": "VE04WEBSAL"
},
"WarehouseID": {
"value": "300MAIN"
},
"InventoryID": {
"value": "SON-CEAG240T"
},
"OrderQty": {
"value": 2
},
"UnitPrice": {
"value": 369
},
"DiscountAmount": {
"value": 0
},
"ManualDiscount": {
"value": true
},
"ShopifyLineItemID": {
"value": "11852975014017"
}
}
]
}