Employee Organization Session Attributes

Objective

This document will introduce and demonstrate Employee Attributes, Organization Attributes and Session Attributes usage on the VoiceWorx platform.

Introduction

The VoiceWorx platform allows the user to store common properties or attributes of the employee and organization. However, in some cases user may want to store some information about an employee or the organization which is not available in the platform. To solve this issue, the VoiceWorx platform has a feature which allows to store user defined attributes for the employee and organization.

Similarly, for the methods defined in the custom skill, you can create various short-lived attributes called session attributes, this document will help to understand these attributes.

Goal

Our goal is to demonstrate creating and using Employee Attributes, Organization Attributes and Session Attributes.

Pre-requisites

  1. A VoiceWorx Account

For steps to create a VoiceWorx account, follow the steps at https://docs.voiceworx.ai/general/voiceworx-create-account

  1. A custom app created on the VoiceWorx platform. Please follow this document to create a new app if you do not have an existing app on VoiceWorx.

Steps

The following shows the general steps/activities that will be carried out in setting up these attributes.

  1. Sign up for VoiceWorx platform (Part of pre-requisites)

  2. Use an existing custom app defined on the VoiceWorx.

  3. Employee Attributes.

  4. Organization Attributes.

  5. Session Attributes.

Employee Attributes

  1. Login to the VoiceWorx portal at https://portal.voiceworx.ai

  2. Use left navigation menu and click “Account Setup” then select “Profile” as shown below.

  1. This action will redirect the user to the “Setup Profile” screen where the user will provide “Employee Attributes” as shown below.

  2. Click “save” and the “Employee Attributes” should be created successfully.

Now these “Employee Attributes” can be used in the method for any custom skill.

Example Employee Attributes:

{

"EmployeeCode": "Emp001",

"EducationalLevel": "Graduation",

"Skills":"hardworking, productive"

}

*Note: A valid JSON should be provided in terms of Key-Value pair as shown in the example in the screenshot. One or more attributes can be used as required.

Using Employee Attributes in a Method

  1. This guide assumes that at least one custom app and at least one method for the custom app has been created.

  2. Use left navigation menu and click “Custom Apps” then select “Manage Apps”.A list of created custom apps will appear and an option to create a new app is available.

  3. Select an app of your choice and use the top tabs and select “Methods” tab. The screen will be shown below.

  1. Click “Create New Method” to open a method popup.

(To use an existing method, open a method by clicking “EDIT”.)

  1. Use Employee Attributes in the format {{Employee.AttributeName}} as shown below in screenshot.

  1. Employee Attributes can be used in any of the below inputs

Method Parameters

Record Template

Result Template

Empty Result Template

Organization Attributes

  1. Organization attributes can be created by Organization admin only. So it is important to be signed in as an organization admin to the VoiceWorx portal at https://portal.voiceworx.ai.

  2. Once logged in, use the left navigation menu and select “Administration” then select “Organization”.

  3. Select the version of SmartOffice and click on “Update Organization.” screen will appear as shown below. Click “Update Organization”.

  1. A popup screen with few inputs related to organization will appear. Scroll down to option for the “Organization Attributes”.

  2. Like “Employee Attributes”, “Organization Attributes” also is a collection of Key Value pairs.

  3. Provide one or more attributes in terms of Key-Value pair in JSON format as shown in the screenshot below.

  1. Now click “Update” and a success message will appear at the top of the screen as shown below.

Using Organization Attributes in a method.

  1. Usage of “Organization Attributes” is almost the same as using “Employee Attributes”.

  2. Use “Employee Attributes” in the format {{Organization.AttributeName}}

  3. “Organization Attributes” can also be used in any of the below inputs”

Method Parameters

Record Template

Result Template

Empty Result Template

Session Attributes

  1. “Session Attributes” features allow a skill to store a JSON value in session on the VoiceWorx platform for a limited time during a custom skill execution. The values are stored in the cache for the employee using the skill.

  2. Like “Employee & Session Attributes” are a collection of Key Value pair the following should be noted:

The Attribute Name will be an alphanumeric value.

The Attribute Value can contain a static value or variables with {{}} notation.

Session Attribute Values can be a static string, a dynamic value using parameters, or it might also be complex JSON objects depending on what the skill developer decides to store in session.

Session Attributes are defined in the method.

Once session attribute is stored, it can be used by any other method or skill of the same employee as Session Attributes are based on Employee.

Create Session Attributes

  1. Use left navigation menu and click “Custom Apps” then select “Manage Apps”. A list of created custom apps will appear and an option to create a new app is available.

  2. Select an app of your choice and use the top tabs and select “Methods” tab. The screen will be shown below.

  1. Click “Create New Method” to open a method popup.

  2. Scroll down till you see the “Session Attributes” section as shown in the screenshot below.

  1. Now click “Session Attributes”. This will expand the section and will allow to define one or more “Session Attributes”. Once expanded, it should look like this.

  1. Enter “Attribute Name” and “Attribute Value” and click “Add” to add a “Session Attribute”. To add another attribute, repeat these directions. Added attributes are displayed as shown in the screenshot below.

  1. To save the method, provide other inputs required by the method and click “save”.

Use Session Attributes

  1. “Session Attributes” can be accessed just like accessing “Employee Attributes”.

To access “Session Attributes” named VehicleModel, use {{Session.VehicleModel}}.

“Session Attributes” becomes available once the method is executed which defines it and “Session Attributes” can be accessed by any other method of the skill by the same user or employee.

  1. The following is an example of using “Session Attributes” in a method parameter.

  1. Session Attributes can be used in any of the below inputs:

Method Parameters

Record Template

Result Template

Empty Result Template

Built-In Attributes

VoiceWorx supports few built in attributes related to the current user and user’s organization. As those are built in, it can be used directly in the methods. There is no need to define those anywhere.

  • Context.Email

  • Context.Phone

  • Context.Name

  • Context.FirstName

  • Context.LastName

  • Context.EmployeeID

  • Context.OrganizationID

Usage Example:

{{Context.EmployeeID}} will return EmployeeID of the user who is accessing the skill.

Congratulations!

You have successfully completed building Employee, Organization, & Session Attributes.

Last updated