> For the complete documentation index, see [llms.txt](https://docs.aisera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aisera.com/aisera-platform/content-generation-from-tickets/analyze-kb-article-generation-results/ai-generated-documents-from-single-tickets.md).

# AI Generated Documents from Single Tickets

The **Single Ticket Generation** feature is specific to the **Agent Assist** application/bot.

During issue investigation, human IT Service Desk Agents often encounter scenarios where:&#x20;

* No existing Aisera Answer or Next Best Action (NBA) helps resolve the problem.&#x20;
* The IT Service Desk Agent has already added detailed investigation notes in the ticket.&#x20;

In such cases, waiting for a batch job to trigger a **Knowledge Generation** delays the process. With on-demand knowledge generation, human IT Service Desk Agents can immediately create a knowledge document from a single ticket, making it instantly available for others.&#x20;

This ensures valuable knowledge is captured and shared without unnecessary waiting periods, improving efficiency and collaboration across the team.&#x20;

### Document Generation from Agent Assist Side&#x20;

&#x20;**General Rules for Knowledge Generation from a Single Ticket:** Agents can manually trigger knowledge generation from Agent Assist for any ticket except:&#x20;

* Tickets for which a document has already been generated, either:&#x20;
* Via batch processing (representative tickets), or&#x20;
* Generated via Agent Assist from single ticket.&#x20;

For such tickets, the generated document will be directly available via the **Generate Knowledge** job.&#x20;

### Supported Platforms&#x20;

The **Generate Knowledge** feature in an **Agent Assist** bot is supported for the following systems:&#x20;

* **Salesforce**&#x20;
* **ServiceNow**&#x20;
* **Zendesk**&#x20;

Any **Agent Assist** application/bot configured in these systems will include the **Single Ticket** generation capability. You need to configure a section of the Agent Assist UI that adds the Single Tickets button and customizes the Ui for the external data source - this is known as the **widget configuration** (specific parameters for Salesforce, ServiceNow,or Zendesk).

### Configuration Steps from External source system&#x20;

&#x20;Use the following steps to set the external data source parameters.

1. Enable **Knowledge Generation**&#x20;
   1. Go to Ticket AI Agent Assist Channel Policy.&#x20;
   2. Enable knowledge generation by setting: generatedKnowledge: true&#x20;
2. Enable **Publish to Source** (Optional)&#x20;
   1. If you want to publish the generated document back to your source system (e.g., Salesforce, ServiceNow, Zendesk), set: showPublishToSor: true&#x20;
3. Choose a Template&#x20;
   1. Select one of the available templates:&#x20;
      1. KCS&#x20;
      2. Default&#x20;

<div align="left"><figure><img src="/files/jZqOmg7HsAJPDP9tdD6z" alt="" width="277"><figcaption></figcaption></figure></div>

The template you choose will determine the format of the generated knowledge article.&#x20;

<div align="left"><figure><img src="/files/7BaLIg2d6zws7TkfsRx9" alt="" width="324"><figcaption></figcaption></figure></div>

To generate and publish the document, the following configurations are mandatory:&#x20;

* Proper ticket details mapping&#x20;
* Workflow creation&#x20;
* Event creation&#x20;

Refer to the [Setup Guide for Knowledge Generation](bookmark://_Toc224128542) for detailed configuration steps.&#x20;

### Using the Single Ticket Feature in Agent Assist&#x20;

Once enabled, the **Generate Knowledge** button will appear for all tickets within **Agent Assist**.&#x20;

If the ticket already has a generated document (via batch or manual process), the button will be hidden, and the document will be shown directly in the widget.&#x20;

For batch-generated master documents:&#x20;

If multiple representative tickets contributed to the same document, agents will see the same master document across all those tickets.&#x20;

#### Limiting the Generate Knowledge and Publish button&#x20;

&#x20;**Button Access Control for ServiceNow, Salesforce, and Zendesk:**&#x20;

In companies with very large customer bases, there are often millions of tickets and few hundred human IT Service Agents, so granting document generation access to every human agent can lead to an unmanageable number of documents. Therefore, it is a best practice to have strict control over who can generate a document, and, after generation, who can publish it to the source system, such as ServiceNow, Salesforce, or Zendesk.&#x20;

#### Access Management from the Data Source Application

**To configure this from your ServiceNow or Salesforce side, have your ServiceNow or Salesforce System Administrtor navigate to:** \
**Setup → Profile → Custom Permissions** in ServiceNow or Salesforc&#x65;**.**

Within these applications, the System Admin will find two permissions:&#x20;

1. Generate Knowledge&#x20;
2. Publish to SOR (System of Record)&#x20;

Access to either or both of these permissions can be granted based on the specific use case.&#x20;

After the permissions have been updated, application/bot users with the Generate Knowledge permission will see the Generate Knowledge button within the Agent Assist UI after they log in, while users with **Publish to SOR** permission will see the **Publish** button.&#x20;

However, knowledge generated by an agent with access can still be viewed by other agents. This allows them to reference the resolutions and use them to address similar issues.&#x20;

<div align="left"><figure><img src="/files/DCH8jIEAI3bYphJMak2S" alt="" width="560"><figcaption></figcaption></figure></div>

While we manage document generation access through **ServiceNow**, **Salesforce**, and **Zendesk**, there are also parameters that must be set from the **Aisera Admin UI**.&#x20;

#### &#x20;Access Management from the Aisera Admin UI

Implementing access control within the Admin UI provides flexibility to define:&#x20;

* Who can trigger the job&#x20;
* Who can publish the generated documents&#x20;
* Who can generate documents from a single ticket within the Admin UI&#x20;

This helps you maintain better control and ensures smoother operational management. &#x20;

1. To control the **Generate Knowledge** and **Publish (Publish to SOR** and **Publish to Aisera**) permissions, navigate to: \
   **Settings → User Account → Roles → New Role**&#x20;

<div align="left"><figure><img src="/files/6Zl36IbgFiRGdwhuwoFi" alt=""><figcaption></figcaption></figure></div>

2. A configuration window appears that includes the **Generate Knowledge** parameter, where you can set permissions as follows:&#x20;

* **Read** – The Generate Knowledge button is visible but disabled.&#x20;
* **Write** – The Generate Knowledge button is enabled; the user can generate documents from both single and bulk tickets.&#x20;
* **None** – The Generate Knowledge button is not visible to the user.&#x20;

3. Perform the same steps as above with the **Publish** parameter. This will control the **Publish to Aisera** and **Publish to SOR** options.

<div align="left"><figure><img src="/files/5rPCFTlw1OtbC64mNCg2" alt=""><figcaption></figcaption></figure></div>

### Processing & Refresh Behavior&#x20;

After you select the **Generate Knowledge** button, a processing status icon appears. The Aisera GenAI plarform refreshes at the specified interval to check if the document is ready.&#x20;

If your document is still in progress after the configured refresh attempts, you will see:&#x20;

`Document generation in progress. Please refresh the widget after some time to view the status.`

Human IT Service Agents can manually refresh the UI (data source specific widget) to view the document after generation is complete and it is available.&#x20;

<div align="left"><figure><img src="/files/4YHtZ0cWU9iFGVebZtQd" alt="" width="378"><figcaption></figcaption></figure></div>

If the document does not appear within 30 minutes, the **Generate Knowledge** button is re-enabled to allow you to perform the Generate Knowledge command again.&#x20;

{% hint style="info" %}
**NOTE:** The first successfully generated document is retained, even if multiple attempts are made.
{% endhint %}

&#x20;

&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.aisera.com/aisera-platform/content-generation-from-tickets/analyze-kb-article-generation-results/ai-generated-documents-from-single-tickets.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
