This is the main API call you must make to continue a conversation with Socrates. You will need to supply the conversation token supplied by the conversation/start API call.
Once the conversation has started, you must also supply the answer to the previous question prompted by Socrates.
Note. If the answer you have provided does not meet the specified format, the conversation will be repeated with error information appended to the message.
Your first request for a conversation, or a request from a previous conversation that does not require an answer…
<?xml version="1.0" encoding="UTF-8"?> <conversation> <token>XYZ123456</token> </conversation>
A request for a conversation, including a reply to a previous conversation that requires a single answer…
<?xml version="1.0" encoding="UTF-8"?> <conversation> <token>XYZ123456</token> <reply> <answer>I am an iPhone</answer> </reply> </conversation>
A request for a conversation, including a reply to a previous conversation that requires multiple answers…
<?xml version="1.0" encoding="UTF-8"?> <conversation> <token>XYZ123456</token> <reply> <answer>iPhone</answer> <answer>Android</answer> <answer>Blackberry</answer> </reply> </conversation>
Conversation that does not require an answer…
<?xml version="1.0" encoding="UTF-8"?> <conversation> <token>XYZ123456</token> <question> <participant>Socrates</participant> <text>Thanks for participating in our survey, let's begin!</text> </question> <answer> <prompt>Continue...</prompt> <required>NO</required> </answer> </conversation>
Conversation that requires an answer of type TEXT…
<?xml version="1.0" encoding="UTF-8"?> <conversation> <token>XYZ123456</token> <question> <participant>Socrates</participant> <text>What is your name?</text> </question> <answer> <prompt>Continue...</prompt> <required>YES</required> <type>TEXT</type> </answer> </conversation>
Conversation that requires an answer of type NUMBER…
<?xml version="1.0" encoding="UTF-8"?> <conversation> <token>XYZ123456</token> <question> <participant>Socrates</participant> <text>How much was the last cup of coffee you purchased?</text> </question> <answer> <participant>Jereme</participant> <prompt>Continue...</prompt> <required>YES</required> <type>NUMBER</type> </answer> </conversation>
Conversation that requires an answer of type CURRENCY…
<?xml version="1.0" encoding="UTF-8"?> <conversation> <token>XYZ123456</token> <question> <participant>Socrates</participant> <text>How much was the last cup of coffee you purchased?</text> </question> <answer> <participant>Jereme</participant> <prompt>Continue...</prompt> <required>YES</required> <type>CURRENCY</type> </answer> </conversation>
Conversation that requires you to SELECT ONE answer from a list of options…
<?xml version="1.0" encoding="UTF-8"?> <conversation> <token>XYZ123456</token> <question> <participant>Socrates</participant> <text>Would you like to continue this conversation?</text> </question> <answer> <participant>Jereme</participant> <prompt>Continue...</prompt> <required>YES</required> <type>SELECT-ONE</type> <select> <option>Yes</option> <option>No</option> </select> </answer> </conversation>
Conversation that requires you to SELECT ONE or MULTIPLE answers from a list of options…
<?xml version="1.0" encoding="UTF-8"?> <conversation> <token>XYZ123456</token> <question> <participant>Socrates</participant> <text>What are the colors of your local football team?</text> </question> <answer> <participant>Jereme</participant> <prompt>Continue...</prompt> <required>YES</required> <type>SELECT-MULTIPLE</type> <select> <option>Black</option> <option>White</option> <option>Blue</option> <option>Red</option> <option>Yellow</option> <option>Green</option> <option>Orange</option> </select> </answer> </conversation>
<?xml version="1.0" encoding="UTF-8"?> <conversation> <token>XYZ123456</token> <question> <participant>Socrates</participant> <text>Would you like to continue this conversation?</text> </question> <answer> <participant>Jereme</participant> <prompt>Continue...</prompt> <required>YES</required> <type>SELECT-ONE</type> <select> <option>Yes</option> <option>No</option> </select> </answer> <error> <message>We asked for YES or NO, but you supplied MAYBE</message> </error> </conversation>