My Products
Help

How to handle and post alternateID the same InventoryItem on SalesOrder?

by Arne Salt_Amesto

Hi, 

 

We are trying to create an integration for a customer where we are posting sales orders at a certain way.

 

We are trying to post several alternateID's on the same InventoryItem (on different lines) for Sales Order. Then we get this errormessage: 

Ex. The value '151785' for the alternate ID is already used for another stock item.

 

When doing this directly in visma we can override the alternateID as we post new lines. We then get a message asking us to override current id. 

If the AleternateID exists in crossreferences for the inventoryitem we dont get the message to override. 

 

We are also getting the error message: Required property 'InventoryNumber' not set

We can see that the same InventoryImten already is posted to an existing order for the same customer, so can this message be related to the alternateID?

 

 

6 REPLIES 6

by Magnus Johnsen

Hi,

Could you please send us the JSON as well as screenshots of how the items are setup in the UI, as well as screenshots and steps of how you would normally do this in the UI so that we our own enviroment in the same way.

Thank you. 

Where do you want me to send/attach this?

You can either attach it in a reply here, or send it to developersupport@visma.com.

Sendt email, we can have a call if thats the best way... 

Hi,

We have tested this now with the following scenario:

  • Stock item1 has alternate id's:
    • "test1"
    • "test2"
  • Stock item2 has alternate id's:
    • "test3"

In the UI it is ok to save lines for Item1 with id's "test1" and "test2".

 

  • If you try to use "test3", you'll get an error as it is already in use by another stock item:

 

  • If you do this via the API, the same error message is returned:
{
    "message": "Inventory error: The value 'Alternate4' for the alternate ID is already used for another stock item."
}

 

  • If you use an alternative Id that is not yet set in the cross reference table via the UI, it triggers a confirmation window to open.
  • If you do this via the API, the header of that window is returned:
{
    "message": "Substitute the previous cross reference information?"
}
 
This is not currently supported via the API.
If this is functionality that you need, we recommend that you make a post in the "Ideas" part of the forum.
Please describe your business need as detailed as possible.
This allows other users to vote for your suggestion, which in turn influences the development teams assessment process.
 

Thank you, we'll have a look at it and get back to you if more information is needed for us to test it.