Content Variables

Updated 

In some cases, certain words or phrases within an article may need to be regularly updated manually. For instance, in the case of a global company like ACME with a complex pricing structure across multiple countries and regions, maintaining such information can be challenging. To address this issue, content variables or placeholders can be added to the article, allowing for the simultaneous updating of these words or phrases across all relevant articles.

Sprinklr Knowledge Base supports the following types of Content Variables:

  • Plain Text Content Variable: It supports unformatted, basic text, making it ideal for inline use.

  • Rich Text Content Variable: It supports HTML and styling, making it ideal for standalone content.

Create a Content Variable

Follow these steps to create a Content Variable:

  1. Go to Knowledge Base on the Launchpad under the Resolve column. Alternatively, search for 'Knowledge Base' in the Launchpad search bar.

  2. Select Content Variables from the Left Pane to show the Content Variables Record Manager.

  3. Click the Plain Text Variable at the top right of the record manager to open the Create Plain Text Variable page. If you want to create a Rich text Content Variable, click the down arrow next to the Plain Text Variable button and click the Rich Text Variable button.

  4. Fill in the required fields on the content variable creation page. Fields marked with a red dot are mandatory. Below are the descriptions of the fields on this page:

    1. Name: Enter the name of the Content Variable. (Required)

    2. Description: Briefly describe the Content Variable for easy identification.

  5. In the Variant Condition section, define the Content Variable based on parameters, such as the language and country. You can also define the Content Variable based on Custom Fields.

    1. Country: Select the country for which you want to configure the Content Variable. Select Global if you want the Content Variable to remain constant across regions. (Required)

    2. Default Value: Enter the data to be displayed in the Content Variable for the selected country. If you are creating a Rich text Content Variable, you can format the content by changing the font, font size, font color, indentation, and more. (Required)

  6. Toggle on the Add Language Variants slider to define the Content Variable based on the languages. Select the language, and the relevant value. You can also define values for desktop and mobile separately.

  7. Toggle on the Add Custom Fields slider to define the Content Variable based on the Custom Fields available in your Workspace.

    1. Select Field: Select the Custom Field in this field.

    2. Select Operator: Select an operator to be applied.

    3. Select Values: Select the value that will be checked for the Custom Field, depending on the select operator.

  8. Click the Add Condition button to use multiple Custom Fields to define the Content Variable. If multiple Custom Fields are selected, you can define the conditions between them as either AND or OR.

    1. AND: The AND function narrows down results by combining multiple conditions. All conditions must be met for an item to be included in the results.

    2. OR: The OR function widens the results by including items that meet at least one of the conditions.

  9. Click the Create button at the bottom right of the page to create the Content Variable. Once saved, you can view, edit, or delete a content variable.

    Note: If you make changes to a Content Variable after it is used in the articles, those changes will be applied to all articles that use that particular variable.

Add Content Variables in Articles

Once you have create the required Content Variables, you can add them to articles. Follow these steps to add Content Variables in articles:

  1. Edit the desired article or create a new article.

  2. On the article editor, click the Addition icon, hover over the Embed option and select Content Variable. This will open the Add Content Variable window.

The Add Content Variable window will show the list of all available Content Variables in your workspace, from which you can search for the required Content Variable. You can also filter the Content Variables based on Plain Text or Rich Text.

Note: Rich Text Content Variables cannot be added inline. They can only be added when the cursor is in a new line.

Save the article. As per the selected country, language, and Custom Field for the article, the defined variable value will be inserted. Once added, view the preview the Content Variable in the third pane.