In this article
The next section of the program workflow document consists of a set of tasks for completion as part of the program set-up, such as adding in the survey and dashboard documents, setting up text analytics dataflows, and configuring action management programs.
Below are the tasks included in the sample program workflow document, with a description of the task output and the elements that can be changed.
Task createhierarchy
Description: Create an empty hierarchy schema (that can be populated with node data in a separate stage on the platform).Users can specify:
The name of the hierarchy
The default language of the hierarchy
Example:
task createhierarchy #hierarchyRetail {
field source {
target: "hubid"
value: input.hubId:
}
field value {
target: "name"
value: "Retail"
}
field value {
target: "defaultlanguage"
value: 9
}
}
Task importSurvey
Description: Import a survey XML from the program template package as a Forsta Plus survey.
Users can specify the workflow field name of the survey to be used (see the previous section on field definition)
Example:
task importSurvey #onlineTransactionalSurvey {
field source {
target: "surveydefinition"
value: input.onlineTransactionalSurveyUri:
}
}
Task updateSurvey
Description: Updates a survey value e.g. setting the hierarchy question to the created hierarchy schema.
The input value if the survey is the survey created as part of the importsurvey task with the name onlinetransactionalSurvey. The input value of the hierarchy ID is the resulting ID value from the createhierarchy task called hierarchyRetail
The final operation takes the question ID “Store” from the survey and updates the answer list to reference ID of the created hierarchy from the createhierarchy step.
Example:
task updateSurvey #setStoreTransactionalSurveyHierarchy {
field source {
target: "SurveyId"
value: storeTransactionalSurvey.result:surveyid
}
field source #hierid {
target: "hierarchyid"
value: hierarchyRetail.result:hierarchyid
}
field value {
target: "Operations"
value: {
type: "setAnswersToHierarchy"
questionId: "Store"
hierarchyId: @hierid
}
}
}
Task launchsurvey
Description: Launch a survey ready for data collection. The input value if the survey is the survey created as part of the importsurvey task with the name onlinetransactionalSurvey.
Additonal options can be used to control the survey launch parameters.
Example:
task launchSurvey #launchOnlineTransactionalSurvey {
field source {
target: "SurveyId"
value: onlineTransactionalSurvey.result:surveyId
}
mode: "production"
generationMode: "createNew"
enforceNewVersion: true
interviewGenerationMode: "webInterview"
waitForCompletion: true
}
Task addsurveysource
Description: Add a survey ID to a hub. The hub value is the ID of the hub created as part of the new program template. The input value if the survey is the survey created as part of the importsurvey task with the name onlinetransactionalSurvey.
Example:
task addsurveysource #addOnlineTransactionalSurvey {
field source {
target: "hubid"
value: input.hubId:
}
field source {
target: "surveyid"
value: onlineTransactionalSurvey.result:surveyId
}
}
Task setupTaAccount
Description: This task sets up an account that is needed for association with a text analytics model. Customers who already are actively using model builder will not require this step, as an account will already exist.
Example:
task setupTaAccount #taAccount {
}
Task setupTaModel
Description: Adds a standard system text analytics model to a text analytics account. There are currently two standard shipped models for retail or insurance. If you wish to use your own previously defined text analytics model, then this step is not required.
Example:
task setupTaModel #taModel {
field source {
target: "accountid"
value: taAccount.result:accountId
}
field value {
target: "standardmodelid"
value: "1"
}
}
Task createsurveytextanalyticsdataflow
Description: Creates a text analytics dataflow based on a hub source (e.g. survey) for a particular Text analytics model. The data flow passes the named fields to Text analytics, which then produces sentiment and categorization data for use in reporting.
If the program is to use a previously defined model, rather than a standard system model, you can replace the value of taModel.result:modelId with the ID of the text analytics model that you wish to use.
Example:
task createsurveytextanalyticsdataflow #onlineTransactionalTextAnalyticsDataFlow {
mode: "Continuously"
field source {
target: "hubid"
value: input.hubId:
}
field value {
target: "name"
value: "Online Transactional TA DataFlow"
}
field source {
target: "surveyid"
value: onlineTransactionalSurvey.result:surveyId
}
field source {
target: "modelid"
value: taModel.result:modelId
}
field value {
target: "fields"
value: "CommentsText"
}
}
Task createCdlDocumentFromTemplate
Description: Creates a dashboard based on a dashboard CDL template uploaded to the program, substituting in values for the hub and any data sources used into the parameters block of the CDL document. These values will be the output of the previous tasks for survey and text analytics workflow creation in order to reference the ID’s of the newly created assets e.g. onlineTransactionalSurvey.result:surveyId is the new survey ID generated as the onlineTransactionalSurvey task.
Example:
task createCdlDocumentFromTemplate #shopperInsightsReport {
field source {
target: "TemplateDocumentUri"
value: input.shopperInsightsDashboardUri:
}
field source {
target: "hubid"
value: input.hubId:
}
field source {
target: "onlineTransactionalSurveyPublicName"
value: onlineTransactionalSurvey.result:surveyId
}
field source {
target: "storeTransactionalSurveyPublicName"
value: storeTransactionalSurvey.result:surveyId
}
field source {
target: "modelId"
value: taModel.result:modelId
hidden: true
}
field template {
target: "onlineTransactionalTextAnalyticsResultsPublicName"
value: 'TextAnalytics_{{onlineTransactionalSurveyPublicName}}_{{modelId}}'
}
field template {
target: "storeTransactionalTextAnalyticsResultsPublicName"
value: 'TextAnalytics_{{storeTransactionalSurveyPublicName}}_{{modelId}}'
}
}
Task PublishCdlDocument
Description: Publishes a dashboard to make it available to end users
Example:
task publishCdlDocument #publishShopperInsightsReport {
field source {
target: "DocumentId"
value: shopperInsightsReport.result:documentId
}
}
Task createenduserlist
Description: Creates an empty end user list in the program hub. This end user list can then be populated with end users at a later stage directly on the platform.
Example:
task createenduserlist #endUserList {
field source {
target: "HubId"
value: input.hubId:
}
field value {
target: "Name"
value: "My users"
}
}
Task createactionmanagementprogram
Description: Creates an Action management program in the program hub.
Example:
task createactionmanagementprogram #actionManagementProgram {
field source {
target: "HubId"
value: input.hubId:
}
field source {
target: "UserListId"
value: endUserList.result:UserListId
}
field value {
target: "Name"
value: "AM Program"
}
field source {
target: "UserId"
value: creator.result:UserId
}
}
Task createactionmanagementworkflow
Description: Set up an action management program workflow. Workflows are used to define how users work a case, determine when notification emails should be sent and set the initial state of the case when it is created.
Example:
task createactionmanagementworkflow #actionManagementWorkflow {
field source {
target: "programid"
value: actionManagementProgram.result:programid
}
field value {
target: "Name"
value: "Workflow"
}
field value {
target: "Cost"
value: 5000
}
field value {
target: "SolveInDays"
value: 5
}
field value {
target: "SkipWeekends"
value: true
}
field value {
target: "PreOverdueDays"
value: 3
}
field value {
target: "PostOverdueDays"
value: 9
}
}
Task createactionmanagementtrigger
Description: Creates an action management trigger that is the criteria used for generating an action management case. (e.g. a record with a low NPS score should create a new action management case)
Example:
task createactionmanagementtrigger #actionManagementTrigger {
field source {
target: "programid"
value: actionManagementProgram.result:programid
}
field value {
target: "TriggerName"
value: "NPS score below 3"
}
field value {
target: "CaseName"
value: "Low NPS Score"
}
field source {
target: "SurveyId"
value: onlineTransactionalSurvey.result:surveyid
}
field source {
target: "SourceId"
value: addOnlineTransactionalSurvey.result:sourceid
}
field value {
target: "FilterExpression"
value: "responseid:status = 'complete'"
}
field source {
target: "WorkflowId"
value: actionManagementWorkflow.result:workflowid
}
}
Task getUserinfo
Description: Returns User information of the user executing the tasks for use in notification steps. No configuration is needed.
Example:
task getUserInfo #creator {
}
Task postToInbox
Description: Sends a notification message to provide feedback to the program creator of task completion. In the example below, the task sends a notification message to the user ID retrieved from the getUserInfo task, and users the title and Hub id fields from the program creation stage as part of the message.
Example:
task postToInbox #post {
mode: "user"
field source {
target: "toUserId"
value: creator.result:userid
}
field template {
target: "Subject"
value: 'Your program "{{title}}" has been successfully created in hub {{hubId}}'
}
field template {
target: "Message"
value: 'Your program "{{title}}" has been successfully created in hub {{hubId}}'
}
field source {
target: "hubId"
value: input.hubid:
hidden: true
}
field source {
target: "title"
value: input.title:
hidden: true
}
}