Create Chat Widget

HTTPS Method

POST

URI

https://<server>/adminapi/chatWidget

Example URI

https://uccx-server/adminapi/chatWidget

Content Type

Application/XML, Application/JSON

HTTPS Success code

201

HTTPS Failure Codes

400, 401, 404, 405, 412, 500

Error Codes

-

Success Response

HTTPS/1.1 200 Created

Sample Input XML for Chat Bubble— POST


  <?xml version="1.0" encoding="UTF-8"?>
<chatWidget>
<self href=https://uccx-server:8080/adminapi/chatWidget rel="self" type="chatWidget"/>
     <name>ChatWidget7</name>
    <description>ChatWidget7</description>
    <formField>Name</formField>
    <contextServiceFieldsets>test</contextServiceFieldsets>
    <welcomeMessage>Thank you for contacting us. A customer care representative would assist you soon.</welcomeMessage>
    <agentJoinTimeoutMsg>All our customer care representatives are busy. You may wait or try again later.</agentJoinTimeoutMsg>
    <chatErrorMsg>Chat service is currently unavailable. Try later.</chatErrorMsg>
    <problemStatementCSQPair>
    <problemStatement>chatTest</problemStatement>
    <csq name="chatCSQ1">
            <refURL>https://uccx-server/adminapi/csq/1</refURL>
        </csq>
    </problemStatementCSQPair>
    <type>bubble</type>
    <calendarDetails>
	    <calendar name=“calendar1">
                  <refURL>https://10.107.45.242/adminapi/calendar/1</refURL>
           </calendar>
	    <messages>
	      <holidayMsg>Sorry, We are closed today for a business holiday.</holidayMsg>
	      <offHoursMsg>We are currently offline, try again during the business hours.</offHoursMsg>
	      <businessHoursMsg>Business Hours (Local Time)</businessHoursMsg>
	      <dayOfWeek>
	        <monday>Monday</monday>
	        <tuesday>Tuesday</tuesday>
	        <wednesday>Wednesday</wednesday>
	        <thursday>Thursday</thursday>
	        <friday>Friday</friday>
	        <saturday>Saturday</saturday>
	        <sunday>Sunday</sunday>
	      </dayOfWeek>
	    </messages>
    </calendarDetails>
    <bubbleStyle>
        <titleText>chat bubble 1</titleText>
        <titleTextColor>#EBEBEC</titleTextColor>
        <buttonText>chat button 1</buttonText>
        <buttonTextColor>#EBEBEC</buttonTextColor>
        <buttonBackgroundColor>#EBEBEC</buttonBackgroundColor>
        <resumeButtonText>Resume Chat</resumeButtonText>
        <afterResumeNewChatMsg>New Message</afterResumeNewChatMsg>
        <agentMessageTextColor>#EBEBEC</agentMessageTextColor>
        <agentMessageBackgroundColor>#EBEBEC</agentMessageBackgroundColor>
        <fontType>Arial</fontType>
    </bubbleStyle>
    <bubbleMessages>
        <textForTypingMsg>Type your message and press enter</textForTypingMsg>
        <agentJoinedMsg>${agent_alias} has joined the chat</agentJoinedMsg>
        <agentTypingMsg>${agent_alias} is typing</agentTypingMsg>
        <agentLeftMsg>${agent_alias} has left the chat</agentLeftMsg>
        <afterChatSessionTranscriptPopupMsg>
            <transcriptPopupMsg>Chat has ended. Do you want to download the chat transcript?</transcriptPopupMainMsg>
            <transcriptPopupNegativeMsg>No</transcriptPopupNegativeMsg>
            <transcriptPopupPositiveMsg>Yes</transcriptPopupPositiveMsg>
        </afterChatSessionTranscriptPopupMsg>
        <closeChatConfirmationPopupMsg>
            <closeChatPopupMsg>Do you want to close the chat?</closeChatPopupMainMsg>
            <closeChatPopupNegativeMsg>No</closeChatPopupNegativeMsg>
            <closeChatPopupPositiveMsg>Yes</closeChatPopupPositiveMsg>
        </closeChatConfirmationPopupMsg>
        <connectivityErrorMsg>Chat disconnected due to inactivity timeout or connection failure.</connectivityErrorMsg>
    </bubbleMessages>
    <postChatRating>
         <ratingEnabled>true</ratingEnabled>
         <ratingLabel>Rate your chat experience</ratingLabel>
         <ratingButtonText>Submit</ratingButtonText>
     </postChatRating>
</chatWidget>