Variable
Should you want to pass a variable to a Socrates survey you can do so with this API call.
URL https://www.socratesinsights.com/api/conversation/variable
<?xml version="1.0" encoding="UTF-8"?>
<conversation>
<token>XYZ123456</token>
<variable>
<name>animal</name>
<value>fish</value>
</variable>
</conversation>
token required. Supplied during conversation/start and relevant to the survey you are about to take.
variable > name required. Variable name passed to survey.
variable > value required. Variable value passed to survey.
<?xml version="1.0" encoding="UTF-8"?>
<conversation>
<token>XYZ123456</token>
<message>Variable passed successfully</message>
</conversation>
<?xml version="1.0" encoding="UTF-8"?>
<conversation>
<error>
<message>Invalid token.</message>
</error>
</conversation>
token Supplied during conversation/start and relevant to the survey you are about to take.
message Message displayed when variable passed successfully.
error > message This appears should you supply an invalid token or invalid variable name and/or variable value.