By using Pega Knowledge snippets authors can reuse specific pieces of text in multiple articles, such as a reoccurring paragraph that describes terms and conditions or other common terms and phrases. Authors can create, publish, and archive snippets. Other authors can then add the published snippets to the body of an article. When the original snippet changes or updates, Pega Knowledge automatically updates the changes in all of the content that uses that snippet.
When creating snippets, you can also set the visibility of a snippet based on one or more access roles. Only users with the selected access roles can see the snippet text when you do so. Access role-based snippets allow you to create a single article with multiple paragraphs, sections, or lines of text that support many different groups by region or line of business without the need to create multiple articles.
Creating a snippet
- In the navigation pane of Pega Knowlege, click Knowledge > Snippets.
- Click New Snippet.
- In the New snippet window, in the Title field, enter a unique name that describes the purpose of the snippet.
- In the Content section, in the rich text editor, enter the text that you want to reuse in the content body.
Note: To add one or more access roles to the snippet, in the Authorized role list, select each access role, and then click Add. Only users with the selected access roles can view the snippet text in an article.
- Click Save draft.
- Click Publish.
The snippet is now published and available for use in knowledge articles.
- Optional: To view draft snippets, in the left navigation pane of Pega Knowledge, click Knowledge > Snippets, and then click the Draft tab.
- Optional: To view published snippets, click the Published tab.
Adding snippets to articles
Once you create a snippet, you can insert the snippet the body of any created content.
- In the header of Pega Knowledge, click Create > Create content.
- In the body of the content, click the place where you want to insert the text snippet.
- Click the Add a snippet icon to view a list of available snippets.
- In the Add Snippet window, select the snippet that you want to add to the content body.
Your chosen snippet is displayed in the body of the content. To remove an existing snippet from body of the content, select the snippet, and then click the Remove a snippet icon.
The following figure shows the Add a snippet and Remove a snippet icons: