kind: AdaptiveDialog
modelDescription: "The 'Post Relocation Survey Completion' Topic will ask the user to rate their overall relocation experience with multiple choice; will ask the user to rate their experience with the HR agent during the process, also with multiple choice; and will ask the user to provide any additional comments on their experience. Upon answering all questions, the topic will trigger a Power Automate Flow which will input the user's answers as parameters with which to update the user's relocation record in Dataverse, It will also set SurveyCompleted to 1 (true), This topic can be initialized by user queries like: complete post relocation survey, finish relocation survey, submit post move survey, fill out relocation feedback form, and post move questionnaire completion."
inputs:
  - kind: AutomaticTaskInput
    propertyName: relocation_id
    description: Unique identifier of the relocation record in dataverse
    shouldPromptUser: true

beginDialog:
  kind: OnRedirect
  id: main
  actions:
    - kind: Question
      id: question_i7Pgmq
      interruptionPolicy:
        allowInterruption: false

      variable: Topic.OverallSatisfaction
      prompt: "**Overall Satisfaction**: How would you rate your overall satisfaction with the relocation process?"
      entity:
        kind: EmbeddedEntity
        definition:
          kind: ClosedListEntity
          items:
            - id: Excellent
              displayName: Excellent

            - id: Very Good
              displayName: Very Good

            - id: Good
              displayName: Good

            - id: Fairly Poor
              displayName: Fairly Poor

            - id: Very Poor
              displayName: Very Poor

    - kind: Question
      id: question_Pm3J3M
      interruptionPolicy:
        allowInterruption: false

      variable: init:Topic.AgentAccuracy
      prompt: "**HR Self Service Agent Accuracy**: How would you rate the accuracy of the answers provided by the HR Self Service Agent?"
      entity:
        kind: EmbeddedEntity
        definition:
          kind: ClosedListEntity
          items:
            - id: Excellen
              displayName: Excellent

            - id: Very Goo
              displayName: Very Good

            - id: Good
              displayName: Good

            - id: Fairly Poor
              displayName: Fairly Poor

            - id: Very Poor
              displayName: Very Poor

    - kind: Question
      id: question_EzqiSL
      interruptionPolicy:
        allowInterruption: false

      variable: Topic.OtherFeedback
      prompt: What other feedback would you like to share about your experience?
      entity: StringPrebuiltEntity

    - kind: InvokeFlowAction
      id: invokeFlowAction_PwnwT4
      input:
        binding:
          text: =Topic.OtherFeedback
          text_1: =Topic.relocation_id
          text_2: =Text(Topic.OverallSatisfaction)
          text_3: =Text(Topic.AgentAccuracy)

      output: {}
      flowId: 16b9e3c4-110e-f011-9988-00224803f393

    - kind: SendActivity
      id: sendActivity_SEV09f
      activity: Thank you for your feedback! Your insights will help us enhance the relocation process for future employees.

    - kind: BeginDialog
      id: RvidWf
      dialog: crb50_hrSelfService.topic.ResetConversationVariables

    - kind: CancelAllDialogs
      id: zjphFu

inputType:
  properties:
    relocation_id:
      displayName: relocation_id
      description: Unique identifier of the relocation record in dataverse
      type: String

outputType: {}