Upload and update Greetings (Prompts)

We need to update Greetings in call flow based on situations such as mass outage to explain the reason to caller and update the Greeting message every one hour until problem fix and replace the Greeting with Default.
Questions are:

  • What is difference between Greeting and Prompts
  • How to upload a new Wav file to PureCloud OR how to upload a new text for text to speech process
  • How to set call flow to use newly uploaded Wav file
  • How to set call flow to use default Greeting using Greeting ID

I tried to use Greetings api : https://developer.mypurecloud.de/api/rest/client-libraries/dotnet/GreetingsApi.html#getgreetings
and it's examples but what i get is always empty json; i even cant get current default greeting message and/or id
I use C# and have done many call analytics using your help.
Thanks

What is difference between Greeting and Prompts
Greeting has nothing to do with flows.

How to upload a new Wav file to PureCloud OR how to upload a new text for text to speech process
There's a tutorial for uploading a wav file for a prompt: https://developer.mypurecloud.com/api/tutorials/upload-prompts/?language=nodejs&step=1
Updating the TTS just requires a PUT to the prompt resource with the new TTS.

How to set call flow to use newly uploaded Wav file
Read https://help.mypurecloud.com/articles/user-prompts/ in particular the snapshotting behavior.
Consider using dynamic prompts and a data table to decide which one to play. The data table could have the TTS message to play to the user, or the name of the prompt to play if you want to use a wav file instead of TTS.
https://help.mypurecloud.com/articles/work-with-dynamically-referenced-prompts/
https://help.mypurecloud.com/articles/work-with-data-tables/

How to set call flow to use default Greeting using Greeting ID
Not possible, re:Greeting has nothing to do with prompts.

1 Like

Thanks,
I was able to add a new prompt by only assigning Name and Description with null resources. Now i need to PUT to resource to update it's text to speech.
let's say ID here is the prompt ID that i got from PureCloud that i want to update it's Tts. I used below C# code:

    var apiInstance = new ArchitectApi();
    PromptAsset NewPromptAsset = new PromptAsset();

    try
    {
        NewPromptAsset.Language = "en-US";
        NewPromptAsset.TtsString = "Test one Text to Speech";
        apiInstance.PutArchitectPromptResource(ID, "en-US", NewPromptAsset);
    }

I received error message:

Error calling PutArchitectPromptResource: {"status":404,"code":"architect.prompt.resource.not.found","message":"Could not find resource with language 'en-us' in specified prompt.","messageWithParams":"Could not find resource with language '{language}' in specified prompt.","messageParams":{"language":"en-us"},"contextId":"b28c5b9f-d37d-45c4-923f-33eb0dfa2037","details":[],"errors":[]}

What i missed here? in "apiInstance.PutArchitectPromptResource" asks for language code. What is code for English?

Solved... :slight_smile:
We need to get UploadUri using GET command and put it in PUT command

New problem came up ...
When i want to upload a .Wav file to a prompt from hard drive, i use .UploadUri property. Looks like instead of uploading wav file, i should upload a stream.
Question is How to convert a wav file to stream and upload it to Purecloud for a prompt?

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.