【问题标题】:ServiceNow email notification with embeded survey带有嵌入式调查的 ServiceNow 电子邮件通知
【发布时间】:2018-12-28 03:16:36
【问题描述】:

我看到其他开发人员创建了电子邮件通知并嵌入了调查的第一个问题。 https://community.servicenow.com/community?id=community_question&sys_id=32f20ba1dbd8dbc01dcaf3231f961948

就我而言,我发送了 5 张笑脸,从非常不满意 (1) 到非常满意 (5)。当客户点击它时,每个笑脸都有一个评分/分数。单击它时,我希望将调查评级填充到调查表格上的相应评级,然后允许用户完成剩余的问题。
我有通知工作,每个笑脸都有指向带有适当等级参数的调查的 url 链接。 我没有使用 gelly 或 DOM 的经验。 任何人都可以分享我可以用来完成此任务的适当代码吗?或者引导我走向正确的方向? 非常感谢。 Notification Email

【问题讨论】:

  • 是果冻,不是凝胶
  • 我的错,意思是果冻。
  • 我没有意识到我可以编辑标签。将其编辑为正确的标签。

标签: dom survey servicenow jelly


【解决方案1】:

所以这听起来很像ask。我回答并在我的blog here 上发布了它。

您几乎需要使用 url 参数在电子邮件中动态创建链接,并处理重定向(如果有)或消息;如果您的链接采用以下格式,这可能会起作用;

https://instance.service-now.com/custom_survey_response.do?response=1&incident=INC12345

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
  <g2:evaluate var="jvar_unwrapped_url" jelly="true">
    var currentUser = gs.getUserID();
    var incidentFromURL = RP.getParameterValue('incident');
    var responseFromURL = RP.getParameterValue('response');
    var link = '';
    var incident = new GlideRecord('incident');
    if(incident.get('number', incidentFromURL)) { //found incident
      // query survey tables, and do an insert on appropriate tables
      // currentUser is string of user sys_id,
      // incident is gliderecord of incident
      // responseFromURL is the numeric value set by the url param in your notification
    }
  </g2:evaluate>
  ${gs.getMessage("Thanks for your response")}
</j:jelly>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-29
    • 2012-12-11
    • 2012-04-07
    • 1970-01-01
    • 1970-01-01
    • 2019-10-30
    相关资源
    最近更新 更多