GetName
Listen for the end user to say a person’s name.
Accepts either a single name like “Anne” or a first and last name.
Properties
Property |
Type |
Description |
Required Properties |
on_done |
string |
Callback URL to be sent an HTTP POST request when finished.
See Get name callback for details. |
Optional Properties |
timeout_seconds |
integer |
Time, in seconds, to wait for the user to say a number.
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": "GetName",
"on_done": "http://myserver.com/gotname",
"timeout_seconds": 15,
"prompt_url": "http://myserver.com/state_name.wav"
}
Get name callback
HTTP request sent when a GetName command finishes.
Request
method: | POST |
content-type: | application/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 |
string |
The name that was spoken by the end user. |
Example
{
"account_id": "372718353dcf4d16",
"connection_id": "6f5704748865267a",
"value": "steven smith"
}
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. |