im体育app平台帮助中心

CSL——调查变量

CheckMarket 提供了一种强大的脚本语言来增强您的调查和报告,称为 CheckMarket 脚本语言 或简称CSL

在最基本的层面上,它易于im体育官app使用。您可以im体育官app使用它通过从下拉列表中选择变量来将变量放置在您的调查和报告中。

本文列出了调查界面(SI) 中可用的变量。其中包括以下地方:

  • 调查:受访者填写时的调查本身
  • 电子邮件:邀请、提醒和感谢邮件
  • 通知:所有不同类型的通知

默认上下文始终是当前调查、当前受访者、当前联系人和当前语言。

基本概念

句法

脚本语言中的变量用双大括号括起来,像这样: {{someVariable}} 。它们不区分大小写,因此 {{SomeVariable}} 与 {{someVariable}} 相同。

等级制度

这些变量是分层的,因此您可以im体育官app使用点符号从顶层对象向下导航来浏览它们。以下是测量界面中的顶级对象:

  • Survey : 调查的详细信息和调查中所有问题的收集
  • Respondent :填写调查的当前受访者的回复和其他元数据
  • Contact :填写调查中联系人的元数据。并非所有受访者都是联系人

调查界面变量列表

多变的 描述
{{survey.id}}
调查ID
{{survey.title}}
当前语言的调查标题
{{survey.clientRef}}
获取调查参考
{{survey.maxScore}}
获得调查的最高
{{survey.dateCreated}}
显示调查的创建日期
{{survey.startDate}}
显示调查的开始日期
{{survey.endDate}}
显示调查的结束日期
{{survey.status}} {{survey.status.id}}
以当前语言获取调查状态的文本标签——添加“id”以获取状态的 id
{{survey.defaultLanguage}} {{survey.defaultLanguage.code}}
返回当前语言的名称默认语言——您可以添加“代码”以获取语言代码
{{survey.url}} {{survey.url.en}} {{survey.url.languageSelection}} {{survey.url.otherLanguages}}
当前语言的调查的“实时”URL – 您还可以将特定语言代码添加到该语言的 URL
{{survey.signInUrl}} {{survey.signInUrl.en}}
当前语言的调查登录页面的 URL – 您还可以将特定语言代码添加到该语言的 URL
{{survey.privacyNoticeUrl}} {{survey.privacyNoticeUrl.en}}
当前语言的调查隐私声明的 URL – 您还可以将特定语言代码添加到该语言的 URL
{{survey.printingUrl}} {{survey.printingUrl.en}}
当前语言的可打印版本调查的 URL – 您还可以将特定语言代码添加到该语言的 URL
{{survey.editUrl}}
CheckMarket 工具中编辑问题页面的 URL
{{survey.notifications.editUrl}}
CheckMarket 工具中管理通知页面的 URL
{{notification}} {{notification.id}} {{notification.name}}
仅在通知中有效
{{survey.owner}} {{survey.owner.company}} {{survey.owner.firstName}} {{survey.owner.lastName}} {{survey.owner.fullName}} {{survey.owner.email}} {{survey.owner.phone}} {{survey.owner.language.code}}
有关拥有此调查的 CheckMarket 用户的信息。

