Why Is Completed Purchase Order and Cost Data Missing From the PURCHASE_ORDER Table?
Question
Why are my completed purchase orders and cost data missing from the PURCHASE_ORDER table?
Environment
Connector: SkuVault (Lite)
Answer
Completed purchase orders
By default, the SkuVault API returns all purchase orders except completed ones. Since the API doesn't support fetching all statuses in a single cell, Fivetran must separately request the Completed status to retrieve those orders.
We sync non-completed and completed purchase orders separately, then combine both result sets into the PURCHASE_ORDER table. As a result, purchase orders remain captured both before and after they move to Completed.
Cost data
Cost columns depend on receipt status, not payment status. The costs and PURCHASE_ORDER_LINE_ITEM.retail_cost columns only populate once a purchase order is fully received and closed. Until then, they show [] or 0 values respectively, even if the purchase order has been paid or partially received.
Use the payment_status column to track a purchase order's payment state.
Workaround for estimated costs
For estimated costs before a purchase order is fully received, join the PURCHASE_ORDER_LINE_ITEM table with the PRODUCT table or vendor SKU record. Finalized cost data appears after the purchase order is fully received and the next sync completes.
For more information, see the SkyVault purchase orders API documentation and our SkyVault sync overview.