{
  "name": "DFC Demo V1 - Inbound",
  "type": "CONTACT_FLOW",
  "sourceId": "62daa885-b00d-4c4b-892c-dccea9c99fff",
  "content": {
    "Version": "2019-10-30",
    "StartAction": "log",
    "Metadata": {
      "entryPointPosition": {
        "x": 20,
        "y": 20
      },
      "snapToGrid": false,
      "ActionMetadata": {
        "log": {
          "position": {
            "x": 40,
            "y": 40
          }
        },
        "call-lookup": {
          "position": {
            "x": 300,
            "y": 40
          }
        },
        "check-found": {
          "position": {
            "x": 560,
            "y": 40
          }
        },
        "check-enabled": {
          "position": {
            "x": 820,
            "y": 40
          }
        },
        "check-closure": {
          "position": {
            "x": 1080,
            "y": 40
          }
        },
        "closed": {
          "position": {
            "x": 1340,
            "y": 40
          }
        },
        "closed-reason": {
          "position": {
            "x": 40,
            "y": 260
          }
        },
        "call-language": {
          "position": {
            "x": 300,
            "y": 260
          }
        },
        "welcome": {
          "position": {
            "x": 560,
            "y": 260
          }
        },
        "announce": {
          "position": {
            "x": 820,
            "y": 260
          }
        },
        "set-queue": {
          "position": {
            "x": 1080,
            "y": 260
          }
        },
        "queue-confirm": {
          "position": {
            "x": 1340,
            "y": 260
          }
        },
        "transfer": {
          "position": {
            "x": 40,
            "y": 480
          }
        },
        "no-config": {
          "position": {
            "x": 300,
            "y": 480
          }
        },
        "not-in-service": {
          "position": {
            "x": 560,
            "y": 480
          }
        },
        "queue-failed": {
          "position": {
            "x": 820,
            "y": 480
          }
        },
        "disconnect": {
          "position": {
            "x": 1080,
            "y": 480
          }
        }
      }
    },
    "Actions": [
      {
        "Identifier": "log",
        "Parameters": {
          "FlowLoggingBehavior": "Enabled"
        },
        "Transitions": {
          "Errors": [],
          "Conditions": [],
          "NextAction": "call-lookup"
        },
        "Type": "UpdateFlowLoggingBehavior"
      },
      {
        "Identifier": "call-lookup",
        "Parameters": {
          "FlowModuleId": "0b48b4fc-dd52-4df7-8a26-800aeeaa1dcb"
        },
        "Transitions": {
          "Errors": [
            {
              "NextAction": "no-config",
              "ErrorType": "NoMatchingError"
            }
          ],
          "Conditions": [],
          "NextAction": "check-found"
        },
        "Type": "InvokeFlowModule"
      },
      {
        "Identifier": "check-found",
        "Parameters": {
          "ComparisonValue": "$.Attributes.dfcFound"
        },
        "Transitions": {
          "Errors": [
            {
              "NextAction": "no-config",
              "ErrorType": "NoMatchingCondition"
            }
          ],
          "Conditions": [
            {
              "NextAction": "check-enabled",
              "Condition": {
                "Operator": "Equals",
                "Operands": [
                  "true"
                ]
              }
            }
          ],
          "NextAction": "no-config"
        },
        "Type": "Compare"
      },
      {
        "Identifier": "check-enabled",
        "Parameters": {
          "ComparisonValue": "$.Attributes.srcEnabled"
        },
        "Transitions": {
          "Errors": [
            {
              "NextAction": "not-in-service",
              "ErrorType": "NoMatchingCondition"
            }
          ],
          "Conditions": [
            {
              "NextAction": "check-closure",
              "Condition": {
                "Operator": "Equals",
                "Operands": [
                  "true"
                ]
              }
            }
          ],
          "NextAction": "not-in-service"
        },
        "Type": "Compare"
      },
      {
        "Identifier": "check-closure",
        "Parameters": {
          "ComparisonValue": "$.Attributes.closureActive"
        },
        "Transitions": {
          "Errors": [
            {
              "NextAction": "call-language",
              "ErrorType": "NoMatchingCondition"
            }
          ],
          "Conditions": [
            {
              "NextAction": "closed",
              "Condition": {
                "Operator": "Equals",
                "Operands": [
                  "true"
                ]
              }
            }
          ],
          "NextAction": "call-language"
        },
        "Type": "Compare"
      },
      {
        "Identifier": "closed",
        "Parameters": {
          "SSML": "$.Attributes.outOfHours"
        },
        "Transitions": {
          "Errors": [],
          "Conditions": [],
          "NextAction": "closed-reason"
        },
        "Type": "MessageParticipant"
      },
      {
        "Identifier": "closed-reason",
        "Parameters": {
          "Text": "Reason on file: $.Attributes.closureReason"
        },
        "Transitions": {
          "Errors": [],
          "Conditions": [],
          "NextAction": "disconnect"
        },
        "Type": "MessageParticipant"
      },
      {
        "Identifier": "call-language",
        "Parameters": {
          "FlowModuleId": "18bc14e7-57f2-4e14-a955-3e38f8b7e467"
        },
        "Transitions": {
          "Errors": [
            {
              "NextAction": "welcome",
              "ErrorType": "NoMatchingError"
            }
          ],
          "Conditions": [],
          "NextAction": "welcome"
        },
        "Type": "InvokeFlowModule"
      },
      {
        "Identifier": "welcome",
        "Parameters": {
          "SSML": "$.Attributes.welcome"
        },
        "Transitions": {
          "Errors": [],
          "Conditions": [],
          "NextAction": "announce"
        },
        "Type": "MessageParticipant"
      },
      {
        "Identifier": "announce",
        "Parameters": {
          "Text": "You have reached the $.Attributes.expName experience, in $.Attributes.langName, on the $.Attributes.scheduleName schedule. Routing you to the $.Attributes.destName."
        },
        "Transitions": {
          "Errors": [],
          "Conditions": [],
          "NextAction": "set-queue"
        },
        "Type": "MessageParticipant"
      },
      {
        "Identifier": "set-queue",
        "Parameters": {
          "QueueId": "$.Attributes.queueArn"
        },
        "Transitions": {
          "Errors": [
            {
              "NextAction": "queue-failed",
              "ErrorType": "NoMatchingError"
            }
          ],
          "Conditions": [],
          "NextAction": "queue-confirm"
        },
        "Type": "UpdateContactTargetQueue"
      },
      {
        "Identifier": "queue-confirm",
        "Parameters": {
          "Text": "Working queue is now $.Attributes.queueName. Transferring you now."
        },
        "Transitions": {
          "Errors": [],
          "Conditions": [],
          "NextAction": "transfer"
        },
        "Type": "MessageParticipant"
      },
      {
        "Identifier": "transfer",
        "Parameters": {},
        "Transitions": {
          "Errors": [
            {
              "NextAction": "queue-failed",
              "ErrorType": "QueueAtCapacity"
            },
            {
              "NextAction": "queue-failed",
              "ErrorType": "NoMatchingError"
            }
          ],
          "Conditions": [],
          "NextAction": "queue-failed"
        },
        "Type": "TransferContactToQueue"
      },
      {
        "Identifier": "no-config",
        "Parameters": {
          "Text": "No configuration was found for this entry point, so this flow has nothing to say. Goodbye."
        },
        "Transitions": {
          "Errors": [],
          "Conditions": [],
          "NextAction": "disconnect"
        },
        "Type": "MessageParticipant"
      },
      {
        "Identifier": "not-in-service",
        "Parameters": {
          "Text": "This entry point is switched off in the configuration portal. Goodbye."
        },
        "Transitions": {
          "Errors": [],
          "Conditions": [],
          "NextAction": "disconnect"
        },
        "Type": "MessageParticipant"
      },
      {
        "Identifier": "queue-failed",
        "Parameters": {
          "Text": "No agents are available on that queue right now. Ending the demo here. Goodbye."
        },
        "Transitions": {
          "Errors": [],
          "Conditions": [],
          "NextAction": "disconnect"
        },
        "Type": "MessageParticipant"
      },
      {
        "Identifier": "disconnect",
        "Type": "DisconnectParticipant",
        "Parameters": {},
        "Transitions": {}
      }
    ]
  }
}