请注意,“问题”是复数。这意味着它是调查中问题的集合。但是你如何找到你正在寻找的问题呢?那么有以下三种方法:

  • Number : im体育官app使用题号(不推荐
    易于im体育官app使用,但最不安全且最有可能更改 - 如果在您需要的问题上方添加或删除问题,其编号将会更改
  • ID :im体育官app使用问题的唯一ID(推荐)
    即使添加或删除问题,它也永远不会改变——如果问题被移动,它也不会改变
  • 数据标签:im体育官app使用数据标签
    和 ID 一样,如果问题被移动或者其他问题被添加或删除它不会改变——它的主要优点是数据标签可以传达含义——所以“questions.nps”比一些数字更容易im体育
多变的 描述
{{survey.questions}}
调查中所有问题的集合——主要用于“每个”循环
{{survey.questions.1}}
参考问题编号为 1 的调查中的问题
{{survey.questions.id-1}}
引用ID为 1 的调查中的问题
{{survey.questions.myDataLabel}}
im体育官app使用 数据标签 myDataLabel ”引用调查中的问题(推荐方法)
{{survey.questions.myDataLabel.id}}
带有数据标签“myDataLabel”的问题的 ID。
{{survey.questions.myDataLabel.text}}
当前语言的问题文本——im体育官app使用 .unformatted 后缀删除所有格式
{{survey.questions.myDataLabel.questionNumber}}
问题的问题编号
{{survey.questions.id-1.dataLabel}}
ID 为 1 的问题的数据标签
{{survey.questions.myDataLabel.pageNumber}}
问题的页码
{{survey.questions.myDataLabel.questionTypeId}}
问题的类型,可能的值可以在这里找到
{{survey.questions.myDataLabel.maxScore}}
该问题可能的最高
{{survey.questions.myDataLabel.isHidden}}
如果问题被隐藏,则返回 true 否则返回 false——通常用于“if”语句
{{survey.questions.myDataLabel.subQuestions}} {{survey.questions.myDataLabel.subQuestions.1}} {{survey.questions.myDataLabel.subQuestions.id-123}}
矩阵问题的子问题的集合——要获取特定的子问题,您可以im体育官app使用订单号或子问题的 ID——如果您知道子问题的数据标签,则可以直接im体育官app使用它一个普通的问题——一旦您进入子问题,您就可以im体育官app使用此处列出的问题的所有其他属性,例如“.answerChoices”。
{{survey.questions.myDataLabel.answerChoices}}
答案选择的集合——您可以根据订单号或 ID 参考特定的答案选择
{{survey.questions.myDataLabel.answerChoices.1.id}}
第一个答案选择的ID
{{survey.questions.myDataLabel.answerChoices.id-1.orderNumber}}
ID 为 1 的答案选项的序号
{{survey.questions.myDataLabel.answerChoices.1.text}} {{survey.questions.id-1.answerChoices.1.text.unformatted}}
第一个答案选项的文本——im体育官app使用 .unformatted 后缀去除所有格式
{{survey.questions.myDataLabel.answerChoices.1.scaleValue}}
返回答案选择的比例值。在评分量表或矩阵问题中,问题的量表可能从“0(零)”开始,也可能从 -3 到 +3 – 量表值将返回该值 – 例如在 NPS 问题中,第一个答案选择的顺序号为“1”,但标度值为“0(零)”,因为 NPS 问题标度为 0-10
{{survey.questions.myDataLabel.answerChoices.1.score}} {{survey.questions.myDataLabel.answerChoices.1.score.percentage}}
返回第一个答案选择的分数
{{survey.questions.myDataLabel.answerChoices.1.isNotApplicable}}
如果答案选项是“不适用”选项,则返回真
{{survey.questions.myDataLabel.answerChoices.1.isOther}}
如果答案选择是“其他”选项,则返回真
{{survey.questions.myDataLabel.answerChoices.1.isHidden}}
如果答案选项被隐藏则返回 true

获取整个调查、一个问题、一个子问题或一个答案选择的所有受访者结果

im体育强烈建议im体育官app使用问题的数据标签来引用问题,因为数据标签不会随着调查的编辑而改变,并使变量包含的内容更加清晰。

多变的 描述
{{survey.results.respondentCount}} {{survey.results.respondentCount.completed}} {{survey.questions.myDataLabel.results.respondentCount}} {{survey.questions.myDataLabel.results.respondentCount.completed}} {{survey.questions.myDataLabel.answerChoices.1.results.respondentCount}} {{survey.questions.myDataLabel.answerChoices.1.results.respondentCount.completed}}
填写调查、问题或答案选项的总人数。添加“.completed”以仅计算到达末尾的受访者。
{{survey.questions.myDataLabel.results.average}} {{survey.questions.myDataLabel.results.average.completed}}
所有受访者对某个问题的平均刻度值。添加“.completed”以仅计算到达末尾的受访者。
{{survey.results.averageScore}} {{survey.results.averageScore.completed}} {{survey.questions.myDataLabel.results.averageScore}} {{survey.questions.myDataLabel.results.averageScore.completed}}
特定问题或整个调查的平均分数。添加“.completed”以仅计算到达末尾的受访者。
{{survey.questions.myDataLabel.results.sum}} {{survey.questions.myDataLabel.results.sum.completed}} {{survey.questions.myDataLabel.answerChoices.1.results.sum}} {{survey.questions.myDataLabel.answerChoices.1.results.sum.completed}}
所有受访者的问题或答案选择的所有值的总和。这适用于滑块、具有数字验证的文本框和具有刻度值的问题。添加“.completed”以仅计算到达末尾的受访者。
{{survey.results.scoreSum}} {{survey.results.scoreSum.completed}} {{survey.questions.myDataLabel.results.scoreSum}} {{survey.questions.myDataLabel.results.scoreSum.completed}} {{survey.questions.myDataLabel.answerChoices.1.results.scoreSum}} {{survey.questions.myDataLabel.answerChoices.1.results.scoreSum.completed}}
所有受访者的调查、问题或答案选择的所有分数总和。添加“.completed”以仅计算到达末尾的受访者。
{{survey.questions.myDataLabel.results.nps}} {{survey.questions.myDataLabel.results.nps.completed}}
一个问题的总体NPS 。添加“.completed”以仅计算到达末尾的受访者。
{{survey.results.contactCount}} {{survey.results.contactCount.noResponseYet}} {{survey.results.contactCount.reachedEnd}} {{survey.results.contactCount.completed}} {{survey.results.contactCount.screenedOut}} {{survey.questions.myDataLabel.results.contactCount}} {{survey.questions.myDataLabel.results.contactCount.noResponseYet}} {{survey.questions.myDataLabel.results.contactCount.reachedEnd}} {{survey.questions.myDataLabel.results.contactCount.completed}} {{survey.questions.myDataLabel.results.contactCount.screenedOut}} {{survey.questions.myDataLabel.myDataLabel.answerChoices.1.results.contactCount}} {{survey.questions.myDataLabel.myDataLabel.answerChoices.1.results.contactCount.noResponseYet}} {{survey.questions.myDataLabel.myDataLabel.answerChoices.1.results.contactCount.reachedEnd}} {{survey.questions.myDataLabel.myDataLabel.answerChoices.1.results.contactCount.completed}} {{survey.questions.myDataLabel.myDataLabel.answerChoices.1.results.contactCount.screenedOut}}
调查、问题或答案选择的联系人数量。
{{survey.results.startPageViews}} {{survey.results.startPageViews.contacts}} {{survey.results.startPageViews.nonContacts}}
调查的起始页浏览量。这是调查首页被请求的次数。您也可以只为联系人或非联系人获取此值。

这些变量指的是当前受访者

多变的 描述
{{respondent.id}}
当前受访者ID
{{respondent.hash}}
受访者的唯一哈希
{{respondent.score}}
受访者总分
{{respondent.score.percentage}}
受访者得分占调查最高可能得分的百分比
{{respondent.dateResponded}}
受访者回答调查的日期
{{respondent.language}} {{respondent.language.code}}
当前语言中受访者的语言名称 - 您可以添加“.code”以获取语言代码而不是名称
{{respondent.status}} {{respondent.status.id}}
受访者的状态:partial, complete, screened out – 你可以添加'.id'来获取状态的编号ID
  • 0 = 部分完成
  • 1 = 完成
  • 2 = 筛选掉
  • 3 = 配额满
{{respondent.channel}} {{respondent.channel.id}}
受访者用于接受调查的渠道:Web、电子邮件、Kiosk、SMS 等 – 您可以添加“.id”以获取渠道的编号 ID
{{respondent.completionPercentage}}
受访者已完成调查的百分比。请注意,筛选出的受访者将显示为 100%。
{{respondent.browser}}
受访者调查时im体育官app使用的浏览器:Google Chrome、Mozilla Firefox等。
{{respondent.os}}
受访者接受调查时im体育官app使用的操作系统:Windows、Android等。
{{respondent.thankYouPageUrl}} {{respondent.thankYouPageUrl.short}}
受访者感谢页面的 URL。如果受访者被筛选掉,这将导致替代的感谢页面。
{{respondent.reportUrl}} {{respondent.reportUrl.en}} {{respondent.reportUrl.internal}} {{respondent.reportUrl.internal.share}}
当前受访者的受访者报告的 URL – 您可以指定语言或添加“.internal”,以便只有有权访问调查的工具用户才能看到该报告,该报告通常用于通知。im体育官app使用“.internal.share”来包含所有元数据而无需人们登录。
{{respondent.resumeUrl}}
受访者可用于从中断处继续调查的 URL。
{{respondent.editResponsesUrl}}
用于编辑受访者回复的 URL。im体育更多
{{respondent.ipLocation}} {{respondent.ipLocation.city}} {{respondent.ipLocation.country}} {{respondent.ipLocation.country.code}} {{respondent.ipLocation.latitude}} {{respondent.ipLocation.longitude}}
根据受访者的 IP 地址确定受访者的位置 - 您可以添加“城市”或“国家/地区”以仅提供部分位置
{{respondent.timing.totalDuration}}
受访者在调查中花费的总时间(以秒为单位)

获取当前受访者的回复

im体育强烈建议im体育官app使用问题的数据标签来引用问题,因为数据标签不会随着调查的编辑而改变,并使变量包含的内容更加清晰。

多变的 描述
{{respondent.questions}}
受访者回答的问题的集合——您可以通过im体育官app使用问题的编号、ID 或数据标签来引用特定问题——您也可以im体育官app使用“每个”循环遍历它们
{{respondent.questions.1}}
受访者对问题 1 的回答——如果它是一个开放式问题,那么它将返回受访者输入的开放式答案——如果不是开放式答案,它将返回答案选择的文本,如果是空白,它将返回标度值——如果没有标度值,则返回答案选择的序号。如果受访者给出了多个答案,如在复选框问题中,则返回一个逗号分隔的列表——如果受访者没有回答这个问题,那么它什么也不会返回,变量将被替换为零长度字符串。
{{respondent.questions.id-1}}
受访者对 ID 为 1 的问题的回答
{{respondent.questions.myDataLabel}}
受访者对带有数据标签 “myDataLabel”的问题的回答(推荐方法)

这将返回受访者对此问题给出的答案。返回的内容有后备顺序:

  1. 受访者自己输入的开放式答案
  2. 答案选择的标题
  3. 答案选择的标度值
  4. 答案选择的序号
{{respondent.questions.myDataLabel.styled}}
响应者答案的样式表示。非常适合在通知或报告中im体育官app使用。不要将其用于预填充或显示逻辑。例如,如果您的答案选择有颜色,那么格式就会出现。
{{respondent.questions.myDataLabel.openAnswer}}
受访者自己输入的开放文本作为答案。
{{respondent.questions.myDataLabel.caption}}
答案选择本身的文本,而不是受访者输入的开放答案。如果在复选框问题中可以给出多个答案,则返回一个以逗号分隔的列表。
{{respondent.questions.myDataLabel.scaleValue}}
受访者选择的答案选择的等级值——例如,一些问题的等级从 0-10 或 -3 到 +3
{{respondent.questions.myDataLabel.orderNumber}}
答案选择的序号——如果在复选框问题中可以给出多个答案,则返回一个以逗号分隔的序号列表。
{{respondent.questions.myDataLabel.score}} {{respondent.questions.myDataLabel.score.percentage}}
受访者在该问题上的得分
{{respondent.questions.myDataLabel.npsType}} {{respondent.questions.myDataLabel.npsType.styled}}
NPS 类型:受访者的批评者 (0-6)、被动 (7-8) 或推动者 (9-10),具体取决于他们对问题的回答。添加 .styled 以根据 NPS 类型为其着色。
{{respondent.questions.myDataLabel.date}} {{respondent.questions.myDataLabel.date.iso}}
受访者回答的日期表示。有关日期对象的更多信息,请参阅本文的日期运算符部分。
{{respondent.questions.myDataLabel.isNotApplicable}}
如果答案选项是“不适用”选项,则返回真
{{respondent.questions.myDataLabel.isOther}}
如果答案选择是“其他”选项,则返回真
{{respondent.questions.myDataLabel.subQuestions}}
收集当前受访者对矩阵问题的子问题的答案。
{{respondent.questions.myLabel.subQuestions.X.answerChoices.nth-1}}
要获得对矩阵问题中“其他,请指定”选项的开放式响应。用实际的子问题编号替换 X。
{{respondent.questions.myDataLabel.subQuestions.1}} {{respondent.questions.myDataLabel.subQuestions.id-123}} {{respondent.questions.myDataLabel.subQuestions.myDataLabel2}}
要获得特定的子问题,您可以im体育官app使用子问题的数据标签、订单号或 ID。到达子问题后,您可以im体育官app使用此处列出的问题的所有其他属性,例如“.answerChoices”。
{{respondent.questions.myDataLabel.answerChoices}} {{respondent.questions.myDataLabel.subQuestions.1.answerChoices}}
问题答案选项的答案集合——当您想要受访者对问题或子问题给出的所有答案时im体育官app使用。
{{respondent.questions.myDataLabel.answerChoices.1}}
返回第一个答案选项的答案——如果受访者没有选择这个答案选项,那么它什么也不会返回
{{respondent.questions.myDataLabel.answerChoices.id-123}}
返回 ID 为 123 的答案选项的答案
{{respondent.questions.myDataLabel.answerChoices.nth-1}}
返回受访者选择的第 n 个答案选项的答案——例如,在复选框问题中,受访者选择第 2 和第 5 个答案选项,那么“nth-1”将是第 2 个答案选项,“nth-2”将是答案选择 5
多变的 描述
{{contact.id}}
当前联系人的联系人 ID
{{contact.firstName}}
联系人的名字
{{contact.lastName}}
联系人的姓氏
{{contact.fullName}}
联系人的名字和姓氏
{{contact.status}} {{contact.status.id}}
联系人的联系状态
{{contact.language}} {{contact.language.code}}
联系人的语言名称 - 添加“代码”以获取语言代码
{{contact.street}}
联系人的街道地址
{{contact.houseNumber}}
联系人的门牌号码
{{contact.apartmentOrSuite}}
联系人的公寓号或套房号
{{contact.postalCode}}
联系人的邮政编码
{{contact.city}}
联系人的城市
{{contact.province}}
联系省份
{{contact.state}} {{contact.state.code}}
联系人的州或州缩写
{{contact.country}} {{contact.country.code}}
联系人的国家名称或国家代码
{{contact.email}}
联系人的电子邮件地址
{{contact.phone}}
联系人的电话号码
{{contact.gender}} {{contact.gender.code}} {{contact.gender.isMale}} {{contact.gender.isFemale}}
联系人的性别或返回 true 或 false 的一些测试
{{contact.dateOfBirth}}
联系人的出生日期
{{contact.isOptedOut}}
如果联系人选择退出,则返回 true
{{contact.isBounced}}
如果联系人的电子邮件地址被退回,则返回 true
{{contact.dateAdded}}
将联系人添加到调查的日期
{{contact.dateInvited}}
邀请联系人参加调查的日期
{{contact.dateSawEmail}}
联系人看到电子邮件邀请或调查提醒的日期
{{contact.dateClickedThrough}}
联系人点击进入调查的日期
{{contact.dateReminded}}
向联系人发送调查提醒的日期
{{contact.dateRemindedPartial}}
向联系人发送对调查的部分响应提醒的日期
{{contact.dateSecondReminder}}
向联系人发送第二次调查提醒的日期
{{contact.dateToExpire}}
联系人的调查邀请到期日期
{{contact.dateResponded}}
联系人回答调查的日期
{{contact.dateSentThankYouEmail}}
向联系人发送感谢电子邮件的日期
{{contact.dateToBeInvited}}
邀请联系人的日期和时间
{{contact.dateLastModified}}
编辑联系人的最后日期和时间
{{contact.customFields}}
所有自定义字段的集合。对每个循环有用
{{contact.customFields.1}} {{contact.customFields.2}} {{contact.customFields.3}} ...
返回自定义字段的内容。更改末尾的“1”以返回其他自定义字段
{{contact.customFields.custom_field_name}} {{contact.customFields.custom_field_name_2}}
im体育官app使用自定义字段的名称而不是数字——这使变量更清晰易懂——自定义字段名称中的空格替换为下划线(推荐方法
{{contact.surveyUrl}} {{contact.surveyUrl.en}} {{contact.surveyUrl.languageSelection}} {{contact.surveyUrl.otherLanguages}}
此联系人的“实时”调查 URL
{{contact.reportUrl}} {{contact.reportUrl.en}} {{contact.reportUrl.internal}}
此联系人的受访者报告的 URL – 您可以指定语言或添加“.internal”,以便只有有权访问调查的工具用户才能看到该报告,该报告通常用于通知
{{contact.optOutUrl}} {{contact.optOutUrl.en}}
此联系人的退出页面的 URL
{{contact.showEmailInBrowserUrl}} {{contact.showEmailInBrowserUrl.en}}
在浏览器中显示电子邮件邀请的 URL
多变的 描述
{{querystring.parameterName}} {{querystring.q1}} ...
调查 URL 的查询字符串中的参数值
{{currentDate}} {{currentDate.date}} {{currentDate.time}} {{currentDate.utc}} {{currentDate.iso}}
当前日期,包括时间——您可以选择只选择日期或时间

也可用:UTC(协调世界时)日期和符合 ISO 8601 格式的日期

注意:所有这些日期属性也可用于任何其他日期(例如 respondent.dateResponded)

{{regionalSettings.timezoneOffsetHours}} {{regionalSettings.timezoneOffsetMinutes}}
调查所有者当地时区与 UTC(协调世界时)之间的时差。这基于调查所有者的用户配置文件中的设置。
{{account.company}}
您的 CheckMarket 帐户的公司名称。

留下一个回复

您的电子邮件地址不会被公开。