BunStackDocs

Integrations & API

ProSmart: order push

Send an order to ProSmart: settings, what the order includes, the push on fulfilment, lines that cannot be sent and duplicates.

Last updated · 10 min read

Where: the order, ⋯ Actions › Push to ProSmart. The settings are under Stack › ProSmart › Settings.

Send an order

  1. Open the order.
  2. Choose ⋯ Actions › Push to ProSmart.
  3. Read the preview.
  4. Press Create order. In Test the button reads Create order in Test.

BunStack creates an order in ProSmart. The order in BunStack gets a ProSmart card with ProSmart's order number.

The preview shows what BunStack sends: the environment, the customer number, the delivery recipient, the lines with price and discount, the discount code and the freight line. It also shows Ert ordernummer, Er referens and whether the order has already been sent to the environment.

The ProSmart card shows the environment, ProSmart's order number, Ert ordernummer and Er referens. It also shows the lines that were not sent, what ProSmart did not keep and the delivery. ProSmart's order number is also in the timeline.

Settings for the order

The settings are under On the ProSmart order · both environments and apply to both environments.

SettingWhat it doesDefault
Our order number in “Ert ordernummer”Writes BunStack's order number in the Ert ordernummer field. A second push of the same order gets -D2, -D3.On
Kustom order ID in “Er referens”Writes Kustom's order ID in the Er referens field, for orders paid through Kustom. Otherwise ProSmart fills in the customer's default reference.Off
Order state in ProSmart when BunStack sends itDelivered at once or Not delivered. See Delivery.Not delivered
Send customer detailsSends the customer as delivery recipient. Off: ProSmart uses the collective customer's details.On
Send prices and discountsSends the storefront's price and the line's discount. Off: ProSmart prices from its own price list.On
Push the order to ProSmart automatically on fulfilmentSends the order when you mark it as shipped. Off: the fulfilment dialog asks.Off
  • With Our order number in “Ert ordernummer” off, the field is empty. BunStack then cannot look the order up after a timeout.
  • A connection last saved before the Test and Production choice existed sends neither customer nor prices. Tick Send customer details and Send prices and discounts and save.

What the order includes

A web order is a purchase by a consumer. BunStack books it on the customer for the recipient's country. See Customer number per country.

On the ProSmart orderFrom BunStack
Delivery recipient (foretagl)The company name, else the customer's name
Delivery address (adressl, adressl2, postnrl, postortl)The shipping address
Country (landl, lev_landkod)The country in Swedish, for example Sverige, and the country code
Handler (handlagk)The customer's name
Note 1, 2, 3Email, phone and "Rabattkod: KODEN"
VAT number (vatnr)The customer's VAT number, when the order has one
Line price (offpris)The storefront's unit price excluding VAT, in SEK
Discount (rabatt)The line's discount in percent
Freight lineThe freight article, quantity 1, the shipping excluding VAT
Note 4 (anm4)Only on an order picked up in store
  • BunStack converts an order in another currency to SEK at the order's own rate.
  • BunStack sends a line without VAT data without a price, for example on an imported order. ProSmart prices it from its price list, and the result says which lines this applies to.
  • The same article number twice becomes one line. The price becomes the average and the discount the share of the amount.
  • The freight line is included when the order paid shipping and the freight article exists in the environment's article register.
  • BunStack books shipping once per order and environment. Send the rest, the next part of a partial shipment and a confirmed duplicate get no freight line.

Store pickup

  • The delivery recipient is the pickup location with name, address and country. Never the customer's home address.
  • The customer's name, email and phone are in handler and note 1–2.
  • Note 4 is "Hämtad i butik BUTIKEN ÅÅÅÅ-MM-DD", with the date of Picked up. Before the handover it is "Hämtas i butik BUTIKEN".
  • BunStack sends note 4 even when Send customer details is off.
  • A pickup order you sent as a parcel after all (New shipment with a tracking number) goes to ProSmart as usual. It gets the customer's address and no note 4.

What ProSmart did not keep

ProSmart accepts fields it does not know without saying anything, and does not save them. BunStack therefore reads the order back after every push.

  • What ProSmart did not keep shows in the result and on the ProSmart card under ProSmart did not keep. It can be a country, a discount or note 4 (pickup note).
  • When the order's value in ProSmart differs by more than 1 krona, that shows there too.
  • The order stays in ProSmart. Check it there.

Automatic push on fulfilment

