swagger: '2.0'
info:
  version: 2.0/3.0
  title: Alvaria Cloud Streaming Client REST API
  contact:
    name: Alvaria
    url: 'https://www.alvaria.com'
  license:
    name: 'License: Creative Commons Attribution 4.0 International Public License'
    url: 'https://creativecommons.org/licenses/by/4.0/legalcode'
  description: |-

    # Overview
    The Alvaria&trade; Cloud Streaming Client REST APIs enable a custom application to register for, and receive events from, the Alvaria&trade; Cloud system.
    Events are retrieved by long polling, the session will be dropped by the server if a call to retrieve events (GET /events) has not been received within the `inactivityDelay` (default 60 seconds).

    ## API Client Implementation Recommendations
     - A single streaming session should be maintained for the entire time period of the application. For example, a single streaming session should be maintained in the following use-cases:
         - While an agent is logged-in through a Custom Agent Desktop (maintaining only one streaming session per agent).
         - While a Campaign API client is connected to Alvaria Cloud.
         
     - Increase the `inactivityDelay` property to 120 seconds, from the default of 60 seconds, to avoid session timeouts due to network issues or latencies.
     - For the retrieve events (GET /events) API call: increase the `maxEvents` parameter to a value of at least 5, from the default of 1, to reduce the amount of API traffic between the client and server.
     - Do not make concurrent retrieve events (GET /events) API calls for a single streaming session as it can lead to receiving events out of order. For example, if the client implementation is a multi-threaded application then multiple threads should not make concurrent retrieve events (GET /events) API calls for the same streaming session.
     - When the `requireAcknowledgement` parameter is set to true as part of the Create Session (POST /session) request, then the client must call the POST /acknowledge endpoint to acknowledge the events received. If not, duplicate events will be received in subsequent retrieve events (GET /events) calls.
     - If the client receives HTTP 400 error with the message “Invalid or expired session” then the client should stop making retrieve events calls and a new streaming session should be created.  	- Use the POST /session endpoint to create a new session.
         - Use the new streaming sessionId, from the newly created session, in subsequent retrieve events API calls. 
         - Do not use the previous sessionId, that caused the error, in any subsequent streaming API calls.
     - Backoff and retry procedures should be implemented when error conditions occur (e.g. network outages, throttling, etc). For example:
         - When receive HTTP 429 status code (Too Many Requests) then backoff or slowdown API calls
         - When receive any HTTP 5xx status code then retry the API call with a time delay in between retries.

    # Migration    
    ## Migrating from V2 to V3 API
     - Streaming V2 and V3 APIs cannot be used in combination. The API client should use either streaming API version v2 or v3.
     - Streaming V3 APIs allows API client to optionally enable the acknowledgement feature.
     - The API client can use the POST /acknowledge endpoint to acknowledge the events received and to remove those events from the system queue.
    
    Change in V3 API requests and responses are given below.

    ### Create Session
    `POST /via/v3/organizations/{orgId}/streaming/session`

    [Create Session](#create-streaming-session) endpoint's request and response body is changed as:
    

    [Request Body](#schemanewsessionv3)


    [Response Body](#schemasessionresponsev3)
    

    ### Delete Session
    `DELETE /via/v3/organizations/{orgId}/streaming/session`

    [Delete Session](#delete-streaming-session) endpoint has no changes in request and response body. Only API version is updated to V3.
    
    
    ### Retrieve Events
    `GET /via/v3/organizations/{orgId}/streaming/events`

    [Retrieve Events ](#retrieve-events-2) endpoint's response body is changed as:


    [Response Body](#schemaeventresponsev3)
    
    # Event List
    Events retrieved from a streaming session are grouped by category:
     - Engagementcenter
     - Outreach
     - Messaging
     
    ## Engagement Center
    The table below describes the events that may be generated when Engagement Center API calls are made or when the system initiates notifications such as interaction state changes.
    | **Event Type**  || **Description** |
      | --- | --- | --- |
      | <a href="#tocseventecacceptcalltimeout">`engagementCenter.AcceptCallTimeout`</a>  || This event will fire if an accept interaction has been sent to a client and the client does not accept in the proper amount of time. If the timeout occurs the interaction will be moved on to another client.|
      | <a href="#tocseventecactivateinteraction">`engagementCenter.ActivateInteraction`</a> || This event indicates to a client that one of their interactions should get focus. |
      | <a href="#tocseventecactive">`engagementCenter.Active`</a>  || This event will be received when an interaction has entered the active state.  |
      | <a href="#tocseventecadvancefeature">`engagementCenter.AdvanceFeature`</a>  || A client will receive this event when the client has been placed in advanced feature state. This state is used when the client is doing work outside of interactions. For example, when a team lead is monitoring other clients the team lead will enter this state. |
      | <a href="#tocseventecagentstatistics">`engagementCenter.AgentStatistics`</a>  || This event is received in response to a request for agent statistics. |
      | <a href="#tocseventecaudiopathconnection">`engagementCenter.AudioPathConnection`</a> || This event is an indication that the audio path associated with the station id passed in with the connect request has been tied up. |
      | <a href="#tocseventeccallrerouted">`engagementCenter.CallReRouted`</a> || This event informs the client that the call has been transferred in response to a previously executed transfer request. |
      | <a href="#tocseventecclientsessionkeepalive">`engagementCenter.ClientSessionKeepAlive`</a> || This event will be received in response to the client sending a keep alive request. |
      | <a href="#tocseventecconference">`engagementCenter.Conference`</a> || If the system can successfully execute the conference request, all parties will be made Active and able to simultaneously communicate with each other and the Agent will receive a "Conference" event indicating that the Conference call is now Active. |
      | <a href="#tocseventecconnectconfirm">`engagementCenter.ConnectConfirm`</a> || This event is part of the connection sequence of events. The payload of this event will contain the EhubSessionId which should be used to create the session with the streaming api. |
      | <a href="#tocseventecconnected">`engagementCenter.Connected`</a> || This state change event informs the client that the connection sequence is complete. This should be followed by either a not ready or idle state change event. |
      | <a href="#tocseventecconnecting">`engagementCenter.Connecting`</a> || This event is part of the connection sequence of events. It is a signal that the connection sequence is under way. Not much needs to be done in response to this event. |
      | <a href="#tocseventecconsult">`engagementCenter.Consult`</a> || The receipt of this state change event will indicate that the client is in a consultation interaction with another party. |
      | <a href="#tocseventecconsultinitiated">`engagementCenter.ConsultInitiated`</a> || This indicates that some client has initiated a consult on behalf of this user. It is possible that this is from the same user in which case it can be ignored. The event is available so in the case of multiple attached clients all clients can stay in sync. |
      | <a href="#tocseventecdialing">`engagementCenter.Dialing`</a> || Receipt of this event is an indication that an interaction is in the dialing state. When you get this, you should use it as a signal to update your UI to reflect the state change. |
      | <a href="#tocseventecdialinitiated">`engagementCenter.DialInitiated`</a> || This indicates that some client has initiated a dial on behalf of this user. It is possible that this is from the same user in which case it can be ignored. The event is available so in the case of multiple attached clients all clients can stay in sync. |
      | <a href="#tocseventecdisconnected">`engagementCenter.Disconnected`</a> || This event will signal that your client has been disconnected from the backend system. Once you receive this event you should clean up your streaming session. |
      | <a href="#tocseventecdisconnectpending">`engagementCenter.DisconnectPending`</a> || This event will be received in response to the client sending a disconnect request. The pending state means that the client has an active interaction and the state will stay pending until the interaction is complete or a cancel request is sent. |
      | <a href="#tocseventecdispositioninitiated">`engagementCenter.DispositionInitiated`</a> || This event will be received in response to a request to disposition an interaction. |
      | <a href="#tocseventecemailremoved">`engagementCenter.EmailRemoved`</a> || This event signals that an email has been removed from the personal or work type email queue, for example, after the user requests to remove the email due to its content no longer being found in storage. |
      | <a href="#tocseventecerror">`engagementCenter.Error`</a> || Whenever a request issued by the user fails, or when any general errors pertaining to the user's session or to the system occur, the system sends the user an "Error" event containing the Id of the error (failCode parameter) and the description of the error (failReason parameter). The user should use these errors for reporting purposes only, display them to the user to notify him/her that the last request failed or why the Agent will exhibit the subsequent behavior. Do not take any action, perform any state changes upon receiving this error. If the system requires the user to take some action, it will send the appropriate event after the Error event. For example, if the login process fails, the system will send the user an Error event indicating the cause and will then follow it with a "Disconnect" event prompting the Agent to shut down. |
      | <a href="#tocseventecheld">`engagementCenter.Held`</a> || The receipt of this event is an indication that the interaction contained in the payload has been placed in held state. |
      | <a href="#tocseventecidle">`engagementCenter.Idle`</a> || This state change event is sent for multiple reasons. First it would be sent with an Id of 0 which indicates that the clients state was moved to Idle. When the Id has a value other than 0 then this is an indication that the interaction referred to with the interactionId has been disposed. |
      | <a href="#tocseventecinteractionclear">`engagementCenter.InteractionClear`</a> || This event is received when an interaction is cleared or ended. The id or the interaction is contained in the event. |
      | <a href="#tocseventecinteractiontransferred">`engagementCenter.InteractionTransferred`</a> || If the 3rd party of a conference is an agent, that agent will receive an "InteractionTransferred" event signaling that the original interaction on which he/she was being consulted was transferred to him/her and that he/she is now handling the original interaction. The "InteractionTransferred" event will carry a new interaction(newInteractionId) id which the user must now use when referring to the original interaction in any subsequent requests to the system. |
      | <a href="#tocseventecinteractionrelxferred">`engagementCenter.InteractionReleasedXferred`</a> || This event indicates that the original interaction of a consult has been released to the consulted party. |
      | <a href="#tocseventecmessagestatus">`engagementCenter.MessageStatus`</a> || This event will return the current status of an execution of the request that plays an audio message to the customer. |
      | <a href="#tocseventecmonitorstate">`engagementCenter.MonitorState`</a> || This event will report the state change for a previously sent monitor request. |
      | <a href="#tocseventecmultitaskingstatus">`engagementCenter.MultiTaskingStatus`</a> || This event will report the multitasking status of the user. |
      | <a href="#tocseventecnewteam">`engagementCenter.NewTeam`</a> || This event indicates that a new team has been added. |
      | <a href="#tocseventecnewvoicemail">`engagementCenter.NewVoiceMail`</a> || This event indicates that a voicemail has been added to the users voicemail or a work type that the user is part of. |
      | <a href="#tocseventecnewworktype">`engagementCenter.NewWorkType`</a> || The payload object of this event carries the pointer to the information and settings of a work type to which this user has been assigned. Retrieve and save this data in your application This will then be your collection of Assigned Work Types which you will later need for other use cases (e.g., prompting user to choose one of these work types before making a manual call, validating the functions on the GUI based on the settings of the current call's work type, etc. |
      | <a href="#tocseventecnotready">`engagementCenter.NotReady`</a> || This event indicates that the user has been moved to the not ready state. No work type calls will be sent to the user while in this state. |
      | <a href="#tocseventecnotreadypending">`engagementCenter.NotReadyPending`</a> || This event indicates that a not ready request was received by the back end while the user was busy with an interaction. The user will not be moved to the not ready state until they are no longer busy on an interaction. |
      | <a href="#tocseventecpark">`engagementCenter.Park`</a> || This event indicates that the user has been moved to the park state. No work type calls will be sent to the user while in this state. They will however be sent DID calls if one is sent. |
      | <a href="#tocseventecphonefoul">`engagementCenter.PhoneFoul`</a> || This event indicates that the back end has lost connection with the telephony endpoint passed in on the connect. Plainly stated that telephony endpoint was hung up. |
      | <a href="#tocseventecphoneoffhook">`engagementCenter.PhoneOffhook`</a> || This event is sent when the audio path establishment for an agent fails due to the fact that the device is off hook. |
      | <a href="#tocseventecphonereconnect">`engagementCenter.PhoneReconnect`</a> || This event indicates that a previously disconnect connection has been reestablished. |
      | <a href="#tocseventecpreviewscreenpop">`engagementCenter.PreviewScreenPop`</a> || This event contains the screen pop information for a preview interaction. The agent would display this information and would then decide if the interaction would be executed. |
      | <a href="#tocseventecreassignemailack">`engagementCenter.ReassignEmailAck`</a> || This event is sent when a reassignEmail request has been sent. The status property will contain the status of the request. |
      | <a href="#tocseventecrecordingstate">`engagementCenter.RecordingState`</a> || This event will return the current playback or record state of a personal greeting recording. |
      | <a href="#tocseventecremoveteam">`engagementCenter.RemoveTeam`</a> || This event indicates that a team has been removed. |
      | <a href="#tocseventecremoveworktype">`engagementCenter.RemoveWorkType`</a> || This event is sent when an agent is removed from a work type and will now longer be considered as a destination for an interaction associated with the work type. The id in the payload is the reference to the work type. |
      | <a href="#tocseventecscreenpop">`engagementCenter.ScreenPop`</a> || This event contains all the information known by the system for an interaction that is being established. |
      | <a href="#tocseventecsystemavailable">`engagementCenter.SystemAvailable`</a> || This event indicates that a previously unavailable Engagement Hub was now on line and available.|
      | <a href="#tocseventecsystemstandby">`engagementCenter.SystemStandby`</a> || This event is sent to indicate that the system is in the process of coming on line. This state should be reported to the agent so they know that the system is in a waiting state.|
      | <a href="#tocseventecsystemunavailable">`engagementCenter.SystemUnavailable`</a> || This event indicates that the system has gone offline and the current session has ended.|
      | <a href="#tocseventectelephonyavailable">`engagementCenter.TelephonyAvailable`</a> || This event indicates that the telephony subsystem that was previously unavailable to Alvaria&trade; Cloud is now available.|
      | <a href="#tocseventectelephonyunavailable">`engagementCenter.TelephonyUnavailable`</a> || This event indicates that the telephony subsystem has issues and is not available to Alvaria&trade; Cloud.|
      | <a href="#tocseventecupdateagtstatreason">`engagementCenter.UpdateAgentStatusReason`</a> || This event indicates that the agent status reason list has been updated and the client should retrieve the new list of reason codes.|
      | <a href="#tocseventecupdatedisposition">`engagementCenter.UpdateDisposition`</a> || This event indicates that a disposition code has been modified and the client should update any cache of disposition codes.|
      | <a href="#tocseventecupdatedispositionplan">`engagementCenter.UpdateDispositionPlan`</a> || This event indicates that a disposition plan has been modified and the client should update any cache of disposition plans.|
      | <a href="#tocseventecupdateteam">`engagementCenter.UpdateTeam`</a> || This event indicates that a team has been updated. |
      | <a href="#tocseventecupdateworktype">`engagementCenter.UpdateWorkType`</a> || This event indicates that a work type has been modified and the client should update it cache that contains the settings contained in the work type definition.|
      | <a href="#tocseventecvoicelock">`engagementCenter.VoiceLock`</a> || Voice lock is an indication that the customer audio is not available to the user. This is done for the privacy of the customer.|
      | <a href="#tocseventecvoiceunlock">`engagementCenter.VoiceUnlock`</a> || This indicates that a previous voice lock state has ended.|
      | <a href="#tocseventecwrap">`engagementCenter.Wrap`</a> || This event indicates that the agent has entered the wrap state after an interaction has been terminated. The next step for the agent would be to dispose the interaction. |
      | <a href="#tocseventecwraptimeout">`engagementCenter.WrapTimeout`</a> || This event indicates that the agent has entered the wrap state after an interaction has been terminated. The next step for the agent would be to dispose the interaction. |
      
      
    ## Outreach
      
      The table below describes the events that may be generated when using the Campaign API endpoints related to inserting Fast Path records and managing script automation.

    | **Event Type**  || **Description** |
      | --- | --- | --- |
      | <a href="#tocseventfastpathdispostion">`outreach.disposition`</a>  || This event indicates that the Fast Path record has been dispositioned.|
      | <a href="#tocseventfastpathstatus">`outreach.status`</a>  || This event indicates the dialing status of the Fast Path record.|
      | <a href="#tocseventscriptstatus">`outreach.automationScriptStatus`</a>  || This event indicates the status an outreach automation script that has been stopped or started through an API call or through the Campaign Operations browser session.|
      
    ## Messaging
      
      The Messaging API enables the control of content passed from the system to an external entity.  The table below describes the events that may be generated as an entity is added to the CHAT/SMS session or content is passed from an entity to the system.

    | **Event Type**  || **Description** |
      | --- | --- | --- |
      | <a href="#tocseventmessagingentityadded">`messaging.EntityAdded`</a>  || This event indicates that an entity has been added to a CHAT or SMS session. |
      | <a href="#tocseventmessagingentitydialreq">`messaging.EntityDialRequest`</a>  || This event indicates that a dial request has been sent by the customer entity. |
      | <a href="#tocseventmessagingentitylist">`messaging.EntityList`</a>  || This event specifies the list of entities in a CHAT or SMS session |
      | <a href="#tocseventmessagingentitypushurl">`messaging.EntityPushURL`</a>  || This event indicates that a a push url request has been sent by the customer entity. |
      | <a href="#tocseventmessagingentityremoved">`messaging.EntityRemoved`</a>  || This event indicates that an entity has been removed from a CHAT or SMS session. |
      | <a href="#tocseventmessagingentitysendtext">`messaging.EntitySendText`</a>  || This event indicates that text has been received from a customer entity. |
host: orgId.via.aspect-cloud.net
schemes:
  - https
consumes:
  - application/json
produces:
  - application/json
paths:
  '/via/v2/organizations/{orgId}/streaming/session':
    post:
      operationId: createSession 
      summary: Create Streaming Session (deprecated)
      description: Creates a new Streaming Session. This endpoint is deprecated, please use /via/v3/organizations/{orgId}/streaming/session instead.
      tags:
        - Session
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: context
          in: body
          required: false
          schema:
            $ref: '#/definitions/NewSession'
          description: Name/Value pairs that are stored within the Session that can be accessed for channel specific functionality
      security:
        - oauth:
            - streamingapi
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SessionResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
    delete:
      operationId: deleteSession
      summary: Delete Streaming Session (deprecated)
      description: Deletes an existing Streaming Session. This endpoint is deprecated, please use /via/v3/organizations/{orgId}/streaming/session instead.
      tags:
        - Session
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: via-client-sessionid
          in: header
          required: true
          type: string
          description: 'Identifier representing a long-lived http interchange between Alvaria&trade; Cloud and an entity where the entity is a contact, external client application or authenticated user. This interchange is called the Alvaria&trade; Cloud streaming session. Alvaria&trade; Cloud streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity" to match "Identifier representing a long-lived HTTP interchange between Alvaria&trade; Cloud and an entity when the entity is a contact, external client application, or authenticated user. This interchange is called the streaming session. Streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity.'
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
      security:
        - oauth:
            - streamingapi
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
  '/via/v3/organizations/{orgId}/streaming/session':
    post:
      operationId: createSessionV3 
      summary: Create Streaming Session
      description: Creates a new Streaming Session
      tags:
        - Session
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: context
          in: body
          required: false
          schema:
            $ref: '#/definitions/NewSessionV3'
          description: Name/Value pairs that are stored within the Session that can be accessed for channel specific functionality
      security:
        - oauth:
            - streamingapi
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SessionResponseV3'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'          
    delete:
      operationId: deleteSessionV3
      summary: Delete Streaming Session
      description: Deletes an existing Streaming Session
      tags:
        - Session
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: via-client-sessionid
          in: header
          required: true
          type: string
          description: 'Identifier representing a long-lived http interchange between Alvaria&trade; Cloud and an entity where the entity is a contact, external client application or authenticated user. This interchange is called the Alvaria&trade; Cloud streaming session. Alvaria&trade; Cloud streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity" to match "Identifier representing a long-lived HTTP interchange between Alvaria&trade; Cloud and an entity when the entity is a contact, external client application, or authenticated user. This interchange is called the streaming session. Streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity.'
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
      security:
        - oauth:
            - streamingapi
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'        
  '/via/v2/organizations/{orgId}/streaming/events':
    get:
      operationId: getEvents
      summary: Retrieve Events (deprecated)
      description: Retrieve events from an existing Streaming Session, this operation will return immediately if any events are available, or will wait for up to 15 seconds for an event to become available. This endpoint is deprecated, please use /via/v3/organizations/{orgId}/streaming/events instead.
      tags:
        - Events
      produces:
        - application/json
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: via-client-sessionid
          in: header
          required: true
          type: string
          description: 'Identifier representing a long-lived http interchange between Alvaria&trade; Cloud and an entity where the entity is a contact, external client application or authenticated user. This interchange is called the Alvaria&trade; Cloud streaming session. Alvaria&trade; Cloud streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity" to match "Identifier representing a long-lived HTTP interchange between Alvaria&trade; Cloud and an entity when the entity is a contact, external client application, or authenticated user. This interchange is called the streaming session. Streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity.'
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
        - name: maxEvents
          in: query
          required: false
          type: integer
          description: 'Maximum number of events to return (default 1, max 200)'
      security:
        - oauth:
            - streamingapi
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/EventResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
  '/via/v3/organizations/{orgId}/streaming/events':
    get:
      operationId: getEventsV3
      summary: Retrieve Events
      description: Retrieve events from an existing Streaming Session, this operation will return immediately if any events are available, or will wait for up to 15 seconds for an event to become available.
      tags:
        - Events
      produces:
        - application/json
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: via-client-sessionid
          in: header
          required: true
          type: string
          description: 'Identifier representing a long-lived http interchange between Alvaria&trade; Cloud and an entity where the entity is a contact, external client application or authenticated user. This interchange is called the Alvaria&trade; Cloud streaming session. Alvaria&trade; Cloud streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity" to match "Identifier representing a long-lived HTTP interchange between Alvaria&trade; Cloud and an entity when the entity is a contact, external client application, or authenticated user. This interchange is called the streaming session. Streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity.'
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
        - name: maxEvents
          in: query
          required: false
          type: integer
          description: 'Maximum number of events to return (default 1, max 200)'
      security:
        - oauth:
            - streamingapi
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/EventResponseV3'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'          
  '/via/v3/organizations/{orgId}/streaming/acknowledge':
    post:
      operationId: acknowledgeEvent 
      summary: Acknowledge Events
      description: Acknowledge one or more streaming events received. Use this endpoint only if requireAcknowledgement parameter is set to true in the Create Session (POST /session) request.
      tags:
        - Acknowledge
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: via-client-sessionid
          in: header
          required: true
          type: string
          description: 'Identifier representing a long-lived http interchange between Alvaria&trade; Cloud and an entity where the entity is a contact, external client application or authenticated user. This interchange is called the Alvaria&trade; Cloud streaming session. Alvaria&trade; Cloud streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity" to match "Identifier representing a long-lived HTTP interchange between Alvaria&trade; Cloud and an entity when the entity is a contact, external client application, or authenticated user. This interchange is called the streaming session. Streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity.'
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: context
          in: body
          required: true
          schema:
            $ref: '#/definitions/AcknowledgePayload'
          description: Object containing an array of events to acknowledge.
      security:
        - oauth:
            - streamingapi
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/AcknowledgeResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'          
  '/via/v2/organizations/{orgId}/streaming/subscriptions':
    post:
      operationId: createSubscription
      summary: Create Subscription
      description: Create a new Subscription
      tags:
        - Subscription
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: via-client-sessionid
          in: header
          required: true
          type: string
          description: 'Identifier representing a long-lived http interchange between Alvaria&trade; Cloud and an entity where the entity is a contact, external client application or authenticated user. This interchange is called the Alvaria&trade; Cloud streaming session. Alvaria&trade; Cloud streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity" to match "Identifier representing a long-lived HTTP interchange between Alvaria&trade; Cloud and an entity when the entity is a contact, external client application, or authenticated user. This interchange is called the streaming session. Streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity.'
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: context
          in: body
          required: false
          schema:
            $ref: '#/definitions/Subscription'
          description: Name/Value pairs that defines the subscription's filter criteria 
      security:
        - oauth:
            - streamingapi
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SubscriptionResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
    get:
      operationId: getSubscriptions
      summary: Retrieve Subscription Collection
      description: Retrieve all subscriptions associated with a streaming session
      tags:
        - Subscription
      produces:
        - application/json
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: via-client-sessionid
          in: header
          required: true
          type: string
          description: 'Identifier representing a long-lived http interchange between Alvaria&trade; Cloud and an entity where the entity is a contact, external client application or authenticated user. This interchange is called the Alvaria&trade; Cloud streaming session. Alvaria&trade; Cloud streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity" to match "Identifier representing a long-lived HTTP interchange between Alvaria&trade; Cloud and an entity when the entity is a contact, external client application, or authenticated user. This interchange is called the streaming session. Streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity.'
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
      security:
        - oauth:
            - streamingapi
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SubscriptionCollection'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'      
  '/via/v2/organizations/{orgId}/streaming/subscriptions/{subscriptionId}':
    delete:
      operationId: deleteSubscription
      summary: Delete Subscription
      description: Deletes an existing subscription associated with a streaming session
      tags:
        - Subscription
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: via-client-sessionid
          in: header
          required: true
          type: string
          description: 'Identifier representing a long-lived http interchange between Alvaria&trade; Cloud and an entity where the entity is a contact, external client application or authenticated user. This interchange is called the Alvaria&trade; Cloud streaming session. Alvaria&trade; Cloud streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity" to match "Identifier representing a long-lived HTTP interchange between Alvaria&trade; Cloud and an entity when the entity is a contact, external client application, or authenticated user. This interchange is called the streaming session. Streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity.'
        - name: subscriptionId
          in: path
          required: true
          type: string
          description: Identifier representing the subscription id returned from the previous post subscription request
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
      security:
        - oauth:
            - streamingapi
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
    get:
      operationId: getSubscription 
      summary: Retrieve Subscription
      description: Retrieve a specific subscription associated with the streaming session
      tags:
        - Subscription
      produces:
        - application/json
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: via-client-sessionid
          in: header
          required: true
          type: string
          description: 'Identifier representing a long-lived http interchange between Alvaria&trade; Cloud and an entity where the entity is a contact, external client application or authenticated user. This interchange is called the Alvaria&trade; Cloud streaming session. Alvaria&trade; Cloud streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity" to match "Identifier representing a long-lived HTTP interchange between Alvaria&trade; Cloud and an entity when the entity is a contact, external client application, or authenticated user. This interchange is called the streaming session. Streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity.'
        - name: subscriptionId
          in: path
          required: true
          type: string
          description: Identifier representing the subscription id returned from the previous post subscription request
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
      security:
        - oauth:
            - streamingapi
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SubscriptionResponse'
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
    put:
      operationId: updateSubscription
      summary: Update Subscription
      description: Update a Subscription, if not exist, create a new one with the given subsciptionId 
      tags:
        - Subscription
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - name: orgId
          in: path
          required: true
          type: string
          description: Name of a customer organization
        - name: via-client-sessionid
          in: header
          required: true
          type: string
          description: 'Identifier representing a long-lived http interchange between Alvaria&trade; Cloud and an entity where the entity is a contact, external client application or authenticated user. This interchange is called the Alvaria&trade; Cloud streaming session. Alvaria&trade; Cloud streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity" to match "Identifier representing a long-lived HTTP interchange between Alvaria&trade; Cloud and an entity when the entity is a contact, external client application, or authenticated user. This interchange is called the streaming session. Streaming sessions are used for operations such as exchanging text messages and retrieving events related to user activity.'
        - name: subscriptionId
          in: path
          required: true
          type: string
          description: Identifier representing the subscription id returned from the previous post subscription request
        - name: Authorization
          in: header
          description: 'Authentication token with the value: ''Bearer {accessToken}'', where {accessToken} was returned from a call to the authorization endpoint.'
          required: true
          type: string
        - name: x-api-key
          in: header
          required: true
          type: string
          description: Alvaria-provided value used to track API endpoint usage
        - name: context
          in: body
          required: false
          schema:
            $ref: '#/definitions/Subscription'
          description: Name/Value pairs that defines the subscription's filter criteria 
      security:
        - oauth:
            - streamingapi
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SubscriptionResponse'
        '201':
          description: Created
          schema:
            $ref: '#/definitions/SubscriptionResponse'            
        '400':
          description: Bad Request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorResponse'
        '405':
          description: Method Not Allowed
          schema:
            $ref: '#/definitions/ErrorResponse'
        '429':
          description: Too Many Requests
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal Server Error
          schema:
            $ref: '#/definitions/ErrorResponse'
definitions:
  ErrorResponse:
    type: object
    properties:
      code:
        type: integer
        description: HTTP error status
        example: 404
      message:
        type: string
        example: not found
      errors:
        type: array
        items:
          $ref: '#/definitions/Error'
  Error:
    type: object
    properties:
      scope:
        type: string
        example: scope
      reason:
        type: string
        example: reason
      message:
        type: string
        example: message
  NewSession:
    type: array
    items:
      $ref: '#/definitions/SessionProperty'
    description: 'Currently supported properties - `inactivityDelay` Period of polling inactivity in seconds after which the session will be closed (default 60, min 60, max 600)'
    example: '[{"propertyName":"inactivityDelay","propertyValue":"300"}]'
  NewSessionV3:
    type: object
    properties:
      inactivityDelay:
        type: integer
        description: 'Period of polling inactivity in seconds after which the session will be closed (default 60, min 60, max 600)'
        example: 300
      requireAcknowledgement:
        type: boolean
        description: 'Boolean indicating whether the client must acknowledge events before the system will remove the events from the queue (default false). When this parameter is set to true, the client must call the POST /acknowledge endpoint to acknowledge the events received. If not, duplicate events will be received in subsequent retrieve events (GET /events) calls.'
        example: false
  SessionProperty:
    type: object
    properties:
      propertyName:
        type: string
        description: Property Name
        example: inactivityDelay
      propertyValue:
        type: string
        description: Property Value
        example: '300'
  SessionResponse:
    type: object
    properties:
      sessionId:
        type: string
        description: Alvaria-generated unique identifier for the Session. Use this name in all subsequent Streaming and Messaging API calls
        example: ab7dbcbc-c041-4ac0-8ca0-5a0961f7be5
      creationTime:
        type: string
        description: 'Time at which the Session was created, specified in ISO 8601 format and in UTC time zone (1985-04-12T23:20:50.525Z)'
        format: date-time
        example: '1985-04-12T23:20:50.525Z'
      inactivityDelay:
        type: integer
        description: Period of polling inactivity in seconds after which the session will be closed
        example: 60
    required:
      - sessionId
      - creationTime
      - inactivityDelay

  SessionResponseV3:
    type: object
    properties:
      sessionId:
        type: string
        description: Alvaria-generated unique identifier for the Session. Use this name in all subsequent Streaming and Messaging API calls
        example: ab7dbcbc-c041-4ac0-8ca0-5a0961f7be5
      creationTime:
        type: string
        description: 'Time at which the Session was created, specified in ISO 8601 format and in UTC time zone (1985-04-12T23:20:50.525Z)'
        format: date-time
        example: '1985-04-12T23:20:50.525Z'
      inactivityDelay:
        type: integer
        description: Period of polling inactivity in seconds after which the session will be closed
        example: 60
      requireAcknowledgement:
        type: boolean
        description: Boolean indicating that events received will be acknowledge or not.  
        example: false   
    required:
      - sessionId
      - creationTime
      - inactivityDelay
      - requireAcknowledgement

  EventResponse:
    type: object
    properties:
      kind:
        type: string
        description: Identifier used by Alvaria&trade; Cloud components to serialize the payload of the results
        example: 'via#streamingEventCollection'
      totalItems:
        type: integer
        description: Total number of entity instances returned in the results
        example: 1
      events:
        type: array
        description: Collection of 0 or more event objects associated with the streaming session
        items:
          $ref: '#/definitions/EventPayload'
    required:
      - kind
      - totalItems
      - events      
  EventPayload:
    type: object
    properties:
      kind:
        type: string
        description: Identifier used by Alvaria&trade; Cloud components to serialize the payload of the results
        example: 'via#chatEvent'
      id:
        type: string
        description: Alvaria-generated unique identifier for the event
        example: 159e90b7-da1f-4a57-b762-fdfa11590df4
      type:
        type: string
        description: Type of the event payload.
        example: chat.SendText      
      publishedTime:
        type: string
        description: 'Time at which the event was created and queued, specified in ISO 8601 format and in UTC time zone (1985-04-12T23:20:50.525Z)'
        format: date-time
        example: '2018-01-30T14:04:20.539Z'
      schemaVersion:
        type: integer
        description: Version of the payload
        example: '1'
      payload:
        type: string
        description: Application specific content
        example: '{"from":"System","text":"Welcome to the Chat Hotline"}'
    required:
      - id
      - kind
      - type
      - publishedTime
      - schemaVersion
      - payload    
  EventResponseV3:
    type: object
    properties:
      kind:
        type: string
        description: Identifier used by Alvaria&trade; Cloud components to serialize the payload of the results
        example: 'via#streamingEventCollection'
      totalItems:
        type: integer
        description: Total number of entity instances returned in the results
        example: 1
      events:
        type: array
        description: Collection of 0 or more event objects associated with the streaming session
        items:
          $ref: '#/definitions/EventPayloadV3'
    required:
      - kind
      - totalItems
      - events        
  EventPayloadV3:
    type: object
    properties:
      kind:
        type: string
        description: Identifier used by Alvaria&trade; Cloud components to serialize the payload of the results
        example: 'via#engagementCenterEvent'
      eventId:
        type: string
        description: Alvaria-generated unique identifier for the event. Used for acknowledging the event.
        example: 1519073278252-0
      correlationId:
        type: string
        description: Correlation Id for the event
        example: def61349-6f49-4019-918f-2cd2fbfd4e42 
      eventType:
        type: string
        description: Type of the event payload
        example: engagementCenter.Idle
      publishedTime:
        type: string
        description: 'Time at which the event was created and queued, specified in ISO 8601 format and in UTC time zone (1985-04-12T23:20:50.525Z)'
        format: date-time
        example: '2018-01-30T14:04:20.539Z'
      schemaVersion:
        type: integer
        description: Version of the payload
        example: '1'
      payload:
        type: string
        description: Application specific content
        example: '{"userId":"5aa0b645c2b3e80", "ehubSessionId":215,  "ehubSessionIdRev":215, "payload":{ "interactionId":1030,"interactionIdRev":1030}}'      
    required:
      - eventId
      - correlationId
      - kind
      - eventType
      - publishedTime
      - schemaVersion
      - payload     
  AcknowledgePayload:
    type: object
    properties:
      events: 
        type: array
        description: Collection of one or more event objects to acknowledge
        items:
          $ref: '#/definitions/AcknowledgeEvent'
    required: 
      - events      
  AcknowledgeEvent:
    type: object
    description: Event object to aknowledge
    properties:
      eventId:
        type: string
        description: Unique event Id to acknowledge
        example: "1519073278252-0"
    required:
      - eventId    
  AcknowledgeResponse:
    type: object
    properties:
      eventIdsAcknowledged:
        type: array
        items:
          type: string
          example: "1519073278252-0"
        description: "Array of eventIds acknowledged successfully"  
      eventIdsNotFound:
        type: array
        items:
          type: string
          example: "1519073282456-0"
          description: "Array of eventIds not found or already acknowledged."
    required:
      - eventIdsAcknowledged
      - eventIdsNotFound
  Subscription:
    type: object
    properties:
      description:
        type: string
        description: 'User supplied definition or name for the subscription'
      filterCriteria:
        $ref: '#/definitions/FilterCriteria'
    example:
     description: Filter for users engagement center third party events
     filterCriteria:
      catalogType: engagementCenterThirdParty
      catalogTypeEvents:
      - ScreenPop
      - Idle
      - NotReady
      resources:
        resourceType: users
        resourceIds:
          - 'ef3084eba0ea470'
          - '2d890d0d2a6ac46'
          - '28f10d30ca6047e'
    required:
      - filterCriteria
  FilterCriteria:
    type: object
    description: 'Rules to be used to filter the event stream for the consumer.'
    properties:
      catalogType:
        type: string
        description: Group name that the event falls under. Please contact Alvaria Customer Care to enable the events for catalogType `engagementCenterThirdParty`
        example: 'engagementCenterThirdParty'
        enum:
          - changeNotification
          - engagementCenterThirdParty
      catalogTypeEvents:
        type: array
        description: 1 or more specific state change or configuration change events from the catalogType. <br>
                     Use `all` to get all events in the catalogType. <br>
                     Events in changeNotification catalogType are user and team. <br>
                     Events in engagementCenterThirdParty catalogType are AcceptCallTimeout, ActivateInteraction, Active, AdvanceFeature, AgentStatistics, AudioPathConnection, CallReRouted, ClientSessionKeepAlive, Conference, ConnectConfirm, Connected, Connecting, Consult, ConsultInitiated, Dialing, DialInitiated, Disconnected, DisconnectPending, DispositionInitiated, EmailRemoved, Error, Held, Idle, InteractionClear, InteractionTransferred, InteractionReleasedXferred, MessageStatus, MonitorState, NewTeam, NewVoiceMail, NewWorkType, NotReady, NotReadyPending, Park, PhoneFoul, PhoneOffhook, PhoneReconnect, PreviewScreenPop, ReassignEmailAck, RecordingState, RemoveTeam, RemoveWorkType, ScreenPop, SystemAvailable, SystemStandby, SystemUnavailable, TelephonyAvailable, TelephonyUnavailable, UpdateAgentStatusReason, UpdateDisposition, UpdateDispositionPlan, UpdateTeam, UpdateWorkType, VoiceLock, VoiceUnlock, Wrap, WrapTimeout
        items:
          type: string
          enum:
            - all
#   changeNotification events
            - team            
            - user
#   engagementCenterThirdParty events
            - AcceptCallTimeout
            - ActivateInteraction
            - Active
            - AdvanceFeature
            - AgentStatistics
            - AudioPathConnection
            - CallReRouted
            - ClientSessionKeepAlive
            - Conference
            - ConnectConfirm
            - Connected
            - Connecting
            - Consult
            - ConsultInitiated
            - Dialing
            - DialInitiated
            - Disconnected
            - DisconnectPending
            - DispositionInitiated
            - EmailRemoved
            - Error
            - Held
            - Idle
            - InteractionClear
            - InteractionTransferred
            - InteractionReleasedXferred
            - MessageStatus
            - MonitorState
            - NewTeam
            - NewVoiceMail
            - NewWorkType
            - NotReady
            - NotReadyPending
            - Park
            - PhoneFoul
            - PhoneOffhook
            - PhoneReconnect
            - PreviewScreenPop
            - ReassignEmailAck
            - RecordingState
            - RemoveTeam
            - RemoveWorkType
            - ScreenPop
            - SystemAvailable
            - SystemStandby
            - SystemUnavailable
            - TelephonyAvailable
            - TelephonyUnavailable
            - UpdateAgentStatusReason
            - UpdateDisposition
            - UpdateDispositionPlan
            - UpdateTeam
            - UpdateWorkType
            - VoiceLock
            - VoiceUnlock
            - Wrap
            - WrapTimeout
      resources:
          $ref: '#/definitions/Resources'
    example: 
      catalogType: engagementCenterThirdParty
      catalogTypeEvents: ["ScreenPop","Idle", "NotReady"]      
      resources:
        resourceType: users
        resourceIds:
        - 'ef3084eba0ea470'
        - '2d890d0d2a6ac46'
        - '28f10d30ca6047e'
    required:
      - catalogType
      - catalogTypeEvents
      - resources
  Resources:
    type: object
    properties:
      resourceType:
        type: string
        description: The class of resource to filter the catalogTypeEvents on. <br>
                     Wildcard "*" for all resourceType, the resourceIds field will be skipped in this case. <br>
                     ResourceType 'users' for engagementCenterThirdParty and changeNotification catalogTypeEvents. <br>
                     ResourceType 'teams' for changeNotification catalogTypeEvents.
        example: 'users'
      resourceIds:
        type: array
        description: '0 or more resource instance ids to further filter the catalogTypeEvents on. If empty [] or ["*"] then events for all ids will be received'
        items:
          type: string
        example: '2d890d0d2a6ac46'
    required:
      - resourceType
      - resourceIds
  SubscriptionResponse:
    type: object
    description: 'user supplied definition or alternate name for the subscription'
    properties:
      kind:
        type: string
        description: 'via#subscription'
        example: 'via#subscription'
      subscriptionId:
        type: string
        description: 'Alvaria-generated unique identifier for the subscription. The uniqueness is guaranteed within the same session. Combination of the stream sessionId and the subscriptionId will guarantee the global uniqueness. Use this id along with the sessionId in subsequent subscription API calls.'
        example: ab7dbcbc
      description:
        type: string
        description: 'user supplied definition or name for the subscription'
      filterCriteria:
        $ref: '#/definitions/FilterCriteria'
      creationTime:
        type: string
        description: 'Time at which the subscription was created, specified in ISO 8601 format and in UTC time zone (1985-04-12T23:20:50.525Z)'
        format: date-time
        example: '1985-04-12T23:20:50.525Z' 
      lastModifiedTime:
        type: string
        description: 'Time at which the subscription was last updated, specified in ISO 8601 format and in UTC time zone (1985-04-12T23:20:50.525Z)'
        format: date-time
        example: '1985-04-12T23:20:50.525Z'
    required:
      - kind
      - subscriptionId
      - description
      - filterCriteria
      - creationTime
      - lastModifiedTime
  SubscriptionCollection:
    type: object
    description: 'user supplied definition or alternate name for the subscription'
    properties:
      kind:
        type: string
        description: 'via#subscriptionsCollection'
        example:  via#subscriptionsCollection
      subscriptions:
        type: array
        description: 'A array of subcriptions subscrbied by the requested streaming session'
        items:
          $ref: '#/definitions/SubscriptionResponse'
    required:
      - kind
      - subscriptions    
  EventECAcceptCallTimeout:
    type: object
    description: This event will fire if an accept interaction has been sent to a client and the client does not accept in the proper amount of                time. If the timeout occurs the interaction will be moved on to another client.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          ehubSessionId:
            type: string
            description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
            example: '14'
  EventECActivateInteraction:
    type: object
    description: This event indicates to a client that one of their interactions should get focus.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          ehubSessionId:
            type: string
            description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
            example: '14'
  EventECActive:
    type: object
    description: This event will be received when an interaction has entered the active state.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          category:
            type: integer
            description: 'This will indicate the mediaType of the interaction. Valid mediaTypes are NONE: 0,INBOUND_ACD: 1,INBOUND_DID: 2,INBOUND_IVR: 3,INBOUND_UNDEFINED: 4,INBOUND_EXTERNAL: 5,INBOUND_FAX: 6, INBOUND_VOICEMAIL: 7,OUTBOUND_AOD: 8,OUTBOUND_CONFERENCE: 9,OUTBOUND_CONSULT: 10,OUTBOUND_CONSULT_XFER: 11,OUTBOUND_FAX: 12,OUTBOUND_EXTERNAL: 13,OUTBOUND_MANUAL: 14,OUTBOUND_TPCON_XFER: 15,INTERNAL_CONFERENCE: 16,INTERNAL_CONSULT: 17,INTERNAL_CONSULT_XFER: 18,INTERNAL_MANUAL: 19,OUTBOUND_MESSAGE: 20,INTERNAL_MONITORING: 21,INTERNAL_RECORDING: 22,INBOUND_CHAT: 23,INBOUND_EMAIL_NLP: 24,INBOUND_EMAIL_AGENTSEL: 25,INBOUND_EMAIL_SELFSERV: 26,INBOUND_EMAIL_CDREVIEW: 27,INBOUND_EMAIL_SEND: 28,OUTBOUND_EMAIL: 29,INBOUND_WORKFLOW: 30,INBOUND_CTI: 31,INBOUND_IM: 32,INBOUND_SMS: 33'
            example: 14
          statusReason:
            type: integer
            description: 'this will indicate the state of the agent;   AgActive: 2, AgConsulting: 11, AgActiveInternal: 14'
            example: 2
  EventECAdvanceFeature:
    type: object
    description: 'A client will receive this event when the client has been placed in advanced feature state.  This state is used when the client is doing work outside of interactions. For example, when a team lead is monitoring other clients the team lead will enter this state.'
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECAgentStatistics:
    type: object
    description: This event is received in response to a request for agent statistics.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          agentStatistics:
            type: array
            description: This is a collection of Agent Statistics.
            items:
              type: object
              properties:
                workTypeId:
                  type: integer
                  description: Alvaria-generated unique identifier for a WorkType
                  example: 84
                workTypeName: 
                  type: string
                  description: The value indicates the name of the WorkType.
                  example: 'CherylChat1'
                chatInteractions:  
                  type: integer
                  description: This value indicates the number of chat interactions handled by an agent.
                  example: 0
                ctiInteractions:  
                  type: integer
                  description: This value has been deprecated.
                  example: 0
                didInteractions:  
                  type: integer
                  description: This value indicates the number of Direct Inbound Dials handled by an agent.
                  example: 0
                emailInteractions:  
                  type: integer
                  description: This value indicates the number of email interactions handled by an agent.
                  example: 0
                inboundInteractions:  
                  type: integer
                  description: This value indicates the number of inbound interactions handled by an agent.
                  example: 0
                internalInteractions:  
                  type: integer
                  description: This value indicates the number of internal interactions handled by an agent.
                  example: 0
                manualInteractions:  
                  type: integer
                  description: This value indicates the number of manual interactions handled by an agent.
                  example: 0
                outreachInteractions:  
                  type: integer
                  description: This value indicates the number of outreach interactions handled by an agent.
                  example: 0
                smsInteractions:  
                  type: integer
                  description: This value indicates the number of SMS interactions handled by an agent.
                  example: 0
                workflowInteractions:  
                  type: integer
                  description: This value has been deprecated.
                  example: 0
                activeSeconds:  
                  type: integer
                  description: This value indicates the number of seconds that an agent was in an active state.
                  example: 0 
                idleSeconds:  
                  type: integer
                  description: This value indicates the number of seconds that an agent was in an idle state.
                  example: 1    
                internalSeconds:  
                  type: integer
                  description: This value indicates the number of seconds that an agent was on an internal call.
                  example: 0
                loggedInSeconds:  
                  type: integer
                  description: This value indicates the number of seconds that an agent was logged in for.
                  example: 4
                manualSeconds:  
                  type: integer
                  description: This value indicates the number of seconds that an agent was on a manual dial.
                  example: 0 
                multiSeconds:  
                  type: integer
                  description: This value represents the number of seconds an agent was on multiple interactions.
                  example: 0
                notReadySeconds:  
                  type: integer
                  description: This value indicates the number of seconds an agent was in a Not Ready state.
                  example: 3
                otherSeconds:  
                  type: integer
                  description: This value represents the number of seconds the agent was in all other states.
                  example: 0
                parkSeconds:  
                  type: integer
                  description: This value indicates the number of seconds that an agent was in a Parked state.
                  example: 0
                statusSeconds:  
                  type: integer
                  description: This value has been deprecated.
                  example: 1
                wrapSeconds:  
                  type: integer
                  description: This value indicates the number of seconds that an agent was in a Wrap state.
                  example: 0
                numberOfCallbacks:  
                  type: integer
                  description: This value indicates the number of Callbacks initiated.
                  example: 0
                numberOfRefusals:  
                  type: integer
                  description: This value indicates the number of refusal dispositions.
                  example: 0
                numberOfSuccesses:  
                  type: integer
                  description: This value indicates the number of successful dispositions.
                  example: 0
  EventECAudioPathConnection:
    type: object
    description: This event is an indication that the audio path associated with the station id passed in with the connect request has been tied up.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          state:
            type: boolean
            description: state of the audiopath associated with the user
            example: true
  EventECCallReRouted:
    type: object
    description: This event informs the client that the call has been transferred in response to a previously executed transfer request.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
  EventECClientSessionKeepAlive:
    type: object
    description: This event indicates that the keep alive period has been updated for the agent.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          requestTimestamp:
            type: string
            description: 'Returns the same timestamp that was sent as part of the keep alive request payload, specified in ISO 8601 format and in UTC time zone (1985-04-12T23:20:50.525Z)'
            format: date-time
            example: '2021-01-30T14:04:20.539Z'
  EventECConference:
    type: object
    description: 'If the system can successfully execute the conference request, all parties will be made Active and able to simultaneously communicate with each other and the Agent will receive a “Conference” event indicating that the Conference call is now Active.'
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          consultInteractionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 152
          consultInteractionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing consultInteractionId which is an integer and will be deprecated.
            example: '152'
          conferenceInteractionId:
            type: integer
            description: Alvaria-generated unique ID for an interaction instance
            example: 153
          conferenceInteractionIdRev:
            type: string
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing conferenceInteractionId which is an integer and will be deprecated.
            example: '153'
          consultEhubSessionId:
            type: string
            description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
            example: '14'
          originalInteractionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 150
          originalInteractionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing originalInteractionId which is an integer and will be deprecated.
            example: '150'
  EventECConnectConfirm:
    type: object
    description: This event is part of the connection sequence of events. The payload of this event will contain the EhubSessionId which should be used to create the session with the streaming api.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          userId:
            type: string
            description: Alvaria-generated unique identifier for a user instance
            example: 99b788f3000d99
          ehubSessionId:
            type: string
            description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
            example: '14'
  EventECConnected:
    type: object
    description: This state change event informs the client that the connection sequence is complete. This should be followed by either a not ready or idle state change event.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECConnecting:
    type: object
    description: This event is part of the connection sequence of events. It is a signal that the connection sequence is under way. Not much needs to be done in response to this event.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECConsult:
    type: object
    description: The receipt of this state change event will indicate that the client is in a consultation interaction with another party.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          consultInteractionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          consultInteractionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing consultInteractionId which is an integer and will be deprecated.
            example: '151'
          originalInteractionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 152
          originalInteractionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing originalInteractionId which is an integer and will be deprecated.
            example: '152'
          consultedEhubSessionId:
            type: string
            description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
            example: '14'
  EventECConsultInitiated:
    type: object
    description: This indicates that some client has initiated a consult on behalf of this user.  It is possible that this is from the same user in which case it can be ignored.  The event is available so in the case of multiple attached clients all clients can stay in sync.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID of the parent interaction associated with the consult request
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID of the parent interaction associated with the consult request.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          consultType:
            type: string
            description: 'the type of consult that was requested; '
            example: User
            enum:
              - User
              - External
              - Worktype
          workTypeId:
            type: string
            description: Alvaria-generated unique identifier for a WorkType
            example: '15'
          externalRouteId:
            type: string
            description: external route id associated with the consult request
            example: ''
          blindXferFlag:
            type: integer
            description: blind transfer flag indicates the the back end that the request is a cold transfer
            example: 1
          userId:
            type: string
            description: Alvaria-generated unique identifier for a user instance
            example: 99b788f3000d99
          phoneNumber:
            type: string
            description: phone number associated with the consult
            example: '5551212'
          entity:
            type: string
            description: 'JSON string of the Via Entity used to initiate the interaction. Expected entities: UsersFragment, workTypeTerse, SystemExternalFragment (ViaProvisioningExternalSwagger); '
            example: '{"active":true,"kind":"via#user","id":"user1","user":"user1@orgname.com","firstName":"alvaria","lastName":"user","preferredName":{"locale":"en-US","value":"alvaria user"}}'
          interactionData:
            type: array
            description: This is a collection of up to 20 user fields.
            example: ' '
            items:
              type: object
              properties:
                key:
                  description: This is the key of the key value pair.
                  example: UserField1
                  type: string
                value:
                  description: This is the value of the key value pair.
                  example: example data
                  type: string
                isMasked:
                  description: This shows whether a field should be masked in the UI.
                  example: 'false'
                  type: boolean
  EventECDialing:
    type: object
    description: 'Receipt of this event is an indication that an interaction is in the dialing state. When you get this, you should use it as a signal to update your UI to reflect the state change.'
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          mediaType:
            type: string
            description: This value identifies the type of media used for the referenced interaction.
            example: InboundACD
            enum:
              - None
              - InboundACD
              - InboundDID
              - InboundIVR
              - InboundUndefined
              - InboundExternal
              - InboundFax
              - InboundVoicemail
              - OutboundAOD
              - OutboundConference
              - OutboundConsult
              - OutboundConsultXfer
              - OutboundFax
              - OutboundExternal
              - OutboundManual
              - OutboundTPConXfer
              - InternalConference
              - InternalConsult
              - InternalConsultXfer
              - InternalManual
              - OutboundMessage
              - InternalMonitoring
              - InternalRecording
              - InboundChat
              - InboundEmailNLP
              - InboundEmailAgentSel
              - InboundEmailAgentSelfService
              - InboundEmailCDReview
              - InboundEmailSend
              - OutboundEmail
              - InboundWorkflow
              - InboundCTI
              - InboundIM
              - InboundSMS
  EventECDialInitiated:
    type: object
    description: This indicates that some client has initiated a dial on behalf of this user.  It is possible that this is from the same user in which case it can be ignored.  The event is available so in the case of multiple attached clients all clients can stay in sync.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID of the parent interaction associated with the dial request
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID of the parent interaction associated with the dial request.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          phoneNumber:
            type: string
            description: phone number associated with the consult
            example: '5551212'
          workTypeId:
            type: string
            description: Alvaria-generated unique identifier for a WorkType
            example: '15'
          makeCallType:
            type: string
            description: 'the type of dial that was requested; '
            example: User
            enum:
              - User
              - External
              - Preview
              - WorkType
          externalRouteId:
            type: string
            description: external route id associated with the consult request
            example: ''
          wrapRequiredFlag:
            type: integer
            description: wrap required flag indicates if a wrap is required for the interaction
            example: 1
          userId:
            type: string
            description: Alvaria-generated unique identifier for a user instance
            example: 99b788f3000d99
          entity:
            type: string
            description: 'JSON string of the Via Entity used to initiate the interaction. Expected entities: UsersFragment, workTypeTerse, SystemExternalFragment (ViaProvisioningExternalSwagger); '
            example: '{"active":true,"kind":"via#user","id":"user1","user":"user1@orgname.com","firstName":"alvaria","lastName":"user","preferredName":{"locale":"en-US","value":"alvaria user"}}'
  EventECDisconnected:
    type: object
    description: This event will signal that your client has been disconnected from the backend system. Once you receive this event you should clean up your streaming session.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECDisconnectPending:
    type: object
    description: This event will be received in response to the client sending a disconnect request. The pending state means that the client has an active interaction and the state will stay pending until the interaction is complete or a cancel request is sent.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECDispositionInitiated:
    type: object
    description: This indicates that some client has initiated a disposition. The event is available so in the case of multiple attached clients all clients can stay in sync.
    properties:
      ehubSessionId:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          dispositionId:
            type: string
            description: Alvaria-generated unique identifier of the requested disposition.
            example: '123'
          wrapRequiredFlag:
            type: boolean
            description: 'Whether Wrap was required for the interaction'
            example: true
          callBackFlag:
            type: boolean
            description: 'Whether the specified disposition is of type Callback'
            example: true
          saleflag:
            type: boolean
            description: 'Whether the specified disposition is of type Sale'
            example: true 
          interactionId:
            type: string
            description: Alvaria-generated unique ID for an interaction instance
            example: '151'
          interactionIdTo:
            type: string
            description: 'Alvaria-generated unique ID for the interaction which should subsequently receive the focus.'
            example: '151'
          interactionData:
            type: array
            description: This is a collection of up to 20 user fields.
            example: ' '
            items:
              type: object
              properties:
                key:
                  description: The key/label of the user-defined field.
                  example: 'User Field 1'
                  type: string
                value:
                  description: The value of the user-defined field.
                  example: 'some value'
                  type: string
                isMasked:
                  description: Whether the field's value is masked for display and should be read-only on the UI.
                  example: false
                  type: boolean     
  EventECEmailRemoved:
    type: object
    description: This event signals that an email has been removed from the personal or work type email queue, for example, after the user requests to remove the email due to its content no longer being found in storage.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties: 
          emailObjectId:
            type: string
            description: id that identifies the object in storage
            example: 'email/4b05-2016125-063840/40009-0'
  EventECError:
    type: object
    description: 'Whenever a request issued by the user fails, or when any general errors pertaining to the user’s session or to the system occur, the system sends the user an “Error” event containing the Id of the error (failCode parameter) and the description of the error (failReason parameter). The user should use these errors for reporting purposes only, display them to the user to notify him/her that the last request failed or why the Agent will exhibit the subsequent behavior. Do not take any action, perform any state changes upon receiving this error. If the system requires the user to take some action, it will send the appropriate event after the Error event. For example, if the login process fails, the system will send the user an Error event indicating the cause and will then follow it with a “Disconnect” event prompting the Agent to shut down.'
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: string
            description: Alvaria-generated unique ID for an interaction instance
            example: '151'
          eventCode:
            type: integer
            description: 'Type of error event, 225 means this is informational and 10 is for a failure'
            example: 225
          failCode:
            type: integer
            description: The integer value representing the failure
            example: 10
          worktypeId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique identifier for the work type
            example: '0'
          workTypeIdRev:
            type: string
            description: Alvaria-generated unique identifier for the work type.  This is the string equivalent of the existing worktypeId which is an integer and will be deprecated.
            example: 0
          failReason:
            type: string
            description: Text that describes the error.  Note for documentation purposes in the table below with fail reason strings, the fail code is also included in parentheses prepended at the beginning to help with mapping between fail code and fail reason text.
            example: Calling/Called Party disconnected the call
            enum:
              - "(10) General Failure"
              - "(11) Call does not exist"
              - "(12) Call failed to transfer to worktype"
              - "(13) ExternalRouteID<%d> received is unknown to Ehub"
              - "(14) Speed dial operation failed"
              - "(15) Can not perform monitor request"
              - "(16) CTI login failed"
              - "(17) Gateway login failed"
              - "(18) CTI server is not running"
              - "(19) No active worktype attached with agent"
              - "(20) Agent is not in the valid state to perform the operation"
              - "(28) Transfer failure"
              - "(31) Hold failure"
              - "(32) Retrieve failure"
              - "(33) Call failure"
              - "(34) Hung up failure"
              - "(38) Consultation failure"
              - "(39) Play digit failure due to invalid call index"
              - "(45) Fail to transfer call"
              - "(69) Call conference request failed"
              - "(100) Agent has a call in progress"
              - "(110) Agent is not available"
              - "(120) No route access has been defined"
              - "(130) There is no telephony channels available/all the telephony channels are busy"
              - "(131) There is no telephony route available for the input number"
              - "(132) TimeZone verification failed "
              - "(140) Customer hung up"
              - "(150) Error occurred while processing email"
              - "(174) Trunk license has been exceeded"
              - "(175) Agent license has been exceeded"
              - "(209) Invalid call type"
              - "(210) Your phone connection is currently disrupted"
              - "(211) Send switch command failed"
              - "(212) Invalid switch id"
              - "(213) The record has been excluded. Please discard the interaction."
              - "(214) Invalid phone number"
              - "(215) Invalid consultation type<%d>."
              - "(216) Currently the email system is offline so transfers/reply email is not possible. Please try after some time"
              - "(217) Error occurred forwarding an email to user. Logging out user from worktype"
              - "(218) Your station number <%s> is being used by agent<%s>"
              - "(219) Agent<%s> is already logged in at station<%s>"
              - "(220) Invalid parameter"
              - "(221) The agent you are contacting has not responded to your call."
              - "(222) The agent you are contacting cannot accept your call at this time."
              - "(223) The agent you are contacting cannot accept your call at this time. You may leave a message or try again later."
              - "(224) Cannot disposition call until the minimum wrap time has elapsed. Please remain in wrap for at least <%d> seconds before dispositioning the call"
              - "(225) This event does not indicate an error"
              - "(226) Calling agent has canceled the call"
              - "(227) Remote party has placed this call on Hold - Line-<%d>"
              - "(228) Remote party has Retrieved this call from Hold - Line-<%d>"
              - "(229) The previous call has been replaced by a higher priority call"
              - "(230) Your call disposition was received after the maximum allowed wrap time was exceeded, resulting in an incomplete disposition status for this contact"
              - "(231) Remote party has added you to a conference call"
              - "(232) You may not consult with the same target as your current target"
              - "(233) Unable to call the same agent you are already connected to"
              - "(234) No available lines to place a new call"
              - "(235) For outbound consultation calls - you must clear all calls before you disposition"
              - "(236) Destination agent has this call in the held state. Please try your transfer again later"
              - "(237) Calling agent is attempting to transfer a call to you. Please retrieve your call"
              - "(238) Conference calls established by the remote party"
              - "(239) Conference calls ended by the remote party"
              - "(240) You may not transfer a call to a party that you have on-hold"
              - "(241) You may not transfer a call to a party that is not in the active state"
              - "(242) Call IVR-Script is not available"
              - "(243) Consult IVR-Script is not available"
              - "(244) Invalid voice mail box number"
              - "(245) Ringing dial tone for outbound manual dial"
              - "(246) Busy dial tone for outbound manual dial"
              - "(247) SIT tone for outbound manual dial"
              - "(248) Consulted Agent: <%s> used for warm consultation with worktype"
              - "(249) Remote agent has released the call"
              - "(250) Phone number is excluded from being dialed at this time"
              - "(251) May not consult or transfer to a worktype while on an internal call"
              - "(252) Calling/Called party disconnected the call"
              - "(253) You may not consult while your phone connection is disrupted. Please try again after your phone reconnects."
              - "(254) You may not dial while your phone connection is disrupted. Please try again after your phone reconnects."
              - "(255) Send consult request failed"
              - "(256) Send consult pending request failed"
              - "(257) Send transfer request failed"
              - "(258) Send conference request failed"
              - "(259) Send monitor start to switch failed"
              - "(260) CTI agent login failed"
              - "(261) Email address is excluded from being sent at this time"
              - "(262) IM consult of a consult call not allowed"
              - "(263) Internal consultation failure"
              - "(264) Communication failure with switch handling the call"
              - "(265) Destination worktype is not available"
              - "(266) Not performing internal voice recording as AQM recording mode is enabled"
              - "(267) Agent is not in accept call process"
              - "(268) Agent has been panic logout "
              - "(269) System internal failure"
              - "(270) Failed to route call to agent"
              - "(271) IVR worktype call canceled"
              - "(272) Transfer to worktype failed as CallIndex<%d> is already in transferred state"
              - "(273) Destination worktype is inactive/disabled"
              - "(274) Agent failed to resume phone connection/audio path"
              - "(275) Call has been recalled as the phone number is being excluded"
              - "(276) Can not create outbound manual call"
              - "(277) Can not create internal manual call"
              - "(278) Can not create outbound email"
              - "(279) Can not create agent inbound email"
              - "(280) Can not create self-worktype inbound email"
              - "(281) Can not create agent transferred call"
              - "(282) Can not create internal consult call"
              - "(283) Can not create outbound conference call"
              - "(284) Can not create internal conference call"
              - "(285) Can not create outbound consult transfer call"
              - "(286) Can not create internal consult transfer call"
              - "(287) Call has been automatically transferred by the system"
              - "(288) Agent is not available. Please leave message"
              - "(289) Agent cannot call it self"
              - "(290) Destination agent is not available. Please leave message"
              - "(291) Can not create outbound consult call"
              - "(292) SMS session has been removed by the system"
              - "(293) Failed to route call to agent after accept call process"
              - "(294) Gateway login failed as switch is down"
              - "(295) Agent is already monitored by another supervisor"
              - "(296) Can not get email by email object id"
              - "(297) Can not transfer a non CTI call to a CTI worktype"
              - "(298) Can not transfer a CTI call to a non CTI worktype"
              - "(299) Can not transfer email call. should be done by agent"
              - "(300) EMail worktype id<%d> is disabled or deleted"
              - "(301) Can not disposition the call while call is in active or held state"
              - "(302) Can not execute hold as call is not in active state"
              - "(303) Can not retrieve as agent is not in conference and has active voice call in line"
              - "(304) Can not retrieve as call is not in held state"
              - "(305) Can not dial the call as call is not in preview state"
              - "(306) Can not transfer: Duplicate consult transfer request"
              - "(307) Conference failed as either original or consult call terminated"
              - "(308) Transfer to worktype failed as call is already in pending-transfer state"
              - "(309) Transfer to worktype failed as call is not in active state"
              - "(310) Cannot transfer to agent, another transfer is currently pending"
              - "(311) Activation of call failed as call is already active"
              - "(312) Can not do consultation now because agent is idle"
              - "(313) Can not perform operation as agent in dual desktop session"
              - "(314) Can not perform operation as your phone connection is currently disrupted"
              - "(315) Can not go to not ready/park state as no voice channel available"
              - "(316) Do not hang-up on a held call"
              - "(317) May not consult while on an internal call - Multiline is disabled for this agent"
              - "(318) Can not do consultation as call is not in active/held state"
              - "(319) Conference failed as duplicate conference request for same call"
              - "(320) Pause/Resume not supported for external manual recording"
              - "(321) Can not perform operation as you don't have a phone connection to answer the voice call"
              - "(322) Pause/Resume not allowed for call in CXP privacy level mode"
              - "(323) Exclusion server is not available now. System may dial excluded numbers"
              - "(324) Failed to communicate to exclusion server. System may dial excluded numbers "
              - "(325) Exclusion server is not available now. System may send mail to excluded email addresses"
              - "(326) Failed to communicate to Exclusion server. System may send mail to excluded email addresses"
              - "(327) Original call was not found"
              - "(328) Voice mail ended due to disconnect from telephony server"
              - "(329) Consult failed as cannot create call"
              - "(330) Recording is not allowed as previous recording is still active"
              - "(331) This is a dual desktop system. Can not make call from agent"
              - "(332) Customer hung up or network disconnected"
              - "(333) Customer hung up or chat connection is closed"
              - "(334) Customer hung up or IM network disconnected"
              - "(335) Error occurred while processing email and will be deleted from worktype"
              - "(336) Email not found on Exchange and cannot be processed by worktype"
              - "(337) Error occurred while processing an email. Logging out user from worktype"
              - "(338) Invalid message id"
              - "(339) The agent you are contacting cannot accept your call at this time. Please leave a message. "
              - "(340) The agent you are contacting has not responded to your call. Please leave a message."
              - "(341) The agent you are contacting has not responded to your call. You may leave a message or try again later."
              - "(342) Agent failed to resume audio path and can not get voice calls. Agent will be available for non-voice calls. Please logout and re-login to get voice calls."
              - "(343) Email Reassign - Invalid Destination Worktype state."
              - "(344) Email Reassign - Email record not in DB"
              - "(345) No streaming session Id was supported, unable to login agent"
              - "(346) Email already activated by other Agent"
              - "(347) The consulted agent is hearing the whisper message now. Please try again in few seconds"
          localizedFailReason:
            type: string
            description: Text that describes the error and is localized to the defined localization
            example: Calling/Called Party disconnected the call
  EventECHeld:
    type: object
    description: The receipt of this event is an indication that the interaction contained in the payload has been placed in held state.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
  EventECIdle:
    type: object
    description: This state change event is sent for multiple reasons. First it would be sent with an Id of 0 which indicates that the clients state was moved to Idle. When the Id has a value other than 0 then this is an indication that the interaction referred to with the interactionId has been disposed.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
  EventECInteractionClear:
    type: object
    description: This event is received when an interaction is cleared or ended. The id or the interaction is contained in the event.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          state:
            type: integer
            description: this field indicates what the users next state will be.  A separate state change event will follow this event.
            example: 14
  EventECInteractionTransferred:
    type: object
    description: 'if the 3rd party of a conference is an agent, that agent will receive an “InteractionTransferred” event signaling that the original interaction on which he/she was being consulted was transferred to him/her and that he/she is now handling the original interaction. The “InteractionTransferred” event will carry a new interaction(newInteractionId) id which the user must now use when referring to the original interaction in any subsequent requests to the system.'
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          consultInteractionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 152
          consultInteractionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing consultInteractionId which is an integer and will be deprecated.
            example: '152'
          newInteractionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 153
          newInteractionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing newInteractionId which is an integer and will be deprecated.
            example: '153'
          originalEhubSessionId:
            type: string
            description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
            example: '14'
  EventECInteractionRelXferred:
    type: object
    description: This event indicates that the original interaction of a consult has been released to the consulted party.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
  EventECMessageStatus:
    type: object
    description: The MessageStatus event will return the current status of an execution of the request that plays an audio message to the customer.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          status:
            type: integer
            description: Status of the currently playing audio message being played to the customer.
            example: '1'
  EventECMonitorState:
    type: object
    description: This event will report the state change for a previously sent monitor request.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          monitoringInteractionId:
            type: integer
            description: To be deprecated.  This field refers to the interactionId of the monitored interaction.
            example: 151
          monitoringInteractionIdRev:
            type: string
            description: This is the string equivalent of the existing monitoringInteractionId which is an integer and will be deprecated.
            example: '151'
          monitoringState:
            type: integer
            description: 'This is the state of the monitoring request.  MON_SILENT: 1, MON_MONITORING 1, MON_COACHING: 2, MON_BARGEDIN: 3, MON_STOPPED: 4, MON_ERROR: 5, MON_START_ACK: 6, MON_CHAT_END_ACK: 7, MON_NOT_AVAILABLE: 8, MON_NO_AGENT_AVAIL: 9, MON_NOT_AUTHORIZED: 10, MON_OUT_OF_RESOURCES: 11, MON_AGENT_ALREADY_MONITORED: 12'
            example: 1
          portNum:
            type: integer
            description: the port number for the chat server this is doing the monitoring if applicable
            example: 0
          ipAddress:
            type: string
            description: the ip address for the chat server this is doing the monitoring if applicable
            example: agent=;portal=123.aaa.manhattan.aspect-cloud.net
  EventECMultiTaskingStatus:
    type: object
    description: This event signals a change in the Multitasking status of the user - i.e. whether the system will route new interactions to the user if they are already handling an interaction. Multitasking gets disabled, for a given user, if an interaction is rejected while they are already handling an interaction. Multitasking gets resumed after returning to Idle state.
    properties:
      ehubSessionId:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          userId:
            type: string
            description: Alvaria-generated unique identifier for a user instance
            example: 99b788f3000d99
          ehubSessionId:
            type: integer
            description: 'To be deprecated. Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
            example: 23
          ehubSessionIdRev:
            type: string
            description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection. This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
            example: 23
          multiTaskingStatusCode:
            type: object
            description: Structure containing information related to the multitasking status.
            properties:
              ordinal:
                type: integer
                description: Integer identifier of the multitasking status.
                example: 1
              value:
                type: string
                description: String identifier of the multitasking status.
                example: 'Suspended'
                enum:
                  - Unknown
                  - Suspended
                  - Resumed
  EventECNewTeam:
    type: object
    description: This event indicates that a new team has been added.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          id:
            type: string
            description: id of the Team.
            example: '11b8c791-6bd4-4cdf-9b6f-4119b891cec9'
          friendlyName:
            type: string
            description: Friendly name of the Team.
            example: 'Team Name'
  EventECNewVoiceMail:
    type: object
    description: This event indicates that a voicemail has been added to the users voicemail or a work type that the user is part of.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          workTypeId:
            type: integer
            description: To be deprecated.  Id of the WorkType this voice-mail is associated with.
            example: 15
          workTypeIdRev:
            type: string
            description: Id of the WorkType this voice-mail is associated with.  This is the string equivalent of the existing workTypeId which is an integer and will be deprecated.
            example: '15'
  EventECNewWorkType:
    type: object
    description: 'The payload object of this event carries the pointer to the information and settings of a work type to which this user has been assigned. Retrieve and save this data in your application This will then be your collection of Assigned Work Types which you will later need for other use cases (e.g., prompting user to choose one of these work types before making a manual call, validating the functions on the GUI based on the settings of the current call''s work type, etc.'
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          id:
            type: integer
            description: To be deprecated.  Alvaria-generated unique identifier for a WorkType
            example: '15'
          idRev:
            type: string
            description: Id of the WorkType this voice-mail is associated with.  This is the string equivalent of the existing workTypeId which is an integer and will be deprecated.
            example: 15
  EventECNotReady:
    type: object
    description: Receipt of this event will indicate that the user has been moved to the not ready on the back end. No work type calls will be sent to the user while in this state.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          reasonId:
            type: integer
            description: To be deprecated.  The code that represents the reason for going not ready
            example: 15
          reasonIdRev:
            type: string
            description: The code that represents the reason for going not ready.  This is the string equivalent of the existing reasonId which is an integer and will be deprecated.
            example: '15'
  EventECNotReadyPending:
    type: object
    description: The receipt of this event is an indication that a not ready request was received by the back end while the user was busy with an interaction. The user will not be moved to the not ready state until they are no longer busy on an interaction.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECPark:
    type: object
    description: Receipt of this event will indicate that the user has been moved to the park state on the back end. No work type calls will be sent to the user while in this state. They will however be sent DID calls if one is sent.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          reasonId:
            type: integer
            description: To be deprecated.  The code that represents the reason for going not ready
            example: 15
          reasonIdRev:
            type: string
            description: The code that represents the reason for going not ready.  This is the string equivalent of the existing reasonId which is an integer and will be deprecated.
            example: '15'
          ehubSessionId:
            type: string
            description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
            example: '14'
  EventECPhoneFoul:
    type: object
    description: The receipt of this event will be an indication that the back end has lost connection with the telephony endpoint passed in on the connect. Plainly stated that telephony endpoint was hung up.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECPhoneOffhook:
    type: object
    description: This event is sent when the audio path establishment for an agent fails due to the fact that the device is off hook.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECPhoneReconnect:
    type: object
    description: This event is the indication that a previously disconnect connection has been reestablished.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECPreviewScreenPop:
    type: object
    description: This event contains the screen pop information for a preview interaction. The agent would display this information and would then decide if the interaction would be executed.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          preemptive:
            type: integer
            description: 'indication of whether this event should get the users focus, 0 is no and 1 is yes'
            example: 1
          statusReason:
            type: integer
            description: 'This will indicate the mediaType of the interaction.  Valid mediaTypes are NONE: 0,INBOUND_ACD: 1,INBOUND_DID: 2,INBOUND_IVR: 3,INBOUND_UNDEFINED: 4,INBOUND_EXTERNAL: 5,INBOUND_FAX: 6, INBOUND_VOICEMAIL: 7,OUTBOUND_AOD: 8,OUTBOUND_CONFERENCE: 9,OUTBOUND_CONSULT: 10,OUTBOUND_CONSULT_XFER: 11,OUTBOUND_FAX: 12,OUTBOUND_EXTERNAL: 13,OUTBOUND_MANUAL: 14,OUTBOUND_TPCON_XFER: 15,INTERNAL_CONFERENCE: 16,INTERNAL_CONSULT: 17,INTERNAL_CONSULT_XFER: 18,INTERNAL_MANUAL: 19,OUTBOUND_MESSAGE: 20,INTERNAL_MONITORING: 21,INTERNAL_RECORDING: 22,INBOUND_CHAT: 23,INBOUND_EMAIL_NLP: 24,INBOUND_EMAIL_AGENTSEL: 25,INBOUND_EMAIL_SELFSERV: 26,INBOUND_EMAIL_CDREVIEW: 27,INBOUND_EMAIL_SEND: 28,OUTBOUND_EMAIL: 29,INBOUND_WORKFLOW: 30,INBOUND_CTI: 31,INBOUND_IM: 32,INBOUND_SMS: 33'
            example: 8
          interactionInfo:
            type: object
            description: Structure containing information related to the interaction
            properties:
              outreach:
                type: object
                description: Structure containing outreach information related to the interaction
                properties:
                  callTableRecordNum:
                    type: integer
                    description: record number reference to the call table in outreach if an outbound interaction
                    example: 45
              callBackData:
                type: object
                description: Structure containing callback information related to the interaction if applicable
                properties:
                  callBackFlag:
                    type: integer
                    description: 'indicates if this callback and if so is it a priority callback vs a normal call back, 0:not callback, 1:normal callback, 2:priority callback'
                    example: 1
                  callBackMemo:
                    type: string
                    description: memo string added by creator of this particular call back
                    example: This is an example of a call back memo
                  dialModeCode:
                    type: integer
                    description: 'the dial mode for an outreach interaction or if the interaction is a transfer the initiator, DIAL_MODE_AUTO: 1, DIAL_MODE_PRED: 2, DIAL_MODE_PREVIEW: 3, DIAL_MODE_PRECISION: 4, DIAL_MODE_AGENT_XFERRED: 6, DIAL_MODE_IVR_XFERRED: 7'
                    example: 3
              emailData:
                type: object
                description: Structure containing email information related to the interaction if applicable
                properties:
                  forwardToMBox:
                    type: string
                    description: N/A
                    example: ''
                  fromAddress:
                    type: string
                    description: the senders email address
                    example: docs@alvaria.com
                  emailObjectId:
                    type: string
                    description: id that identifies the object in storage
                    example: email/dd38-55555555-183810/117-0
                  senderCC:
                    type: string
                    description: the CC field of the incoming email
                    example: ''
                  senderTime:
                    type: string
                    description: time stamp of when the email was sent
                    example: ''
                  senderName:
                    type: string
                    description: display name of the email's sender
                    example: ''
                  replyEmailObjectId:
                    type: string
                    description: The storage object access key for the reply or draft email body
                    example: email/dd38-55555555-183810/117-0
                  senderTo:
                    type: string
                    description: the to field of the email
                    example: ''
                  threadId:
                    type: integer
                    description: To be deprecated.  Used to link the replied email with the original email
                    example: 0
                  threadIdRev:
                    type: string
                    description: This is the string equivalent of the existing threadId which is an integer and will be deprecated.
                    example: '0'
              otherData:
                type: object
                description: Structure containing general information related to the interaction
                properties:
                  interactionCategory:
                    type: integer
                    description: "value contained is the category for the interaction, INBOUND:\_1, OUTBOUND:\_2,\_INTERNAL:\_3"
                    example: 2
                  interactionType:
                    type: string
                    description: value contained is the type of interaction passed in the screenpop
                    example: AOD
                    enum:
                      - ACD
                      - AOD
                      - CONFERENCE
                      - CONSULTATION
                      - CONSULTATION_XFER
                      - DID
                      - FAX
                      - IVR
                      - MANUAL
                      - MESSAGE
                      - MONITORING
                      - RECORDING
                      - THIRD_PARTY_CONSULT_XFER
                      - UNDEFINED
                      - EXTERNAL
                      - VOICEMAIL
                      - CHAT
                      - EMAIL_MEDIA
                      - EMAIL_SELECT
                      - EMAIL_SELF_SERV
                      - EMAIL_CDREVIEW
                      - EMAIL_SEND
                      - EMAIL_OUTBOUND
                      - WORKFLOW
                      - CTI
                      - IM
                      - IM_CONFERENCE
                      - IM_CONSULTATION
                      - VIDEO
                      - SOCIAL
                      - SMS
                  screenpopType:
                    type: integer
                    description: 'value contained can be the following, INCOMING_EMAIL_TRANSFER_FROM_AGENT=50, INCOMING_EMAIL_TRANSFER_FROM_SERVICE=56, OTHER=31'
                    example: 2
                  originalWorkTypeId:
                    type: integer
                    description: To be deprecated.  This is the original work type id that the interaction was associated with if applicable
                    example: 191
                  originalWorkTypeIdRev:
                    type: string
                    description: This is the string equivalent of the existing originalWorktypeId which is an integer and will be deprecated.
                    example: '191'
                  worktypeId:
                    type: integer
                    description: To be deprecated.  This is the work type id that the interaction is associated with if applicable
                    example: 191
                  workTypeIdRev:
                    type: string
                    description: This is the string equivalent of the existing worktypeId which is an integer and will be deprecated.
                    example: '191'
                  timezoneId:
                    type: integer
                    description: To be deprecated.  This is the timezone id of the interaction
                    example: 18
                  timezoneIdRev:
                    type: string
                    description: This is the string equivalent of the existing timezoneId which is an integer and will be deprecated.
                    example: '18'
              screenData:
                type: object
                description: Structure containing screen information related to the interaction
                properties:
                  ani:
                    type: string
                    description: the ani of the incoming interaction if applicable
                    example: '6035551212'
                  callerId:
                    type: string
                    description: the callerId of the incoming interaction if applicable
                    example: Caller Id
                  dnis:
                    type: string
                    description: the dnis of the incoming interaction if applicable
                    example: '6035551212'
                  firstName:
                    type: string
                    description: the first name of the user related to the interaction of applicable
                    example: ELLEN
                  lastName:
                    type: string
                    description: the last name of the user related to the interaction of applicable
                    example: FROST
                  phoneNumber:
                    type: string
                    description: the phone number of the incoming interaction if applicable
                    example: '6035551212'
                  umid:
                    type: string
                    description: the umid of the incoming interaction if applicable
                    example: 01-0010010000-180226-225649658-00376
              interactionData:
                type: array
                description: This is a collection of up to 20 user fields.
                example: ' '
                items:
                  type: object
                  properties:
                    key:
                      description: This is the key of the key value pair.
                      example: UserField1
                      type: string
                    value:
                      description: This is the value of the key value pair.
                      example: example data
                      type: string
                    isMasked:
                      description: This shows whether a field should be masked in the UI.
                      example: 'false'
                      type: boolean
  EventECReassignEmailAck:
    type: object
    description: This event is sent when an agent is removed from a work type and will now longer be considered as a destination for an interaction associated with the work type. The id in the payload is the reference to the work type.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          emailObjectId:
            type: string
            description: Alvaria-generated unique ID for an entity
            example: email/dd38-55555555-183810/117-0
          status:
            type: integer
            description: 'Status of the reassignEmail request. 0=Success 200=OperationFail 204=InvalidWorkTypeId 206=InvalidCallState, 343=InvalidDestinationWorkTypeState 344=EmailRecordNotInDB'
            example: 0
            enum:
              - 0
              - 200
              - 204
              - 206
              - 343
              - 344
  EventECRecordingState:
    type: object
    description: This event will return the current playback or record state of a personal greeting recording.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties: 
          recordingState:
            type: integer
            description: This value indicates the state of the personal greeting recording such as buffering, none, playing, recording, paused, rewinding, fast forwarding, stopped, error or play pending.
            example: 1
          recordingSeq:
            type: integer
            description: This value has been deprecated.
            example: 1
          recordingIndex:
            type: integer
            description: 'The recording index of the personal greeting recording provided in the associated recording event'
            example: 1
          fileName:
            type: string
            description: 'The file name of the personal greeting recording, provided by the recording event upon creating a new recording.'
            example: 'name'
  EventECRemoveTeam:
    type: object
    description: This event indicates that a team has been removed.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          id:
            type: string
            description: id of the Team.
            example: '11b8c791-6bd4-4cdf-9b6f-4119b891cec9'
  EventECRemoveWorkType:
    type: object
    description: This event is sent when an agent is removed from a work type and will now longer be considered as a destination for an interaction associated with the work type. The id in the payload is the reference to the work type.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          id:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an entity
            example: 15
          idRev:
            type: string
            description: Alvaria-generated unique ID for an entity.  This is the string equivalent of the existing id which is an integer and will be deprecated.
            example: '15'
  EventECScreenPop:
    type: object
    description: This event contains all the information know by the system for an interaction that is being established.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 27
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '27'
          playAudioAlert:
            type: boolean
            description: indication as to if an audio alert should be emitted for this interaction
            example: false
          preemptive:
            type: integer
            description: 'indication of whether this event should get the users focus, 0 is no and 1 is yes'
            example: 1
          requiredRejectReason:
            type: boolean
            description: indication of whether a reject reason is required if the interaction is rejected by the user
            example: false
          requiredResponse:
            type: boolean
            description: indication of whether a response is required for the interaction
            example: true
          mediaType:
            type: string
            description: This value identifies the type of media used for the referenced interaction.
            example: InboundACD
            enum:
              - None
              - InboundACD
              - InboundDID
              - InboundIVR
              - InboundUndefined
              - InboundExternal
              - InboundFax
              - InboundVoicemail
              - OutboundAOD
              - OutboundConference
              - OutboundConsult
              - OutboundConsultXfer
              - OutboundFax
              - OutboundExternal
              - OutboundManual
              - OutboundTPConXfer
              - InternalConference
              - InternalConsult
              - InternalConsultXfer
              - InternalManual
              - OutboundMessage
              - InternalMonitoring
              - InternalRecording
              - InboundChat
              - InboundEmailNLP
              - InboundEmailAgentSel
              - InboundEmailAgentSelfService
              - InboundEmailCDReview
              - InboundEmailSend
              - OutboundEmail
              - InboundWorkflow
              - InboundCTI
              - InboundIM
              - InboundSMS
          switchInteractionId:
            type: integer
            description: To be deprecated.  Interaction Id used by the switch if applicable
            example: 0
          switchInteractionIdRev:
            type: string
            description: This is the string equivalent of the existing switchInteractionId which is an integer and will be deprecated.
            example: '0'
          timeoutForAcceptCall:
            type: integer
            description: this is the duration of the timeout of the accept call if the work type this interaction is associated with has accept call defined
            example: 15
          timeoutForAudioAlert:
            type: integer
            description: this is the duration of the timeout of the audio alert if the work type this interaction is associated with has audio alert defined
            example: 0
          interactionInfo:
            type: object
            description: Structure containing information related to the interaction
            properties:
              outreach:
                type: object
                description: Structure containing outreach information related to the interaction
                properties:
                  callTableRecordNum:
                    type: integer
                    description: record number reference to the call table in outreach if an outbound interaction
                    example: 45
              callBackData:
                type: object
                description: Structure containing callback information related to the interaction if applicable
                properties:
                  callBackFlag:
                    type: integer
                    description: 'indicates if this callback and if so is it a priority callback vs a normal call back, 0:not callback, 1:normal callback, 2:priority callback'
                    example: 1
                  callBackMemo:
                    type: string
                    description: memo string added by creator of this particular call back
                    example: This is an example of a call back memo
                  dialModeCode:
                    type: integer
                    description: 'the dial mode for an outreach interaction or if the interaction is a transfer the initiator, DIAL_MODE_AUTO: 1, DIAL_MODE_PRED: 2, DIAL_MODE_PREVIEW: 3, DIAL_MODE_PRECISION: 4, DIAL_MODE_AGENT_XFERRED: 6, DIAL_MODE_IVR_XFERRED: 7'
                    example: 3
              emailData:
                type: object
                description: Structure containing email information related to the interaction if applicable
                properties:
                  forwardToMBox:
                    type: string
                    description: N/A
                    example: ''
                  fromAddress:
                    type: string
                    description: the senders email address
                    example: docs@alvaria.com
                  emailObjectId:
                    type: string
                    description: id that identifies the object in storage
                    example: email/dd38-55555555-183810/117-0
                  senderCC:
                    type: string
                    description: the CC field of the incoming email
                    example: ''
                  senderTime:
                    type: string
                    description: time stamp of when the email was sent
                    example: ''
                  senderName:
                    type: string
                    description: display name of the email's sender
                    example: ''
                  replyEmailObjectId:
                    type: string
                    description: The storage object access key for the reply or draft email body
                    example: email/dd38-55555555-183810/117-0
                  senderTo:
                    type: string
                    description: the to field of the email
                    example: ''
                  threadId:
                    type: integer
                    description: To be deprecated.  Used to link the replied email with the original email
                    example: 0
                  threadIdRev:
                    type: string
                    description: This is the string equivalent of the existing threadId which is an integer and will be deprecated.
                    example: '0'
              otherData:
                type: object
                description: Structure containing general information related to the interaction
                properties:
                  interactionCategory:
                    type: integer
                    description: "value contained is the category for the interaction, INBOUND:\_1, OUTBOUND:\_2,\_INTERNAL:\_3"
                    example: 2
                  interactionType:
                    type: string
                    description: value contained is the type of interaction passed in the screenpop
                    example: AOD
                    enum:
                      - ACD
                      - AOD
                      - CONFERENCE
                      - CONSULTATION
                      - CONSULTATION_XFER
                      - DID
                      - FAX
                      - IVR
                      - MANUAL
                      - MESSAGE
                      - MONITORING
                      - RECORDING
                      - THIRD_PARTY_CONSULT_XFER
                      - UNDEFINED
                      - EXTERNAL
                      - VOICEMAIL
                      - CHAT
                      - EMAIL_MEDIA
                      - EMAIL_SELECT
                      - EMAIL_SELF_SERV
                      - EMAIL_CDREVIEW
                      - EMAIL_SEND
                      - EMAIL_OUTBOUND
                      - WORKFLOW
                      - CTI
                      - IM
                      - IM_CONFERENCE
                      - IM_CONSULTATION
                      - VIDEO
                      - SOCIAL
                      - SMS
                  screenpopType:
                    type: integer
                    description: 'value contained can be the following, INCOMING_EMAIL_TRANSFER_FROM_AGENT=50, INCOMING_EMAIL_TRANSFER_FROM_SERVICE=56, OTHER=31'
                    example: 2
                  originalWorktypeId:
                    type: integer
                    description: To be deprecated.  This is the original work type id that the interaction was associated with if applicable
                    example: 191
                  originalWorktypeIdRev:
                    type: string
                    description: This is the string equivalent of the existing originalWorktypeId which is an integer and will be deprecated.
                    example: '191'
                  worktypeId:
                    type: integer
                    description: To be deprecated.  This is the work type id that the interaction is associated with if applicable
                    example: 191
                  workTypeIdRev:
                    type: string
                    description: This is the string equivalent of the existing worktypeId which is an integer and will be deprecated.
                    example: '191'
                  timezoneId:
                    type: integer
                    description: To be deprecated.  This is the timezone id of the interaction
                    example: 18
                  timezoneIdRev:
                    type: string
                    description: This is the string equivalent of the existing timezoneId which is an integer and will be deprecated.
                    example: '18'
              screenData:
                type: object
                description: Structure containing screen information related to the interaction
                properties:
                  ani:
                    type: string
                    description: the ani of the incoming interaction if applicable
                    example: '6035551212'
                  callerId:
                    type: string
                    description: the callerId of the incoming interaction if applicable
                    example: Caller Id
                  dnis:
                    type: string
                    description: the dnis of the incoming interaction if applicable
                    example: '6035551212'
                  firstName:
                    type: string
                    description: the first name of the user related to the interaction of applicable
                    example: ELLEN
                  lastName:
                    type: string
                    description: the last name of the user related to the interaction of applicable
                    example: FROST
                  phoneNumber:
                    type: string
                    description: the phone number of the incoming interaction if applicable
                    example: '6035551212'
                  umid:
                    type: string
                    description: the umid of the incoming interaction if applicable
                    example: 01-0010010000-180226-225649658-00376
              interactionData:
                type: array
                description: This is a collection of up to 20 user fields.
                example: ' '
                items:
                  type: object
                  properties:
                    key:
                      description: This is the key of the key value pair.
                      example: UserField1
                      type: string
                    value:
                      description: This is the value of the key value pair.
                      example: example data
                      type: string
                    isMasked:
                      description: This shows whether a field should be masked in the UI.
                      example: 'false'
                      type: boolean
  EventECSystemAvailable:
    type: object
    description: This event indicates that a previously unavailable Engagement Hub was now on line and available.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECSystemStandby:
    type: object
    description: This event is sent by the back end to indicate that the Engagement Hub is in the process of coming on line. This state should be reported to the agent so they know that the system is in a waiting state.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECSystemUnavailable:
    type: object
    description: This event indicates that the Engagement Hub has gone offline and the current session has ended.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECTelephonyAvailable:
    type: object
    description: This event indicates that the telephony subsystem that was previously unavailable to VIA is now available.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECTelephonyUnavailable:
    type: object
    description: This event indicates that the telephony subsystem has issues and is not available to VIA.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECUpdateAgtStatReason:
    type: object
    description: This event indicates that the agent status reason list has been updated and the client should retrieve the new list of reason codes.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: This payload contains no properties.
        properties: {}
  EventECUpdateDisposition:
    type: object
    description: This event indicates that a disposition code has been modified and the client should update any cache of disposition codes.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          id:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for a Disposition entity
            example: '13'
          idRev:
            type: string
            description: Alvaria-generated unique ID for an entity.  This is the string equivalent of the existing id which is an integer and will be deprecated.
            example: '15'
  EventECUpdateDispositionPlan:
    type: object
    description: This event indicates that a disposition plan has been modified and the client should update any cache of disposition plans.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          id:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for a DispostionPlan entity
            example: 14
          idRev:
            type: string
            description: Alvaria-generated unique ID for a DispostionPlan entity.  This is the string equivalent of the existing id which is an integer and will be deprecated.
            example: '14'
  EventECUpdateTeam:
    type: object
    description: This event indicates that a team has been updated.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          id:
            type: string
            description: id of the Team.
            example: '11b8c791-6bd4-4cdf-9b6f-4119b891cec9'
          friendlyName:
            type: string
            description: Friendly name of the Team.
            example: 'Team Name'
  EventECUpdateWorkType:
    type: object
    description: This event indicates that a work type has been modified and the client should update it cache that contains the settings contained in the work type definition.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          id:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for a WorkType entity
            example: 14
          idRev:
            type: string
            description: Alvaria-generated unique ID for a DispostionPlan entity.  This is the string equivalent of the existing id which is an integer and will be deprecated.
            example: '14'
  EventECVoiceLock:
    type: object
    description: Voice lock is an indication that the customer audio is not available to the user.  This is done for the privacy of the customer.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
  EventECVoiceUnlock:
    type: object
    description: This indicates that a previous voice lock state has ended.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
  EventECWrap:
    type: object
    description: This event indicates that the agent has entered the wrap state after an interaction has been terminated. The next step for the agent would be to dispose the interaction.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
  EventECWrapTimeout:
    type: object
    description: This event indicates that an agent has been in the wrap state longer then the configured time allowed to stay in wrap. The client should signal this to the agent.
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          dispositionExpected:
            type: integer
            description: Value of the disposition that was expected by the system.
            example: 11
  EventMessagingEntityAdded:
    type: object
    description: an entity has been added to a chat or SMS session
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          entityType:
            type: integer
            description: 'identifies the type of user, possible types are Agent, 1, Monitor, 2, Customer, 3, System, 4'
            example: 3
          entityId:
            type: string
            description: the id of the user
            example: CO
          entityName:
            type: string
            description: the user’s First & Last name in a human readable form
            example: customerDave
  EventMessagingEntityDialReq:
    type: object
    description: a dial request has been sent by the customer
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          phoneNumber:
            type: string
            description: the customer entered phone number they request to be called at
            example: '6035551212'
  EventMessagingEntityList:
    type: object
    description: a list of entities in a chat or SMS session
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          entityType:
            type: integer
            description: 'identifies the type of user, possible types are Agent, 1, Monitor, 2, Customer, 3, System, 4'
            example: 3
          entityId:
            type: string
            description: the id of the user
            example: CO
          entityName:
            type: string
            description: the user’s First & Last name in a human readable form
            example: customerDave
  EventMessagingEntityPushURL:
    type: object
    description: a push url request has been sent by a customer
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          entityType:
            type: integer
            description: 'identifies the type of user, possible types are Agent, 1, Monitor, 2, Customer, 3, System, 4'
            example: 3
          entityName:
            type: string
            description: the user’s First & Last name in a human readable form
            example: customerDave
          url:
            type: string
            description: the customer entered URL that they want to push to the agent
            example: 'https://www.alvaria.com'
  EventMessagingEntityRemoved:
    type: object
    description: an entity has been removed from a chat or SMS session
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          entityType:
            type: integer
            description: 'identifies the type of user, possible types are Agent, 1, Monitor, 2, Customer, 3, System, 4'
            example: 3
          entityId:
            type: string
            description: the id of the user
            example: CO
          entityName:
            type: string
            description: the user’s First & Last name in a human readable form
            example: customerDave
  EventMessagingEntitySendText:
    type: object
    description: 'text has been received from a customer '
    properties:
      userId:
        type: string
        description: Alvaria-generated unique identifier for a user instance
        example: 99b788f3000d99
      ehubSessionId:
        type: integer
        description: 'To be deprecated.  Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.'
        example: 14
      ehubSessionIdRev:
        type: string
        description: 'Internal session identifier. This identifies the session with the Alvaria&trade; Cloud internal system, which is unique per connection.  This is the string equivalent of the existing ehubSessionID which is an integer and will be deprecated.'
        example: '14'
      payload:
        type: object
        description: Structure containing information related to the event
        properties:
          interactionId:
            type: integer
            description: To be deprecated.  Alvaria-generated unique ID for an interaction instance
            example: 151
          interactionIdRev:
            type: string
            description: Alvaria-generated unique ID for an interaction instance.  This is the string equivalent of the existing interactionId which is an integer and will be deprecated.
            example: '151'
          entityType:
            type: integer
            description: 'identifies the type of user, possible types are Agent, 1, Monitor, 2, Customer, 3, System, 4'
            example: 1
          entityName:
            type: string
            description: the user’s First & Last name in a human readable form
            example: cherylagt1
          text:
            type: string
            description: the text sent by the sender as a distinct message
            example: This is text
  EventFastpathDispostion:
    type: object
    description: This event contains disposition details for the record.
    properties:
      sessionId:
        type: string
        description: 'Alvaria generated alpha numeric id to uniquely identify one instance of session. '
        example: 4c471477-feec-4357-b84e-065a4fabe649
      fastPathListName:
        type: string
        description: Name of the fastpath List which was used to dial fast path record.
        example: 01_Fastpath_MK
      recordNumber:
        type: integer
        description: Alvaria generated numeric id to uniquely identify fastpath record supplied.
        example: 10
      phoneNumber:
        type: string
        description: phone number used for dialing
        example: 011919900333655
      dispositionCode:
        type: string
        description: disposition code returned from dialer to outreach for fastpath record.
        example: DAP
      dispositionTime:
        type: string
        description: disposition time returned from dialer to outreach for fastpath record.
        example: '2018-02-19 16:52:02'
  EventFastpathStatus:
    type: object
    description: This event contains status details like record inserted for dialing or failed to dial because of any validation errors.
    properties:
      requestId:
        type: string
        description: Alvaria generated unique identifier to identify fastpath request given by customer
        example: f39a122c-873f-47f7-8724-c9efdb9d8915
      sessionId:
        type: string
        description: Alvaria generated alpha numeric id to uniquely identify one instance of session.
        example: 4c471477-feec-4357-b84e-065a4fabe649
      fastPathListName:
        type: string
        description: Name of the fastpath List which was used to dial fast path record.
        example: 01_Fastpath_MK
      message:
        type: string
        description: status message from outreach to customer about fastpath record supplied.
        example: FastPath record inserted to fastpathrecinfo table
      recordNumber:
        type: integer
        description: Alvaria generated numeric id to uniquely identify fastpath record supplied.
        example: 10
  EventScriptStatus:
    type: object
    properties:
      ' automationScriptId ':
        type: integer
        description: Alvaria-generated unique identifier for automationScript instance
        example: '915'
      'scriptName ':
        type: string
        description: Name of the automation script.
        example: BaseScript1
      runningState:
        type: boolean
        description: ' Show script running state. This can be false - script is not running, true - script is running '
        example: false
      status:
        type: integer
        description: ' The current state of the automation script. This can be ‘0’ - Ok,‘1’ - Warning,‘2’ – Error '
        example: 2
securityDefinitions:
  oauth:
    type: oauth2
    authorizationUrl: 'https://myaspect.{region}.id.aspect-cloud.net/tokenservice/oauth2/access_token?realm={orgId}'
    flow: implicit
    scopes:
      streamingapi: Manage the Session Management and Streaming resource
