web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Whs shipment created via post api with 0 qty unexpectedly create a qty not equal to the payload

(3) ShareShare
ReportReport
Posted on by 8
We created a mobile app for transfer order which integrates with business central and automates the creation of warehouse shipment.  Everything is okay excep that when we are posting a serialized item with zero as this is not shipled yet, the created watehouse shipmet did not copy zero but took the original transfer krder qty.  In sandbox though, we dont encounter the issue but in Prod we do.  We checked the warrhouse setup and we found no difference.  
 
Appreciate if somebody can advise any setup that we also need to check in Prod or what might have caused the issue.  Thanks.
I have the same question (0)
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,150 Super User 2025 Season 2 on at
    Maybe this will give you a hint — in Business Central, when you create a warehouse shipment via API and send a quantity of zero, the system might still pull the full quantity from the source document (like a transfer order) if item tracking lines or reservations aren’t properly set. The reason it works differently in sandbox could be due to differences in data, extensions, or background jobs running in production.
     
    Double-check if the item is using serial tracking and ensure the API call is passing the correct item tracking lines even for zero quantity. Also, review reservation policies and the "Require Shipment" setup on the location. In some cases, the system might automatically create lines using the outstanding quantity if those setups allow it.
     
    If this helps, kindly mark this answer as Verified ✅.
     
     
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,150 Super User 2025 Season 2 on at
    You're creating a warehouse shipment via API for a serialized item with 0 qty, but in Production, it defaults to the full transfer order quantity. This doesn’t happen in Sandbox.
     
     
    ---
     
    ✅ Likely Causes & Checks:
     
    1. API Limitation:
    If you only create the shipment header, BC auto-generates lines with full qty. You need to manually set line qty to 0 using the warehouseShipmentLines endpoint.
     
     
    2. Serialized Items:
    For serial-tracked items, BC expects qty = 1 per serial no. It might override the qty unless tracking lines are set correctly.
     
     
    3. Prod vs Sandbox Differences:
     
    Check for custom extensions or event subscribers in Prod.
     
    Confirm same location code and warehouse settings.
     
    Check if your mobile app behaves differently in each environment.
     
     
     
    4. Fix:
    After shipment creation, update or delete lines via API to set correct qty (e.g. 0), or prevent line auto-generation and create them manually.
     
     
     
     
    ---
    Mark this as verified answer if it helps you 
     
     
  • Suggested answer
    YUN ZHU Profile Picture
    95,763 Super User 2025 Season 2 on at
    This is clearly a customization issue.
    I suggest asking the developer to debug this. You can have the code create different quantities based on different conditions, but please note that this is not a standard issue and needs to be resolved between you and your partner.
     
     
    Thanks.
    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,116

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 764 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 635 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans