Purchase Order Type Mismatch

This thread is now closed to new comments.
Some of the links and information provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
armh
Contributing Partner
5 Posts
Contributing Partner
Contributing Partner

5Posts

1Kudos

0Solutions

Purchase Order Type Mismatch

Hello,

 

We are having an issue where we have a Supplier setup as a 'ITEM' purchasing type.

 

However when any order is raised, when queried through the API, the PO is being returned on the service order endpoint.

 

our supplier:
https://ar1.api.myob.com/accountright/XXXXXXX/Contact/Supplier/ZZZZZZZ

 

 PrintedForm"CS Purchase Order"string
 PurchaseCommentnullstring
 PurchaseLayoutItemMYOB.AccountRight.SDK.Contracts.Version2.Contact.PurchaseLayoutType
 PurchaseOrderDeliveryNothingMYOB.AccountRight.SDK.Contracts.Version2.Sale.DocumentAction?
 ShippingMethodnullstring

 

The order returned
https://ar1.api.myob.com/accountright/XXXXXXX/Purchase/Order/Service/YYYYYY

 

We are attempting to integrate MYOB to our suppliers system, but to do so we need the inventory codes that are only available with an ITEM Purchase order line item payload.

 

Service type orders do not offer this.

 

Attached screenshot of the Order, shows that Items have been selected. Dispite this the order is still returned on the service endpoint

 

MicrosoftTeams-image (2).jpg
4 REPLIES 4
John_Dinning
Trusted User
71 Posts
Trusted User
Australia
Trusted User

71Posts

15Kudos

6Solutions

Re: Purchase Order Type Mismatch

How are you querying it through the API?

 

I have found (using the SDK) that if you use the Order endpoint to get all orders

https://developer.myob.com/api/accountright/v2/purchase/order/

an item order has an OrderType of 'Item'.

 

If you use the Order/Item endpoint to get just item orders

https://developer.myob.com/api/accountright/v2/purchase/order/order_item/

all the orders say they have an OrderType of 'Service'.

This appears to be a bug, but since you are only asking for Item Orders, just ignore it.

 

Does that help?

 

armh
Contributing Partner
5 Posts
Contributing Partner
Contributing Partner

5Posts

1Kudos

0Solutions

Re: Purchase Order Type Mismatch

Hi John, Thanks for the reply.

 

No, but it may confirm a bug.

 

We arent interested in service orders, we need the item orders to access the inventory par numvers/item codes against each line item. This then gets passed on you our supplier where the matching part numbers are used to generate an invoice in their system.

 

Because out 'item' type orders are returned on the service endpoint, this stuffs everything up, the service item model does not contain the inventory codes, just a narration, which cant be used with our supplier.

 

Our workflow:

- We are calling ite Item PO endpoint.

- Supplieris setup as an "Item" template/type.

- orders raised in myob are clearly of item type format (your prompted for inventory codes, the header of the form says "Purchases Edit Item")

- Yet when we call the sdk, we get NO orders on the item endpoint, and all orders on the service endpoint.

 

The po's should be returned on the items endpoint, but they arent.

 

Either a data issue or a sdk/api bug.

John_Dinning
Trusted User
71 Posts
Trusted User
Australia
Trusted User

71Posts

15Kudos

6Solutions

Re: Purchase Order Type Mismatch

Hi armh,

 

We only deal with item orders, and are getting the item orders by supplier using the item orders endpoint ok I believe.

Although, as I said, they are marked as service orders which is no doubt a bug and may be related.

I have also found that the Item Orders endpoint returns orders that have been converted to bills, which I don't think it should.

I think the API code in this area needs reviewing.

 

 

 

armh
Contributing Partner
5 Posts
Contributing Partner
Contributing Partner

5Posts

1Kudos

0Solutions

Re: Purchase Order Type Mismatch

I've setup a test supplier as an item type order template and raised po's all works fine, orders come through on the ItemOrder endpoint.

 

I call customer support they went through the order and supplier and all was set correctly and was indeed an Item Type po.

 

The api/sdk doesnt agree.

 

I've raised a ticket with API support, i suspect theres a data issue with the supplier card in question.

Didn't find your answer here?

Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post