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 6 Next »

Many voice applications require information to persist well after the voice session has ended. For example, you might want to collect information from a user and store it. This is easy to accomplish in Orbita through the use of data collections. To do this, you need to first create a schema that describes your data. In Orbita, you describe your data using something called a Dynamic Data Schema.

If you are familiar with databases, you can think of a Dynamic Data Schema as the schema for an object stored within the database. You can create Dynamic Data Schemas to represent any structure you need.

In this example, you are creating a Dynamic Data Schema that tracks the number of times a user uses a voice application, so it will include properties with various types such as:

  • Number of Visits (Number)

  • User (ID)

  • Last Visit (Date)

The Dynamic Data Schemas we'll create will be called VisitTracker. This article describes the steps needed for creating this schema.

  1. Log in as an Administrator to the Experience Manager.

  2. Click Schema Management and then Content Types

  3. Click plus button in the middle panel

  4. Enter the following information:
    Name = VisitTracker
    Description = Track the number of visits
    Tags = VisitTracker

  5. In the schema edit panel, enter:

    {
      "fields": [
        {
          "key": "yearmonthday",
          "label": "year month day",
          "isDefault": true,
          "validation": [
            {
              "required": true
            }
          ],
          "options": [],
          "ref": "",
          "fieldType": "text",
          "type": "String"
        },
        {
          "label": "Number of Visits",
          "key": "numbervisits",
          "isDefault": false,
          "validation": [
            {
              "required": true
            }
          ],
          "options": [],
          "ref": "",
          "fieldType": "text",
          "type": "Number"
        },
        {
          "label": "UserId",
          "key": "userid",
          "isDefault": true,
          "validation": [
            {
              "required": true
            }
          ],
          "options": [],
          "ref": "",
          "fieldType": "text",
          "type": "String"
        }
      ]
    }
  6. Click the Check icon when you are done to save your changes

Now that you've created the Dynamic Data Schema, you need to create data based on this schema. Read the following KB Articles for additional information on how to do this:

  • Creating, Reading, Updating, and Deleting Dynamic Data using Dynamic Data Manager (KB Article Coming Soon)

  • Creating, Reading, Updating, and Deleting Dynamic Data using the REST APIs (KB Article Coming Soon)

  • See Also: Using the Orbita REST APIs (YouTube Video)

Editing Tip

You can copy the code from above and paste it into the Schema edit panel. You can also use an online JSON editor, such as http://www.jsoneditoronline.org/, to create your JSON code. It will help ensure your JSON is well-formed. When you are done, you can copy and paste it from the editor into the Schema edit panel.

More information about the Dynamic Data schema in the below document

Related Articles

  • No labels