> ## 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.

# knowledgeHelpCenterArticlesLink

> Add help center articles to Commerce Agent's knowledge, as the Knowledge page's FAQ import does: each is ACTIVE at once, not staged, and Commerce Agent reads the article itself. 1 to 100 articles; an id of another kind fails with BAD_USER_INPUT. Returns one result per article: OK with the new link, SKIPPED with ALREADY_LINKED and the existing link, SKIPPED with NOT_FOUND for an article not in the collection given, under a page that doesn't list that collection, or not the store's, or SKIPPED with UNPUBLISHED for an article that it, its collection or the page leaves unpublished, as Commerce Agent never uses one (unpublishing a linked article removes its link). Safe to retry: an article already linked is reported ALREADY_LINKED with its link, so there is no idempotencyKey. Read the links with `knowledgeHelpCenterLinks`. 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

**articles** `[\[KnowledgeHelpCenterArticleInput!\]!](/docs/api-reference/v3/reference/commerce-agent/knowledge-help-center-article-input)` *required*

**fields**

**helpCenterArticleId** `ID!` *required*

The m\_hca\_… id.

**helpCenterCollectionId** `ID!` *required*

The m\_hcc\_… id of the collection the article is in.

**helpCenterPageId** `ID!` *required*

The m\_hcp\_… id.

## Returns

**knowledgeHelpCenterArticlesLink** `[KnowledgeHelpCenterArticlesLinkResult!](/docs/api-reference/v3/reference/commerce-agent/knowledge-help-center-articles-link-result)` *required*

What `knowledgeHelpCenterArticlesLink` did with each article. 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** `[\[KnowledgeHelpCenterArticleLinkItem!\]!](/docs/api-reference/v3/reference/commerce-agent/knowledge-help-center-article-link-item)` *required*

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

**fields**

**code** `String`

Why the item was skipped or failed: ALREADY\_LINKED, the store already has the article in knowledge (`helpCenterLink` is that link); NOT\_FOUND, the article isn't the store's, isn't in the collection given, or the page doesn't list that collection; UNPUBLISHED, the article, its collection or the page isn't published, so Commerce Agent can't use it. Null when it is OK.

**helpCenterLink** `[KnowledgeHelpCenterLink](/docs/api-reference/v3/reference/commerce-agent/knowledge-help-center-link)`

The link this call made, or for ALREADY\_LINKED the store's existing one. Null for NOT\_FOUND and UNPUBLISHED.

**fields**

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

When the article was added to knowledge.

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

When the article stops being retrievable. Null means no end.

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

When the article becomes retrievable, if `status` is ACTIVE. Null means immediately.

**helpCenterArticle** `[HelpCenterArticle](/docs/api-reference/v3/reference/support/help-center-article)`

The linked article. Null once it's deleted.

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

**helpCenterCollection** `[HelpCenterCollection](/docs/api-reference/v3/reference/support/help-center-collection)`

The collection the article is in; unpublishing it unlinks the article. Null once it's deleted.

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

**helpCenterPage** `[HelpCenterPage](/docs/api-reference/v3/reference/support/help-center-page)`

The help center page the article was linked from; unpublishing it unlinks the article. Null once it's deleted.

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

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

The id of this link, which `knowledgeEntriesStatusSet` and `knowledgeEntriesRemove` take.

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

Whether Commerce Agent may use the article. Combine with the effective window.

**title** `String!` *required*

The entry's name as the Knowledge page and its CSV export show it: the page, collection and article titles joined with `>`, leaving out any that are empty or gone.

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

When the link last changed.

**usageCount** `Int!` *required*

How many messages Commerce Agent used the article in, the Knowledge page's Uses. Unsent draft replies don't count.

**whenToUse** `String!` *required*

The text Commerce Agent matches a shopper's question against to pick this article. It is generated from the article, so it is read-only; a new link starts with its title.

**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. |
| `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 {
  knowledgeHelpCenterArticlesLink(articles: { ... })
}
```


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