# Sell ahead not updating

**URL:** <https://community.shiphero.com/t/sell-ahead-not-updating/2736>\
**Category:** GraphQL API\
**Created:** [December 12, 2023, 12:00am UTC](https://community.shiphero.com/t/sell-ahead-not-updating/2736 "2023-12-12T00:00:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![apopelka](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@apopelka](https://community.shiphero.com/u/apopelka)\
**Post date:** [December 12, 2023, 12:00am UTC](https://community.shiphero.com/t/sell-ahead-not-updating/2736/1 "2023-12-12T00:00:40Z")

</div>

Hi, I’ve updated the sell-ahead value from a purchase order but available and sell\_ahead values are not updated when a query inventory for one of the skus is there anything extra that needs to be done? thanks

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [December 12, 2023, 1:49pm UTC](https://community.shiphero.com/t/sell-ahead-not-updating/2736/2 "2023-12-12T13:49:54Z")

</div>

Hey @apopelka,

Thanks for reaching out!

Could you please provide some examples of this? With request\_ids or timestamps preferably!

Please let me know if you have any questions or concerns.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![apopelka](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@apopelka](https://community.shiphero.com/u/apopelka)\
**Post date:** [December 12, 2023, 4:53pm UTC](https://community.shiphero.com/t/sell-ahead-not-updating/2736/3 "2023-12-12T16:53:32Z")

</div>

HI @sh-agent thanks for the quick reply, here are the two queries I’m running:

```auto
"request_id": "657875a070cddc95760363b9",

```

```auto
"request_id": "65788f9b513307dbb10e2e67",

```

```auto
query getPO($po_number: String) {
	purchase_order(po_number: $po_number) {
		request_id
		data {
			id
			po_number
			line_items {
				edges {
					node {
						id
						sku
						vendor_sku
						sell_ahead
					}
				}
			}
		}
	}
}

```

```auto
query getAvailable($sku: String){
  warehouse_products(sku: $sku) {
    data(first: 1) {      
      edges {
        node {          
          warehouse_identifier
          warehouse_id
          available
					sell_ahead
        }
      }
    }
  }
}

```

and these are the responses:

```auto
{
	"data": {
		"warehouse_products": {
			"data": {
				"edges": [
					{
						"node": {
							"sku": "",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "0",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "1",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "10",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "111",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "188888888888",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "19",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "2",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "21",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "22",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "290999999999999999999999",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.92469E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.92778E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.93178E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.93814E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.93823E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.93873E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.94284E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.9429E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.94446E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.94754E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.95249E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.95472E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "3.95E+13",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "388888888888",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "390999999999999999999999",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "39428417257534",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "39428418306110",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "39428418469950",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "4",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "488888888888",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "490999999999999999999999",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "5",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "590999999999999999999999",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "6",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "6.06E+11",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "6.42381E+11",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "6.42E+11",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "690999999999999999999999",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "7",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "790999999999999999999999",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "8",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "890999999999999999999999",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "90999999999999999999999",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "A000JEWLBOX001",
							"warehouse_id": "V2FyZWhvdXNlOjYxODc3",
							"warehouse_identifier": "FSD"
						}
					},
					{
						"node": {
							"sku": "A000JEWLBOX001",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "A000TYCARD0001",
							"warehouse_id": "V2FyZWhvdXNlOjYxODc3",
							"warehouse_identifier": "FSD"
						}
					},
					{
						"node": {
							"sku": "A000TYCARD0001",
							"warehouse_id": "V2FyZWhvdXNlOjczNTE=",
							"warehouse_identifier": "Primary"
						}
					},
					{
						"node": {
							"sku": "A000TYCARD0002",
							"warehouse_id": "V2FyZWhvdXNlOjYxODc3",
							"warehouse_identifier": "FSD"
						}
					}
				]
			}
		}
	},
	"extensions": {
		"throttling": {
			"estimated_complexity": 51,
			"cost": 51,
			"cost_detail": {
				"warehouse_products": {
					"items_count": 50,
					"cost": 1,
					"total_cost": 51,
					"fields": {}
				}
			},
			"user_quota": {
				"credits_remaining": 1949,
				"max_available": 2002,
				"increment_rate": 30
			}
		}
	}
}

```

```auto
{
	"data": {
		"warehouse_products": {
			"data": {
				"edges": [
					{
						"node": {
							"warehouse_identifier": "FSD",
							"warehouse_id": "V2FyZWhvdXNlOjYxODc3",
							"available": 0,
							"sell_ahead": 0,
							"sku": "C969SUBAOS1202"
						}
					}
				]
			}
		}
	},
	"extensions": {
		"throttling": {
			"estimated_complexity": 17,
			"cost": 17,
			"cost_detail": {
				"warehouse_products": {
					"items_count": 1,
					"cost": 1,
					"total_cost": 17,
					"fields": {
						"WarehouseProduct.sell_ahead": {
							"count": 1,
							"value": 15,
							"total_cost": 15
						}
					}
				}
			},
			"user_quota": {
				"credits_remaining": 1985,
				"max_available": 2002,
				"increment_rate": 30
			}
		}
	}
}

```

---

<div class="post-metadata">

**Author:** ![sh-agent](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sh-agent](https://community.shiphero.com/u/sh-agent)\
**Post date:** [December 13, 2023, 1:40pm UTC](https://community.shiphero.com/t/sell-ahead-not-updating/2736/4 "2023-12-13T13:40:04Z")

</div>

Hey @apopelka,

Thanks for hanging in there!

I see what you mean. This behavior is not expected, so I will escalate this issue to our Engineering Team for further investigation.

Do note that the Sell Ahead value is ignored when a PO is closed, but the PO in question seems to be in a custom status but is not closed.

Please let me know if you have any questions or concerns.

Best,  
RayanP

---

<div class="post-metadata">

**Author:** ![apopelka](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@apopelka](https://community.shiphero.com/u/apopelka)\
**Post date:** [December 14, 2023, 10:48pm UTC](https://community.shiphero.com/t/sell-ahead-not-updating/2736/6 "2023-12-14T22:48:40Z")

</div>

thanks @sh-agent , we tried different things but no luck and this is a feature we used before without any issues.
