# SKU active flag different between UI and API

**URL:** <https://community.shiphero.com/t/sku-active-flag-different-between-ui-and-api/2021>\
**Category:** GraphQL API\
**Created:** [June 3, 2022, 6:25pm UTC](https://community.shiphero.com/t/sku-active-flag-different-between-ui-and-api/2021 "2022-06-03T18:25:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremyw](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jeremyw](https://community.shiphero.com/u/jeremyw)\
**Post date:** [June 3, 2022, 6:25pm UTC](https://community.shiphero.com/t/sku-active-flag-different-between-ui-and-api/2021/1 "2022-06-03T18:25:14Z")

</div>

Hi!

I found an issue where we have a SKU that is shown as “Active: No” in the UI, but the API shows it’s “active: true”. Here is a screenshot from the product details page in the UI:

![Screen Shot 2022-06-03 at 2.19.20 PM](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/0f7e487daef75f9728bcf327eb7fdcc51b33667e.png)

But when I use this query in Insomnia:

```auto
query {
  products (sku: "IS-CV-PI016") {
    request_id
    complexity
    data (first: 1) {
      edges {
        cursor
        node {
          sku
          name
          active
        }
      }
    }
  }
} 

```

I get this result, showing “active”: true

```auto
{
	"data": {
		"products": {
			"request_id": "629a516ebd44f2e5fc4a31fd",
			"complexity": 2,
			"data": {
				"edges": [
					{
						"cursor": "YXJyYXljb25uZWN0aW9uOjA=",
						"node": {
							"sku": "IS-CV-PI016",
							"name": "Colorverse CMa - Ink Sample ",
							"active": true
						}
					}
				]
			}
		}
	}
}

```

I thought perhaps it was a timing issue when I first saw it this morning around 8:00am EDT, but so far it persists as of 2:20pm EDT.

Request ID is in the results. Please let me know if you need any other information from me.

Thanks,  
Jeremy

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [June 3, 2022, 8:55pm UTC](https://community.shiphero.com/t/sku-active-flag-different-between-ui-and-api/2021/2 "2022-06-03T20:55:16Z")

</div>

Hello @jeremyw

The information you provided is enough to start investigating. Thanks for it.

We are already looking into this, and we will let you know as soon as we have an update.

Have a great weekend!  
TomasFD

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [June 6, 2022, 8:20pm UTC](https://community.shiphero.com/t/sku-active-flag-different-between-ui-and-api/2021/3 "2022-06-06T20:20:03Z")

</div>

Hello @jeremyw!

I wasn’t able to reproduce the error on my end. Do you remember how that product was set as inactive?

That being said, active can be set on a per warehouse basis. Although you only have one, the correct value would be here:

```auto
query {
  products (sku: "IS-CV-PI016") {
    request_id
    complexity
    data (first: 1) {
      edges {
        cursor
        node {
          sku
          name
          warehouse_products{
            active
          }
        }
      }
    }
  }
} 

```

I will bring matter this to engineering our team, though.

Kind regards,  
TomasFD

---

<div class="post-metadata">

**Author:** ![jeremyw](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jeremyw](https://community.shiphero.com/u/jeremyw)\
**Post date:** [June 6, 2022, 10:41pm UTC](https://community.shiphero.com/t/sku-active-flag-different-between-ui-and-api/2021/4 "2022-06-06T22:41:05Z")

</div>

Hi @tomasfd,

It’s still an ongoing issue on my side. I just took this screenshot of the UI at 6:33pm EDT:

![Screen Shot 2022-06-06 at 6.33.40 PM](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/1X/38a9bbd7943f874528b3925127c791121e29ef78.png)

And I re-ran the query I gave above, but this time I added the warehouse\_products/active field that you showed me in your example. It looks like it’s Shrödinger’s SKU. The product-level “active” field is true, but the warehouse\_products/active field is false.

```auto
{
	"data": {
		"products": {
			"request_id": "629e806115cd450273af54bc",
			"complexity": 2,
			"data": {
				"edges": [
					{
						"cursor": "YXJyYXljb25uZWN0aW9uOjA=",
						"node": {
							"sku": "IS-CV-PI016",
							"name": "Colorverse CMa - Ink Sample ",
							"active": true,
							"warehouse_products": [
								{
									"active": false
								}
							]
						}
					}
				]
			}
		}
	}
}

```

This product was deactivated via a “Inventory Bulk Edit” CSV upload on Friday, 5/27, Batch 35756.

Thanks,  
Jeremy

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [June 8, 2022, 3:51pm UTC](https://community.shiphero.com/t/sku-active-flag-different-between-ui-and-api/2021/5 "2022-06-08T15:51:48Z")

</div>

Hello @jeremyw!

Stick to the value inside `warehouse_products`, that should be the correct one.

Do you by any chance have a copy of that CSV? if so please send it to me privately.

Kind regards,  
TomasFD

---

<div class="post-metadata">

**Author:** ![jeremyw](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@jeremyw](https://community.shiphero.com/u/jeremyw)\
**Post date:** [June 8, 2022, 5:28pm UTC](https://community.shiphero.com/t/sku-active-flag-different-between-ui-and-api/2021/6 "2022-06-08T17:28:48Z")

</div>

Sent.

Why would the two fields show something different, though? What is the node-level “active” field supposed to represent if it’s not whether or not the SKU is active?

Thanks,  
Jeremy
