Mina produkter
Hjälp
Margarita G
CONTRIBUTOR **

Create Purchase Order from Sales Order through API

av Margarita G

Hello, we are using the API and need to convert a Sales Order into a  Purchase Order. I can make this action in web  front, but i don´t know if this action is allowed through API.  Could you please tell me witch  API method do i need to use?

 

Basically to do the next through API:

 

po.jpg

Thanks

 

Margarita

 

 

11 SVAR 11
Godkänd lösning
Mikael Björk
PARTNER

av Mikael Björk

Maybe the solution is to create a new purchase order based on the products on the sales order. You do not convert a sales order to a purchase order.
There may be different suppliers on the different products so there may even be several purchase orders from one sales order.
You also need to know if it should be a drop-shipment or a stock order for group delivery to the end customer.


_______________
Mikael Björk
VD / CEO
Traventus AB



Customer Success Partner of the Year
Godkänd lösning
Thomas Mostrom
PARTNER

av Thomas Mostrom (Uppdaterad ‎14-08-2020 08:22 av Thomas Mostrom PARTNER )

Hi

 

As Mikael explains there are more then one Step from SO to PO

 

This means that if you fetch SO orders with the API and want to create PO orders through the API, you need to also update the connection between them to be able to handle them in Visma.net correctly

  • On PO you need to add SO number
  • On SO you need to add PO number that have been created

 

Or you can use routines to handle this automatically inside Visma.net

 

1. SalesOrder (Screen SO301000)
     Create the Sales Order
     Edit value PO Source on rows to Purchase to Order

 

2. Create Purchase Orders (Screen PO505000)
     Routine that creates purchase orders from
        a. Sales Orders (Purchase to Order or Drop Shipment)
        b. Prepare Replenishment

 

3. Purchase Order (Screen PO301000)
     Created Purchase Order

 

Thomas Moström
Kristofer_
CHAMPION ***

av Kristofer_

Hej!

 

Jag hittar inte hur jag länkar säljordern till inköpsordern/inköpsordrarna via APIet. Hur gör man?

Kristofer_
CHAMPION ***

av Kristofer_

@Mikael Björk @Thomas Mostrom How do you link the sales order lines to the purchase order through the API?

Thomas Mostrom
PARTNER

av Thomas Mostrom

Hi, Kristofer

 

More information regarding this You will find in the Developer forum. But you need to be certified in Visma.net API to get access to this forum.

 

In short

SalesOrder

When creating the SO Sales Order you need the Orderlines on the SalesOrder be marked as DropShipment, Vendor etc.

 

Purchase Order

If you don´t use the processes inside Visma.net and creating the PO Purchase Order from API you need to enter values in 2 different Tabs

 

  • Shipping Instructions
  • Other Information

 

For example, on the Tab Other Information fields are in API
"salesOrderType": "string",
"salesOrderNbr": "string",

 

On the Sales Order, you will first see the link when the Purchase Order is moved forward to Purchase Receipts and Released.

 

image.png

 

image.png

 

image.png

Thomas Moström
Kristofer_
CHAMPION ***

av Kristofer_

Great, thank you Thomas! This sounds very interesting. I'll try this!

Kristofer_
CHAMPION ***

av Kristofer_

@Thomas Mostrom I don't manage to get the sales order closed. I add the sales order number on the purchase order and create a purchase receipt. The purchase order is then closed, but it doesn't close the sales order.

Thomas Mostrom
PARTNER

av Thomas Mostrom

Hi, again

 

The SalesOrder will be closed after you create the Customer invoice and Release it.

 

image.png

 

 

Thomas Moström
Kristofer_
CHAMPION ***

av Kristofer_

OK, so do we also need to create the customer invoice through the API? Not using the Visma function that creates customer invoices from closed sales orders?

Thomas Mostrom
PARTNER

av Thomas Mostrom

No,

You can use and setup the automatic schedules to execute Routines in Visma.net for this.

 

image.png

Thomas Moström
Mikael Björk
PARTNER

av Mikael Björk

Hej Kristofer_.

Tyvärr har jag inte utvecklarkompetens, vi hoppas någon med den kan hjälpa till. Alternativt är att ställa frågan till er partner.


_______________
Mikael Björk
VD / CEO
Traventus AB



Customer Success Partner of the Year

Få uppdateringar på det här inlägget i din inkorg

Klicka på de tre prickarna till höger i inlägget/artikeln och välj Prenumerera.

Läs mer om prenumeration här