Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

This article shows how to create a content type (such as Fruit Nutrition), and how to create a content item (such as Apple, Banana, Cantaloupe, Durian, and so on). Content lets you define items to use in a conversational experience. For example, you may have a conversational experience that provides health benefits of fruit. In the Fruit Nutrition content type, you could have the following discrete content items, as the following image shows.

Your voice experience may include questions such as "What are the nutritional facts about bananas?" (to return a specific answer) or "Give me another tip for healthy eating." (to return a random sample from the content group). Of course, you can have many more items than are shown in this example.

Create a content type

Important: Creating a content type involves knowledge of JSON coding.

Content types are created from schemas. See How do I create a schema?

  1. In the global menu, select Develop > Schema.

  2. Click Add (+) to start a new schema. Select Content as the schema type and click Add.

  3. The following image shows a partial Edit Schema form.

    Note: You can cut and paste the following sample code to the Schema Editor and modify the fields that appear when you create a content item:

    {
      "fields" : [
                  {
                    "key"        : "speaker",
                    "label"      : "Speaker voice",
                    "isDefault"  : false,
                    "validation" : [{ "required" : "false" }],
                    "options"    : [],
                    "ref"        : "",
                    "fieldType"  : "text",
                    "type"       : "Object"
                  },
                  {
                    "key"        : "source",
                    "label"      : "Source",
                    "isDefault"  : false,
                    "validation" : [{ "required": "true" }],
                    "options"    : [],
                    "ref"        : "",
                    "fieldType"  : "text",
                    "type"       : "Object"
                  },
                  {
                    "key"        : "tip",
                    "label"      : "Nutrition Tip",
                    "isDefault"  : true,
                    "validation" : [{ "required": "true" }],
                    "options"    : [],
                    "ref"        : "",
                    "fieldType"  : "richtext",
                    "type"       : "Object"
                  },
                  {
                    "label"      : "Title",
                    "key"        : "title",
                    "isDefault"  : false,
                    "validation" : [],
                    "options"    : [],
                    "ref"        : "",
                    "fieldType"  : "text",
                    "type"       : "String"
                  },
                  {
                    "label"      : "Tags",
                    "key"        : "tags",
                    "isDefault"  : false,
                    "validation" : [],
                    "options"    : [],
                    "ref"        : "",
                    "fieldType"  : "text",
                    "type"       : "Object"
                  }
                 ]
  4. Click Save (checkmark).

Create a content item

You can create content data using Dynamic Data Manager node or you can add content data manually. See How to use the Dynamic Data Manager node.

Use the following steps to create content data manually:

  1. To create content data locally, go to the project and click on Content from the side menu bar.

  2. Select a content type (such as Fruit Nutrition).

    For each content type, repeat the following steps

  3. Click Add (+) to get the Add content pop up window.

  4. Enter a content name and select the content type. Click Add for the content form to appear. (To edit an existing content item, open the vertical ellipsis and choose Edit for the content form to appear.)

  5. After you fill out the form and save it, the detail view appears.

Related Articles

  • No labels