Skip to main content

Uniphore Help Center Portal

Update Perceived Latency Settings

This API allows users to update the settings used to notify end users when there is a delay in the BOT’s response. You can configure a predefined audio clip or message to be played during the hold time while using the UVC connector. The audio or message should acknowledge that the user's input has been received by the BOT and indicate when the response is in progress or delayed.

Endpoint

Method: PUT

URL: https://<<host name/cse/connector/uvc/interactDomain/virtualAgent/{vrmId}/language/{langId}/updatePerceivedLatencySettings/

curl -X 'PUT' \   
    'https://<<hostname>>/cse/connector/uvc/interactDomain/virtualAgent/2/language/5/updatePerceivedLatencySettings' \   
		-H 'accept: application/json' \   
		-H 'Tenant-Id: uniphore' \   
		-H 'Environment-Name: Dev' \   
        -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpL2aG9yZS5j_uzCBlnKg80BnVAQytXZne_zJBG7B6PHbmsdsJvjrO6jyQYiVpcCfe8c6qImmQEex3HaMpBXg' \   
        -H 'Content-Type: application/json' \   
        -d '{
              "enableTypingAudio": true,
              "holdMusicConfig": {
              "enabled": true,
              "audioFile": {
              "displayName": "Holdmusic.wav",
              "fileName": "Holdmusic.wav"
            }
            },
              "fillerMessagesConfig": {
              "enabled": false,
              "fillerMessages": [
              "Filler message one",
              "Filler message two two",
              "Filler message Three Three Three"
              ],
              "fillerMessagesWaitOffset": {
                  "firstFillerMessageWaitOffset": 3,
                  "min": 3,
                  "max": 5
                }
                  },
             "audioFileNameToPlayAfterReceivingUserInput": {
             "displayName": "typing 1.wav",
             "fileName": "typing 1.wav"
             }
             }'    
Header Parameter

Authorization - <Bearer Token>

To learn more about Authorization, click here.

Parameter Name

Data Type

Description

Required/ Optional

Tenant-Id

String

ID of Tenant. You can find the tenant id in the URL.

Required

Environment-Name

String

Name of the Environment. Dev is the default environment.

Required

Path Parameter

Parameter Name

Data Type

Description

Required/ Optional

vrmId

String

ID of the Virtual Agent and Role combination

Required

langId

String

ID of the language

Required

Note

To obtain vrmId and langId, refer to the Fetch Virtual Agent Details API.

Request Parameter

Parameter Name

Data Type

Description

Required/ Optional

enableTypingAudio

Boolean

If set to True, an audio file can be added to play after receiving user input. When the typing audio is enabled and no audio file is added, then no sound will be played.

Required

holdMusicConfig: enabled

Boolean

If set to True, an audio file can be added to play when the user is waiting for a response. The hold music will be played in a loop until the BOT responds.

When the BOT sends the response while playing the hold music, the audio will be stopped abruptly, and the BOT's response will be played.

If both holdMusicConfig and fillerMessagesConfig are set to True then the hold music will be played first followed by the filler message.

If set to False, the firstFillerMessageWaitOffset is required.

Required

holdMusicConfig: audioFile: displayName

File

The name of audio file that will be played when the user wait for a response. This is the display name of the audio file.

Enter the audio file name with extension. (e.g., holdmusic.wav).

Required when holdMusicConfig is set to True.

holdMusicConfig: audioFile: fileName

File

The name of audio file that will be played when user wait for a response. The audio may contain a pleasant music. This is the actual name of the audio file which can be uploaded through media controller.

To upload the audio file, refer to Add Audio file for UVC.

Required when holdMusicConfig parameter is set to True.

fillerMessagesConfig: enabled

Boolean

If set to True, a message will be played when the caller is waiting for a response. (e.g., Please wait while we process your data).

When the BOT sends the response while playing the filler message, the current filler message will continue to play and, the response is played after that.

If both holdMusicConfig and fillerMessagesConfig are set to True then the wait offset time for the filler message is ignored.

Required when holdMusicConfig: enabled parameter is set to False.

fillerMessagesConfig: fillerMessages

String

Enter the message to be played while the caller is waiting for a response.

It is recommended to add a set of at least 10 messages, which will be played in random order.

Required when fillerMessagesConfig parameter is set to True.

firstFillerMessageWaitOffset

Number

Enter the time in seconds.

The first filler message will be played after the time mentioned in this field.

Required when fillerMessagesConfig parameter is set to True.

The firstFillerMessageWaitOffset is not required when holdMusicConfig is enabled.

fillerMessagesWaitOffset: min

fillerMessagesWaitOffset: max

Number

Enter the time in seconds.

The BOT will choose a random time between the min and max for each turn. If you don't get a response from the BOT, the filler message is played. (e.g., If you set 2 as minimum time and 6 as maximum time then the BOT will play the set of messages in a random order between 2 and 6 seconds while waiting for the BOT's response.)

Required when fillerMessagesConfig is set to True.

audioFileNameToPlayAfterReceivingUserInput: displayName

File

Enter the audio file to be played after receiving user input. This name is display name of the audio file.

Required when enableTypingAudio parameter is set to True.

audioFileNameToPlayAfterReceivingUserInput: fileName

File

Enter the audio file to be played after receiving user input. This is the actual name of the audio file uploaded through media controller.

Enter the audio file name name with an extension. (e.g., typing.wav).

To upload the audio file, refer to Add Audio file for UVC.

Required when enableTypingAudio parameter is set to True.

Sample Request
{
  "enableTypingAudio": true,
  "holdMusicConfig": {
    "enabled": true,
    "audioFile": {
      "displayName": "Holdmusic.wav",
      "fileName": "Holdmusic.wav"
    }
  },
  "fillerMessagesConfig": {
    "enabled": false,
    "fillerMessages": [
      "Filler message one", "Filler message two two", "Filler message Three Three Three"
    ],
    "fillerMessagesWaitOffset": {
      "firstFillerMessageWaitOffset": 3 
      "min": 3,
      "max": 5
    }
  },
  "audioFileNameToPlayAfterReceivingUserInput": {
    "displayName": "typing 1.wav",
    "fileName": "typing 1.wav"
  }
}
Sample Response
{
"data": "success",
"errorBody": null
}
Response and Error Codes

Response Code

Condition

200

OK

400

Bad Request

401

Unauthorized

500

Internal Server Error