kind: AdaptiveDialog
modelDescription: The Post-Relocation Survey Initiation Topic is triggered automatically by the agent when a Trigger is invoked. The trigger must include a RelocationID value and an EmployeeID value in order for this topic to be triggered. If it doesn't, this topic should not be triggered. This topic should never be invoked by user prompts; it should only be invoked by a Trigger.
inputs:
  - kind: AutomaticTaskInput
    propertyName: RelocationID
    description: The user's response contains a Relocation ID key-value pair. The key is 'cto_relocationid'. The value is saved to this variable.
    entity: StringPrebuiltEntity
    shouldPromptUser: false

  - kind: AutomaticTaskInput
    propertyName: EmployeeID
    name: EmployeeID
    description: The user's response contains a EmployeeID key-value pair. The key is 'cto_employee_value'. The value is saved to this variable.
    entity: StringPrebuiltEntity
    shouldPromptUser: false

  - kind: AutomaticTaskInput
    propertyName: DestinationLocation
    description: The full name of the office location that the user has relocated to
    entity: StringPrebuiltEntity
    shouldPromptUser: true

beginDialog:
  kind: OnRecognizedIntent
  id: main
  intent:
    triggerQueries:
      - start post relocation survey
      - initiate relocation feedback
      - begin moving survey
      - post move questionnaire
      - relocation experience survey
      - start moving feedback form
      - initiate post move review
      - begin relocation assessment

  actions:
    - kind: SetVariable
      id: setVariable_CoHWpr
      variable: Topic.LengthOfReloID
      value: =Len(Text(Topic.RelocationID))

    - kind: SetVariable
      id: setVariable_6bvBct
      variable: Topic.LengthOfEmplID
      value: =Len(Text(Topic.EmployeeID))

    - kind: SetVariable
      id: setVariable_VYTsLs
      variable: Topic.LengthOfDestName
      value: =Len(Text(Topic.DestinationLocation))

    - kind: ConditionGroup
      id: conditionGroup_JKc29u
      conditions:
        - id: conditionItem_LlrAGn
          condition: =Topic.LengthOfEmplID <> 36 || Topic.LengthOfReloID <> 36 || Topic.LengthOfDestName < 7
          actions:
            - kind: SendActivity
              id: sendActivity_3ZK9ss
              activity: I'm sorry, I'm not able to provide a response.

            - kind: CancelAllDialogs
              id: myM9cy

    - kind: BeginDialog
      id: osRkON
      dialog: crb50_hrSelfService.topic.Untitled

    - kind: InvokeFlowAction
      id: invokeFlowAction_yaJLAk
      input:
        binding:
          text: =Topic.RelocationID
          text_1: =Topic.EmployeeID

      output: {}
      flowId: b2087a59-2b14-f011-998a-0022480b0105

inputType:
  properties:
    DestinationLocation:
      displayName: DestinationLocation
      description: The full name of the office location that the user has relocated to
      type: String

    EmployeeID:
      displayName: EmployeeID
      description: The user's response contains a EmployeeID key-value pair. The key is 'cto_employee_value'. The value is saved to this variable.
      type: String

    RelocationID:
      displayName: RelocationID
      description: The user's response contains a Relocation ID key-value pair. The key is 'cto_relocationid'. The value is saved to this variable.
      type: String

outputType: {}