// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT-0 import React, { FC, useEffect, useState } from "react"; import { Box, Flashbar, Link } from "@awsui/components-react"; import "./FinishComponent.css"; import axios from "axios"; interface FinishComponentProps { executionArn: string; phoneNumber: string; } const FinishComponent: FC = (props) => { const [executionResult, setExecutionResult] = useState(""); useEffect(() => { console.log(props.executionArn) const executionProgress = async () => { let result = await axios.post(process.env.REACT_APP_API_PATH + "/dev/experience", { executionArn: props.executionArn }, { headers: { "Authorization": sessionStorage.getItem("key") !== null ? sessionStorage.getItem("key") as string : ""} }); console.log(result) setExecutionResult(result.data); } executionProgress(); let interval = setInterval(() => { if (executionResult === "SUCEEDED" || executionResult === "FAILED") { clearInterval(interval); } else { executionProgress(); } }, 3000); }, []) return (
It should take approximately 90 seconds to create the experience in your Amazon Connect instance. Once complete, you can start receiving your customers calls on the number you have claimed ({props.phoneNumber}). Next steps In order to handle the calls, you will need to create agents, and assign them a routing profile that will enable them to answer the calls. Creating agents in Amazon Connect Creating routing profiles in Amazon Connect
); }; export default FinishComponent;