GetYesOrNo

Get a spoken yes or no response.

Properties

Property Type Description
Required Properties
on_done string Callback URL to be sent an HTTP POST request when finished. See Get yes or no callback for details.
Optional Properties
timeout_seconds integer Time, in seconds, to wait for the user to say a negative or affirmative response. When the timeout expires, will send an empty string to the on_done callback and move on to the next command in the routine.
prompt_url string URL of the .wav or .mp3 file to play at the start of the command. Normally used to communicate instructions to the end user.

Example

{
    "name": "GetYesOrNo",
    "on_done": "http://myserver.com/wantsfries",
    "timeout_seconds": 15,
    "prompt_url": "http://myserver.com/do_you_want_fries.wav"
}

Get yes or no callback

HTTP request sent when a GetYesOrNo command finishes.

Request

method:POST
content-type:applcation/json

The request body contains a JSON object with the following properties:

Property Type Description
account_id string The ID of your Sift API account.
connection_id string ID of the Connection that handled the command.
value boolean The selection that was made by the end user.
{
    "account_id": "372718353dcf4d16",
    "connection_id": "6f5704748865267a",
    "value": true
}

Response

content-type:application/json

The response body may optionally contain a JSON object with the following properties.

Property Type Description
Optional Properties
routine list A new routine list to run on the connection referenced by the connection_id property of the request.