> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# productKnowledgeEntriesStatusSet

> Set the status of up to 100 product knowledge entries, as the Products tab's bulk action does. Returns one result per id: OK, or SKIPPED with NOT_FOUND for an id the store has no entry for. Safe to retry, so there is no idempotencyKey. It goes live at once, so it needs `commerce_agent_knowledge_publish`; `commerce_agent_knowledge_write` alone is refused with INSUFFICIENT_SCOPE.

**Required scopes:** [`commerce_agent_knowledge_publish`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-commerce_agent_knowledge_publish)

## Arguments

**ids** `[ID!]!` *required*

Product knowledge entry ids (`pkn_`), 1 to 100 distinct ones; a repeated id counts once. Another kind of id fails with INVALID\_KNOWLEDGE\_ID.

**status** `[KnowledgeArticleStatus!](/docs/api-reference/v3/reference/commerce-agent/knowledge-article-status)` *required*

## Returns

**productKnowledgeEntriesStatusSet** `[ProductKnowledgeEntriesActionResult!](/docs/api-reference/v3/reference/commerce-agent/product-knowledge-entries-action-result)` *required*

What a bulk product knowledge action did with each entry it names. It runs while the request waits, so the result is final.

**fields**

**counts** `[BulkCounts!](/docs/api-reference/v3/reference/common/bulk-counts)` *required*

How many items ended each way.

**fields**

**failed** `Int!` *required*

The items that couldn't be changed.

**ok** `Int!` *required*

The items the action changed.

**skipped** `Int!` *required*

The items it didn't apply to.

**total** `Int!` *required*

The items given.

**results** `[\[ProductKnowledgeEntryActionItem!\]!](/docs/api-reference/v3/reference/commerce-agent/product-knowledge-entry-action-item)` *required*

One per distinct id, in the order given; at most 100.

**fields**

**code** `String`

Why the item was skipped or failed: NOT\_FOUND, the store has no entry with this id, or it was removed (another store's included). Null when it is OK.

**entry** `[ProductKnowledgeEntry](/docs/api-reference/v3/reference/commerce-agent/product-knowledge-entry)`

The entry the id names, as it is after the action. Null for an entry not found, or one the action removed.

**fields**

**content** `String!` *required*

The entry's text as authored.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the entry was created.

**id** `ID!` *required*

The id of this product knowledge entry.

**productFamilies** `[ProductFamilyConnection!](/docs/api-reference/v3/pagination)` *required*

The products this entry is linked to, by title, as the Products tab lists them. Deleted products are left out.

**Requires:** [`products_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-products_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns products after it.

**before** `String`

Backward pagination cursor — returns products before it.

**first** `Int`

Forward pagination: returns the first N products (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N products (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**status** `[KnowledgeArticleStatus!](/docs/api-reference/v3/reference/commerce-agent/knowledge-article-status)` *required*

Whether Commerce Agent uses this entry. It answers shoppers with ACTIVE entries only; its knowledge preview also reads DRAFT ones.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the entry was last changed.

**message** `String`

The same, in words. Null when it is OK.

**status** `[BulkItemStatus!](/docs/api-reference/v3/reference/common/bulk-item-status)` *required*

What the action did with the item.

## Errors

Besides the [errors any request can return](https://developers.redo.com/docs/api-reference/v3/errors.md), this operation fails with these codes in `extensions.code`.

| Code | HTTP status | Meaning | Retry |
| - | - | - | - |
| `BAD_USER_INPUT` | `400` | An argument is invalid, or names something the store doesn't have. The message says which. Nothing was written. | Fix the input the message names, then send it again. |
| `INVALID_KNOWLEDGE_ID` | `400` | An id isn't a kind of knowledge entry the argument takes, such as a product knowledge id where an article or help center link id goes. The message names it. Nothing was written. | Pass ids of the kind the argument's description names. |
| `INTERNAL_SERVER_ERROR` | `500` | Something failed on Redo's side. The change may or may not have been made. | Read the record to see whether the change was made before sending it again. A send with an idempotencyKey is safe to retry with the same key. |

## Example

```graphql theme={null}
mutation {
  productKnowledgeEntriesStatusSet(ids: "...", status: ACTIVE)
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.