Warehouse products number of distinct skus differs from expectation

Hi,

We are expecting roughly 2k distinct skus to be updated daily from 2020-10-12 to 2020-10-18

From 2020-10-12 to 2020-10-17, distinct skus received from GraphQL responses were below expectation (~1k)
For 2020-10-18, distinct skus received from GraphQL responses suddenly spiked (~35k)

Sample query
“requestString”: “{“query”:”{ warehouse_products( warehouse_id: \<variable> updated_from: \“2020-10-18T08:00:00+00:00\”, updated_to: \“2020-10-18T09:00:00+00:00\” ) { request_id complexity data(first: 70, after: \"\") { pageInfo { hasNextPage hasPreviousPage startCursor endCursor } edges { node { id warehouse_id on_hand legacy_id product { id sku legacy_id } updated_at } } } } }" }"

Sample request_ids for 1 hour of 2020-10-18
request_id:“5f9738fb1f439f2b0255c7d3”
request_id:“5f9738fb5e508b918df209aa”
request_id:“5f9738fb9d45a2c7852757d3”
request_id:“5f9738fb62a0f8b802f43683”
request_id:“5f9738ff1887303971c53cbc”
request_id:“5f9739012cae011995459db4”
request_id:“5f973904f81769a22650bbc4”
request_id:“5f9738fb06b723f7eb8975b0”
request_id:“5f9738fffd0e978c847109b5”
request_id:“5f973901dbd6fb43c915589e”
request_id:“5f9739044ce3a8484f358a94”
request_id:“5f973907765a8396a94cdceb”
request_id:“5f97390a80e5fc9f481d43ca”
request_id:“5f9738fbf55642ec56f3320b”
request_id:“5f9738ff9e5703ba366f2e1b”
request_id:“5f973903c783c6e33b08311e”
request_id:“5f973907d86774f5e8df262b”
request_id:“5f97390b1f439f2b0255c7eb”
request_id:“5f97390f9d3090bc1ca4b2b3”
request_id:“5f9739126ab27acf77a6efb1”
request_id:“5f9739169d45a2c7852757f1”
request_id:“5f97391ea9351048125f3c60”
request_id:“5f97392125bd76a040976827”
request_id:“5f97393a1f439f2b0255c83c”
request_id:“5f97394058b259340a6b27bd”
request_id:“5f97394625bd76a040976867”
request_id:“5f97394b51c00facf20b7580”
request_id:“5f973954303547efc65aef7e”
request_id:“5f9739625c8293bc4316b462”
request_id:“5f9738fb4ce3a8484f358a88”
request_id:“5f9738fe7175744e9833d716”
request_id:“5f973901d7417d13689797e5”
request_id:“5f973903fb13dd5681a6457f”
request_id:“5f973906453e9ec5ed0b1d5d”
request_id:“5f97390a0eac0ed11c8d0631”
request_id:“5f97390deb7604b1fb443d62”
request_id:“5f973910796df20b03a6352f”
request_id:“5f973914c131b7a376c395ff”
request_id:“5f973919dd3e7618202bbc26”
request_id:“5f973924fb13dd5681a645b4”
request_id:“5f973929453e9ec5ed0b1d96”
request_id:“5f97392fd4b4a59c281c99c8”
request_id:“5f973934c97d92f84a3d8661”
request_id:“5f973937f965a9d60c199518”
request_id:“5f97393c796df20b03a63577”
request_id:“5f973951c783c6e33b083196”
request_id:“5f97395a51c00facf20b759a”
request_id:“5f97396058b259340a6b27fa”
request_id:“5f973966b039f27c165e9794”
request_id:“5f97396bfb13dd5681a64632”
request_id:“5f9739710ec283cbd469eddc”
request_id:“5f973977cc1e7f678b3ba160”
request_id:“5f97397a8a1bca3520a0d8c4”
request_id:“5f97397d0eac0ed11c8d0740”
request_id:“5f9738fb453e9ec5ed0b1d52”
request_id:“5f9738ffd4b4a59c281c997f”
request_id:“5f97390258b259340a6b275d”
request_id:“5f973906a250746b704abd2b”
request_id:“5f97390af1fc5d0251cc8e18”
request_id:“5f97390d4ce3a8484f358aa4”
request_id:“5f973911296736069174338c”
request_id:“5f973914dbd6fb43c91558b9”
request_id:“5f97391c579e753a9428b455”
request_id:“5f973927f55642ec56f3323f”
request_id:“5f97392c1f2d73d04590e4b1”
request_id:“5f9739310eac0ed11c8d0695”
request_id:“5f973942d9469b5f5e5d62c9”
request_id:“5f9739485e508b918df20a22”
request_id:“5f97394fd48e8ad6532125eb”
request_id:“5f9739581ec04765c0aaac87”
request_id:“5f97395c1ec04765c0aaac8b”
request_id:“5f9739692cae011995459e5c”
request_id:“5f97396eb2cb9ee3a7cb9b85”
request_id:“5f97397351c00facf20b75bf”
request_id:“5f9739803cc70149e7041688”
request_id:“5f9739830eac0ed11c8d074c”
request_id:“5f9739875cfbfe99bcffa975”
request_id:“5f97398a9d45a2c7852758ac”
request_id:“5f97398e2cae011995459ea0”
request_id:“5f973992e94d301bee1bc995”
request_id:“5f973995bbde87316d9dd2bb”
request_id:“5f9739999e5703ba366f2f09”
request_id:“5f97399c4c7428f382fa404a”
request_id:“5f9739a02cae011995459eba”
request_id:“5f9739a3c131b7a376c396ef”
request_id:“5f9739a76ab27acf77a6f09a”
request_id:“5f9739aa796df20b03a6363b”
request_id:“5f9739ae24d0654b5807f138”
request_id:“5f9739b1eb7604b1fb443e79”
request_id:“5f9739b5d4b4a59c281c9ab4”
request_id:“5f9739b8593ae6e12092ee27”
request_id:“5f9739bc6a7ffb3d74462fd8”
request_id:“5f9739bf3570cf087b48328a”
request_id:“5f9739c2660f365901d576e5”
request_id:“5f9739c5a250746b704abe67”
request_id:“5f9739c8593ae6e12092ee43”
request_id:“5f9739cbe487d94c76bf3ae4”
request_id:“5f9739cfa9351048125f3d80”
request_id:“5f9739d258b259340a6b28c3”
request_id:“5f9739d65e508b918df20b1d”
request_id:“5f9739d99e5703ba366f2f77”
request_id:“5f9739dd80fc134cc824a602”
request_id:“5f9739e1dd3e7618202bbd89”
request_id:“5f9739e458b259340a6b28e3”
request_id:“5f9739e7f81769a22650bd47”
request_id:“5f9739ebd48e8ad6532126f5”
request_id:“5f9739eec131b7a376c39788”
request_id:“5f9739f2765a8396a94cde81”
request_id:“5f9739f64ce3a8484f358c9f”
request_id:“5f9739f9c783c6e33b0832bb”
request_id:“5f9739fc06b723f7eb897779”
request_id:“5f973a000e39e599440c9e93”
request_id:“5f973a038e2a2a78b6e27a3e”
request_id:“5f973a060eac0ed11c8d087d”
request_id:“5f973a0ad255cce88e8109c0”
request_id:“5f973a0d9d3090bc1ca4b460”
request_id:“5f973a11d9469b5f5e5d6420”
request_id:“5f973a1406b723f7eb89779d”
request_id:“5f973a179e5703ba366f2fe1”
request_id:“5f973a1b58b259340a6b2946”
request_id:“5f973a1f453e9ec5ed0b1f39”
request_id:“5f973a23c783c6e33b0832ea”
request_id:“5f973a260ec283cbd469ef02”
request_id:“5f973a2a660f365901d5779f”
request_id:“5f973a2d0ec283cbd469ef0b”
request_id:“5f973a320ec283cbd469ef0e”
request_id:“5f973a37cc1e7f678b3ba2b2”
request_id:“5f973a3bbbde87316d9dd42b”
request_id:“5f973a3e7ff92fda10ddc960”
request_id:“5f973a423570cf087b48335f”
request_id:“5f973a45d48e8ad65321278c”
request_id:“5f973a495cfbfe99bcffaab6”
request_id:“5f973a4c579e753a9428b643”
request_id:“5f973a501f439f2b0255ca1e”
request_id:“5f973a53d4b4a59c281c9bc3”
request_id:“5f973a574ce3a8484f358d60”
request_id:“5f973a5ad9469b5f5e5d648a”
request_id:“5f973a5dc97d92f84a3d8845”
request_id:“5f973a61c783c6e33b083345”
request_id:“5f973a645c8293bc4316b614”
request_id:“5f973a6824d0654b5807f25b”
request_id:“5f973a6ba9351048125f3e6f”
request_id:“5f973a6f7ff92fda10ddc99e”
request_id:“5f973a722cae01199545a005”
request_id:“5f973a7680fc134cc824a702”
request_id:“5f973a79dd3e7618202bbe50”
request_id:“5f973a7c6a7ffb3d744630e7”
request_id:“5f973a7f5c8293bc4316b636”
request_id:“5f973a830eac0ed11c8d096a”
request_id:“5f973a86d9469b5f5e5d64c5”
request_id:“5f973a8a80fc134cc824a71b”
request_id:“5f973a8daa092ee78e82f8fc”
request_id:“5f973a9024d0654b5807f293”
request_id:“5f973a93765a8396a94cdf73”
request_id:“5f973a9651c00facf20b7781”
request_id:“5f973a9a06b723f7eb89784d”
request_id:“5f973a9d796df20b03a637c2”
request_id:“5f973aa15cfbfe99bcffab24”
request_id:“5f973aa4aa092ee78e82f91b”
request_id:“5f973aa8453e9ec5ed0b1ffe”
request_id:“5f973aaa7175744e9833d9c1”
request_id:“5f973aaef55642ec56f334a6”
request_id:“5f973ab1cc1e7f678b3ba364”
request_id:“5f973ab5453e9ec5ed0b200d”
request_id:“5f973ab74c7428f382fa4203”
request_id:“5f973abab039f27c165e99c9”
request_id:“5f973abdd9469b5f5e5d6501”
request_id:“5f973ac16ab27acf77a6f228”
request_id:“5f973ac41f2d73d04590e750”
request_id:“5f973ac8ba1aecfe48ca191e”
request_id:“5f973acb9d45a2c785275aa6”

Thank you!

Hi @jwz!
Do you happen to have an example of a SKU that was updated and was not returned?

Keep in mind that if a product had more than one update made, it will only show the last one, this is:

Product ID 301705423
Gets updated at 2020-10-13
Gets updated at 2020-10-18

It will keep the updated at as 2020-10-18 and not 2020-10-13

So if you filter for
updated_from: “2020-10-13”
updated_to: "2020-10-14”
It will not show up.

Let me know if that still doesn’t help,
Thanks in advance!
Tom

Hi @tomasw

Thanks for your response!

Example SKUs:
838302708 not in responses but there were updates
0602435034805-SIGNED not in responses since 2020-10-10T21:41:50+00:00 but this was updated daily

Hi @jwz!
I apologize for the delayed response, seems like those products where updated in the meantime

SKU: 838302708
should show the update with this Query:

{
  warehouse_products(
    warehouse_id: "V2FyZWhvdXNlOjIzMDU="
    updated_from: "2020-10-30 23:10:07"
    updated_to: "2020-10-30 23:10:08"
  ) {
    request_id
    complexity
    data(first: 70) {
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
      edges {
        node {
          id
          warehouse_id
          on_hand
          legacy_id
          product {
            id
            sku
            legacy_id
          }
          updated_at
        }
      }
    }
  }
}

SKU: 0602435034805-SIGNED
should show the update with this Query:

{
  warehouse_products(
    warehouse_id: "V2FyZWhvdXNlOjIzMDU="
    updated_from: "2020-10-30T22:19:01"
    updated_to: "2020-10-30T22:19:03"
  ) {
    request_id
    complexity
    data(first: 70) {
      pageInfo {
        hasNextPage
        hasPreviousPage
        startCursor
        endCursor
      }
      edges {
        node {
          id
          warehouse_id
          on_hand
          legacy_id
          product {
            id
            sku
            legacy_id
          }
          updated_at
        }
      }
    }
  }
}

And this will cause not to show on the previous timeframe
From: 2020-10-18T08:00:00+00:00 to 2020-10-18T09:00:00+00:00

Are you aiming to see inventory changes? Or changes in other specifications such as barcode, etc?
Thanks again!
Tom

Hi @tomasw,

The issue appears to be that we are not getting the correct updated_at timestamp. In the below call, this sku was updated several times in June, and most recently June 13th. However, the updated_at timestamp is May 24th. This seems to reflect the product log, not inventory changes, despite the updated_at field coming from warehouse_products. Our end goal here is to update inventory amounts (allocated, available, etc.) when there is an update to the inventory for a product in a warehouse. What updated_at field should we be using for this?

query {
  products(sku: "00602507229887") {
request_id
complexity
data(first: 1) {
  edges {
    node {
      name
      sku 
      warehouse_products {
        allocated 
        available 
        warehouse_identifier
        warehouse_id
        active
        updated_at
      }
    }
  }
}
  }
} 

{
  "data": {
    "products": {
      "request_id": "5fb54ae02865192e6f84b6fe",
      "complexity": 31,
      "data": {
        "edges": [
          {
            "node": {
              "name": "Stuck With U Alternate Cover Window 7\" Vinyl + Digital Single ",
              "sku": "00602507229887",
              "warehouse_products": [
                {
                  "allocated": 0,
                  "available": 9999999,
                  "warehouse_identifier": "Artist Endeavor",
                  "warehouse_id": "V2FyZWhvdXNlOjIzMDU=",
                  "active": true,
                  "updated_at": "2020-05-24T01:48:45"
                }

@tomasw I think I found a solution, and would like confirmation:

Does the date_from and date_to fields in inventory_changes correspond to created_at in the same query? And does created_at refelect any inventory changes to: allocated, on_hand, available, reserved, backorder, on_order, and sell_ahead? e.g. would the following be an appropriate way to gather all skus with any inventory changes on 2020-11-18T14:49 ?

`query {`
`  inventory_changes(date_from: "2020-11-18T14:49:00"`
`  	date_to: "2020-11-18T14:49:59") {`
`    request_id`
`    complexity`
`    data(first: 1) {`
`      edges {`
`        node {`
`          sku`
`          created_at`
`        }`
`      }`
`    }`
`  }`
`}`

Hi @Devin_Mabra!
I apologize for my delayed response.
The fields that impact the updated_at are:

For changes to the On Hand: inventory_changes Query

For changes on the Reserved: product Query

As for the other changes: allocated, available, backorder, on_order, and sell_ahead they do not change the updated_at value

Let me know if that doesn’t help,
Thanks in advance!
Tom