ソーシャル投稿タグ・スクリプトのマップ
Social Cloudのソーシャル・ポストに関連付けられたタグは、Fusion Serviceに送信できます。
これらのタグはアプリケーションに表示されませんが、Groovyスクリプトで使用できます。 このスクリプトは、Social Cloudのソーシャル投稿ラベルをFusionサービスのソーシャル投稿タグにマップします。 エージェントはこれらのタグを使用して、SRに対して適切なアクションを実行できます。
たとえば、ソーシャル・ポストが緊急としてタグ付けされている場合、次のコードを使用してSR重大度をSEV1に設定します:
// do nothing if there are no channel vias
if (!channelCommunication.hasNext()) {
return;
}
// use the first channel via
def channelVia = channelCommunication.next();
// do nothing if the channel via is not a social channel type
if (channelVia.ChannelTypeCd != 'ORA_SVC_SOCIAL') {
return;
}
// using inbound object id as post id, find the social post
def postId = channelVia.InboundObjectId;
def key = key(postId);
def socialPostVO = newView('SocialPostVO');
def socialPosts = socialPostVO.findByKey(key, 1);
// do nothing if the social post is not found
if (socialPosts == null || socialPosts.size() == 0) {
return;
}
// use the first social post
def socialPost = socialPosts[0];
// iterate over tags on the social post
def socialPostTags = socialPost.SocialPostTags;
while (socialPostTags.hasNext()) {
def tag = socialPostTags.next();
// One example: Set the SR Severity to SEV1 if social post is tagged with "urgent"
if (tag.Tag == 'urgent') {
setAttribute('SeverityCd', 'ORA_SVC_SEV1'); break;
}
}