With Push the order to ProSmart automatically on fulfilment on, BunStack sends the order when you mark it as shipped. On a partial shipment it sends only the shipped lines. The result shows in the fulfilment dialog, on the pack page and in New shipment.

  • The order stays shipped whatever ProSmart answers.
  • The whole fulfilment gets 140 seconds. ProSmart gets at most 60 of them, and only the time left after booking and capture.
  • When booking and capture used all the time, BunStack does not send the order. The result says to send it from ⋯ Actions › Push to ProSmart.
  • The customer's shipped email does not wait for ProSmart.
  • When ProSmart is not connected, the fulfilment dialog does not ask about ProSmart.

Warning: Not confirmed means ProSmart did not answer in time. The push may still have gone through. Look at the ProSmart card before you send again.

The same applies when ProSmart took the order but BunStack could not read it back.

Lines that cannot be sent

The preview and the push look up each SKU in the environment's article register, without writing anything. BunStack cannot send a line that has no SKU, or whose SKU is not an article in the environment. The line shows under Not sent with the reason.

  • When the product has got a new SKU since the order was placed, BunStack tries that too.
  • An article without stock in ProSmart counts as an article, for example a service article.
  • A product of the type service is sent when it has a SKU, and is then looked up like other lines. The quantity follows Quantity sent on the service, and the unit price is the line's amount without VAT divided by the quantity. A service without a SKU is not sent. It does not count as a line that cannot be sent, and the push does not stop on it. The ProSmart card on the order says Not sent to ProSmart: and the service.
  • A line from a card or an add-on has the product's only variant and its SKU. The customer adds a product with several variants from its product page.
SituationWhat happens
In the dialogTick Send without these lines. The button, for example Send 1 of 2 lines, then becomes active.
No line can be sentThe dialog cannot send. The automatic push creates no order in ProSmart. BunStack flags the order, and the timeline shows Nothing sent to ProSmart.
Automatic pushBunStack sends the lines it can. The order is already shipped and the rest is not held back.
ProSmart refuses the orderBunStack sends nothing. The result says "Nothing of the order was sent, these lines included." and shows Push the whole order. BunStack does not flag the order.
Changed since the previewWhen ProSmart has lost an article, the dialog asks again with the new list.

After a push that left lines out, the order gets Needs attention with the lines and the environment. The bell gets the Lines not sent to ProSmart notification, without email. The ProSmart card shows a warning until the lines are sent. The stock of those lines in ProSmart is unchanged.

Send the rest

  1. Add the article in ProSmart, or correct the SKU on the product.
  2. Press Send the rest on the ProSmart card. The button is also in the fulfilment dialog, on the pack page and in New shipment.

BunStack sends the lines as a new push (-D2) to the environment where they are missing. The warning and the flag disappear when every line is sent.

  • Send the rest is not a duplicate. The dialog does not ask for DUPLICATE.
  • When another environment is in use now, the dialog sends nothing and says, for example, ProSmart Test is in use now, and a push to Test books nothing in Production.
  • When the lines have already been sent, the dialog says Already in ProSmart and sends nothing.
  • An earlier push that could not be confirmed does not count. Look for the order in ProSmart first. BunStack blocks the push until then.

Two environments

  • Test and Production count separately. The card shows one warning per environment.
  • A push to Production that sends a line missing in Test removes the line from Test too.
  • A push to Test never removes what is missing in Production.
  • Lines missing in the environment not in use get no Send the rest. The card says which environment it concerns. When the lines are handled another way, press Resolve on the order.

Refunded and cancelled orders

  • BunStack does not send a cancelled or fully refunded order. The card shows the lines without Send the rest, and BunStack removes the flag.
  • BunStack does not send units refunded before the push. The preview mentions a fully refunded line, but BunStack does not flag it.
  • BunStack sends a partly refunded line with the units that remain, at the same unit price.
  • Only completed refunds with lines count. A refund of an amount only changes no lines.
  • A line missing in ProSmart that is then fully refunded disappears from the warning and the flag.

Duplicates

The server refuses a second push of the same order to the same environment. Type DUPLICATE in the dialog if you want to send again. BunStack cannot send an order without any line with a SKU.

When ProSmart does not answer after the order was sent, BunStack searches ProSmart's order list, at most 10 pages. BunStack searches for Ert ordernummer, or for Er referens on the order's first push.

OutcomeWhat happens
The order is foundBunStack registers the push.
The order is not foundYou can send again.
Unknown, or the list is longer than 10 pagesBunStack marks the push unverified and blocks the next attempt until you have checked the order in ProSmart.

Without Ert ordernummer and Er referens there is nothing to search for. A push without an answer then always becomes unverified.