{"id":21368,"date":"2019-06-06T07:33:41","date_gmt":"2019-06-06T06:33:41","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=21368"},"modified":"2022-09-30T20:05:31","modified_gmt":"2022-09-30T19:05:31","slug":"custom-meta-tags","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-builder-tool\/dialog-task\/custom-meta-tags\/","title":{"rendered":"Custom Meta Tags"},"content":{"rendered":"<p><span style=\"font-weight: 400\">While analyzing your Virtual Assistant\u2019s performances, you might want to give preference to or discard a particular scenario. For example, you might want to track how many people are booking tickets to <\/span><em><span style=\"font-weight: 400\">Chicago<\/span><\/em><span style=\"font-weight: 400\">. Or you might want to track how a specific user, a premium customer, requests are being fulfilled.<\/span><\/p>\n<p><span style=\"font-weight: 400\">By adding <\/span><strong>Custom Meta Tags<\/strong><span style=\"font-weight: 400\"> to the conversation flows, you will be able to profile VA-user conversations and derive business-critical insights from usage and execution metrics. Tags can be defined as part of the VA definition at any point of interest. When users interact with your VA, the platform will dynamically resolve these tags and add them to chat transcripts so that you can later filter your conversations, and flows using these tags.<\/span><\/p>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Defining_Meta_Tags\"><span style=\"font-weight: 400\">Defining Meta Tags<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">The Kore.ai XO Platform allows you to add tags to various nodes in a dialog task like dialog node, entity node, etc.<\/span><\/p>\n<p><span style=\"font-weight: 400\">This option is available from the <\/span><strong>Instance Properties<\/strong><span style=\"font-weight: 400\"> tab, under <\/span><strong>Advanced Controls<\/strong><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930200131\/instance-custom-tags.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47037\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930200131\/instance-custom-tags.png\" alt=\"\" width=\"402\" height=\"524\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930200131\/instance-custom-tags.png 540w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220930200131\/instance-custom-tags-230x300.png 230w\" sizes=\"auto, (max-width: 402px) 100vw, 402px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">You can define these tags at three levels:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><strong>User Level<\/strong><span style=\"font-weight: 400\">: These tags can be added to the user\u2019s profile information to capture user information. For example, to track conversations with a premium customer you will define a user-level tag with the user name or some qualifier as the value.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Message Level<\/strong><span style=\"font-weight: 400\">: These tags can be added to the message of the current node. If the current node is not associated with a message, then the tag gets added to the immediately previous node that has a message associated with it. From the above example, to track bookings to a specific city <\/span><em><span style=\"font-weight: 400\">Chicago<\/span><\/em><span style=\"font-weight: 400\">, you would be defining a Message Level tag.<\/span><span style=\"font-weight: 400\"><br \/><\/span><span style=\"font-weight: 400\">The platform will roll-up these message level tags to task level. That is if a task ends up as \u2018Success\/Failed Task\u2019, then all the \u2018message level\u2019 tags emitted anywhere during the task execution will be associated with the Success\/Failed Task event. You can filter Success Tasks as well as Failed Tasks using the message level tags emitted anywhere during the task execution<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Session Level<\/strong><span style=\"font-weight: 400\">: These tags can be added at the current session of the user. These can be used to track the conversation sessions from a specific time frame say holiday season or a geographic domain.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">The tag values will be emitted at run time:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">For service, script, webhook and form nodes, tags will be emitted on reaching the nodes;<\/span><\/li>\n<li style=\"font-weight: 400\">For entity, message, confirmation, and other nodes, tags will be emitted on the successful execution of the nodes.<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">You can also define Tags as key-value pairs from a <\/span><strong>Script<\/strong><span style=\"font-weight: 400\"> written anywhere in the application like in the <\/span><em><span style=\"font-weight: 400\">Script <\/span><\/em><span style=\"font-weight: 400\">node, <\/span><em><span style=\"font-weight: 400\">Message<\/span><\/em><span style=\"font-weight: 400\">, <\/span><em><span style=\"font-weight: 400\">Entity<\/span><\/em><span style=\"font-weight: 400\">, Confirmation Prompts, Error Prompts, Knowledge Task Responses, BotKit SDK, etc. This would be useful if you want conditional tagging.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Be aware that Script tagging would work only if the prompt where you added the tag script is triggered during the conversation.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The following script can be used to add meta tags:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">To add a User level tag:<\/span><span style=\"font-weight: 400\"><br \/><\/span><code><span style=\"font-weight: 400\">tags.addUserLevelTag(\"tagname\",\"tagvalue\")<\/span><\/code><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">To add a Session level tag:<\/span><span style=\"font-weight: 400\"><br \/><\/span><code><span style=\"font-weight: 400\">tags.addSessionLevelTag(\"tagname\",\"tagvalue\")<\/span><\/code><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">To add a Message level tag:<\/span><span style=\"font-weight: 400\"><br \/><\/span><code><span style=\"font-weight: 400\">tags.addMessageLevelTag(\"tagname\",\"tagvalue\")<\/span><\/code><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">The tag value can be a value or a variable name containing the value.<\/span><\/p>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n<h1><span class=\"ez-toc-section\" id=\"Updating_Meta_Tag_Values\"><span style=\"font-weight: 400\">Updating Meta Tag Values<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">Chances are the Meta Tag values, once assigned, may be modified, for either business or other reasons. In such cases the following points need to be noted:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The latest value assigned for a key will override the previously assigned value.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The updates to the tags follow these rules:<\/span><\/li>\n<ul>\n<li style=\"font-weight: 400\"><strong>Message-level tags<\/strong><span style=\"font-weight: 400\">: You may set a value for a tag multiple times within the script and the last set value will be assigned against the message. The value cannot be updated after the message is sent to the user<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Session level tags<\/strong><span style=\"font-weight: 400\">: The value for a given tag can be set any number of times throughout the session. The last value assigned will be retained and this is the value that you should be using for all analytics purposes. Values cannot be updated after the session is closed.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>User level tags<\/strong><span style=\"font-weight: 400\">: Values for a given tag can be set any number of times throughout the session. The last value assigned will be retained and this is the value that you should be using for all analytics purposes. Values can be edited at any time.<\/span><\/li>\n<\/ul>\n<\/ul>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Using_Meta_Tags\"><span style=\"font-weight: 400\">Using Meta Tags<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">Once you have defined the Meta Tags, you can:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Use the filter option from NLP Insights to filter the conversations based upon the Meta Tag values. The export file for the NLP Insights would include the Meta tag information, too. <\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/analyzing-your-bot\/bot-analysis\/\"><span style=\"font-weight: 400\">See here for more<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Use the filter option from <\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/analyzing-your-bot\/dashboard\/#Tag_based_Filters\"><span style=\"font-weight: 400\">Usage Metrics Dashboard<\/span><\/a><span style=\"font-weight: 400\"> and <\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-admin-bots-bots\/adminconsole\/#Dashboard\"><span style=\"font-weight: 400\">Admin Console Dashboard<\/span><\/a><span style=\"font-weight: 400\"> to filter activity details based upon the Meta Tag values.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Use to filter the Chat History. Export of Chat History will also include the Meta Tag values. <\/span><a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-admin-bots-bots\/analytics\/#Viewing_Chat_History\"><span style=\"font-weight: 400\">See here for more<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Filter the records from Conversation History API and Sessions API by meta tags.<\/span><\/li>\n<\/ul>\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>While analyzing your Virtual Assistant\u2019s performances, you might want to give preference to or discard a particular scenario. For example, you might want to track how many people are booking tickets to Chicago. Or you might want to track how a specific user, a premium customer, requests are being fulfilled. By adding Custom Meta Tags&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-21368","post","type-post","status-publish","format-standard","hentry","category-dialog-task"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/21368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=21368"}],"version-history":[{"count":12,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/21368\/revisions"}],"predecessor-version":[{"id":47041,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/21368\/revisions\/47041"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=21368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=21368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=21368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}