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

# eGain

## Synced Objects

eGain supports the following Synced Objects:

* [Files](https://docs.useparagon.com/managed-sync/api/file-schema.md): Syncs Knowledge Hub articles from an eGain portal as Markdown files.
* Knowledge Base Articles: Syncs Knowledge Hub articles from an eGain portal as custom records. See [Knowledge Base Articles](#knowledge-base-articles) for the record shape.

Both pipelines accept the same configuration options. Paragon walks every topic in the portal, or only the topic you set in `topicId`. When the portal has no topics, Paragon falls back to `searchQuery`.

## Files

Send a request to [Enable Sync](https://docs.useparagon.com/managed-sync/api/enable-a-sync.md) to start a file sync of Knowledge Hub articles from eGain.

```json Example theme={null}
{
    "integration": "egain",
    "pipeline": "files",
    "configuration": {
        "portalId": "PROD-1000"
    }
}
```

When you [download the content](https://docs.useparagon.com/managed-sync/api/download-content.md) of a synced file, Paragon returns the article as a Markdown document.

**Configuration options:**

**portalId** `string`

The eGain portal to sync, for example `PROD-1000`.

If not specified, the Sync uses the first portal visible to the connected client.

**language** `string` (default: en-US)

The knowledge language to sync, such as `en-US`.

**topicId** `string`

An eGain topic ID to limit the Sync scope to articles in that topic.

If not specified, the Sync will ingest articles from every topic in the portal.

**searchQuery** `string`

A search query of at least 2 characters, used only when the portal has no topics. Search results are not a full catalog of the portal.

**includeDrafts** `string` (default: false)

Set to `"true"` to download the latest version of each article, which may be a draft. The Sync lists published portal articles either way.

## Knowledge Base Articles

Send a request to [Enable Sync](https://docs.useparagon.com/managed-sync/api/enable-a-sync.md) to start a sync of Knowledge Hub articles from eGain as custom records.

```json Example theme={null}
{
    "integration": "egain",
    "pipeline": "articles",
    "configuration": {
        "portalId": "PROD-1000"
    }
}
```

Each record includes the article's title, status, draft flag, locale, visibility, topic hierarchy, portal, public URL, and created, updated and published dates. The record's `originalRecord` contains the full eGain article object. When you [download the content](https://docs.useparagon.com/managed-sync/api/download-content.md) of a synced article, Paragon returns the article as a Markdown document.

**Configuration options:**

The `articles` pipeline accepts the same `portalId`, `language`, `topicId`, `searchQuery` and `includeDrafts` options as the [Files](#files) pipeline.
