Field name
field_name
Used to update the visitor name, email, phone number, etc. in SalesIQ. Other details like ID, city, etc. can also be updated using the field_name.
Note: All information other than visitor name, email and phone will be updated in the custom info section of the particular visitor.
Use Cases
1. To update the visitor's name:
SalesIQ Script:
replies = [
{
"text":"Your name",
"field_name":"siq_name"
}
];
response.put("replies",replies);
Dialogflow:
{
"platform": "ZOHOSALESIQ",
"action": "reply",
"replies": [
{
"text": "Your name",
"field_name": "siq_name"
}
]
}
Watson Assistant:
"user_defined": {
"zohosalesiq": {
"replies": [
{
"text": "Your name",
"field_name": "siq_name"
}
]
}
}
Zia Skills:
Context Handler function:
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[{
"text": "Your name",
"field_name": "siq_name"
}]);
prompt = Map();
prompt.put("param_name", "reply");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;
Execution function:
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[{
"text": "Your name",
"field_name": "siq_name"
}]);
prompt = Map();
prompt.put("param_name", "reply");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;
2. To update the visitor's email address:
SalesIQ Script:
replies =
[
{
"text":"Your email address",
"field_name":"siq_email"
}
];
response.put("replies",replies);
Dialogflow:
{
"platform": "ZOHOSALESIQ",
"action": "reply",
"replies": [
{
"text": "Your email",
"field_name": "siq_email"
}
]
}
Watson Assistant:
"user_defined": {
"zohosalesiq": {
"replies": [
{
"text": "Your email",
"field_name": "siq_email"
}
]
}
}
Zia Skills:
Context Handler function:
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[{
"text": "Your email",
"field_name": "siq_email"
}]);
prompt = Map();
prompt.put("param_name", "reply");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;
Execution function:
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[{
"text": "Your email",
"field_name": "siq_email"
}]);
prompt = Map();
prompt.put("param_name", "reply");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;
3. To update the visitor's phone number:
SalesIQ Script:
replies =
[
{
"text":"Your phone number",
"field_name":"siq_phone"
}
];
response.put("replies",replies);
Dialogflow:
{
"platform": "ZOHOSALESIQ",
"action": "reply",
"replies": [
{
"text": "Your phone number",
"field_name": "siq_phone"
}
]
}
Watson Assistant:
{
"output": {
"user_defined": {
"zohosalesiq": {
"replies": [
{
"text": "Your phone number",
"field_name": "siq_phone"
}
]
}
}
}
}
Zia Skills:
Context Handler function:
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[{
"text": "Your phone number",
"field_name": "siq_phone"
}]);
prompt = Map();
prompt.put("param_name", "reply");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;
Execution function:
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[{
"text": "Your phone number",
"field_name": "siq_phone"
}]);
prompt = Map();
prompt.put("param_name", "reply");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;
4. To update the visitor's ID:
SalesIQ Script:
replies = [
{
"text":"Your ID",
"field_name":"siq_id"
}
];
response.put("replies",replies);
Dialogflow:
{
"platform": "ZOHOSALESIQ",
"action": "reply",
"replies": [
{
"text": "Your ID",
"field_name": "siq_id"
}
]
}
Watson Assistant:
{
"output": {
"user_defined": {
"zohosalesiq": {
"replies": [
{
"text": "Your ID",
"field_name": "siq_id"
}
]
}
}
}
}
Zia Skills:
Context Handler function:
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[{
"text": "Your ID",
"field_name": "siq_id"
}]);
prompt = Map();
prompt.put("param_name", "reply");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;
Execution function:
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[{
"text": "Your ID",
"field_name": "siq_id"
}]);
prompt = Map();
prompt.put("param_name", "reply");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;
5. To update the visitor's city:
SalesIQ Script:
replies = [
{
"text":"Your city",
"field_name":"siq_city"
}
];
response.put("replies",replies);
Dialogflow:
{
"platform": "ZOHOSALESIQ",
"action": "reply",
"replies": [
{
"text": "Your city",
"field_name": "siq_city"
}
]
}
Watson Assistant:
{
"output": {
"user_defined": {
"zohosalesiq": {
"replies": [
{
"text": "Your city",
"field_name": "siq_city"
}
]
}
}
}
}
Zia Skills:
Context Handler function:
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[{
"text": "Your city",
"field_name": "siq_city"
}]);
prompt = Map();
prompt.put("param_name", "reply");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;
Execution function:
result = Map();
response = Map();
response.put("action", "reply");
response.put("replies",[{
"text": "Your city",
"field_name": "siq_city"
}]);
prompt = Map();
prompt.put("param_name", "reply");
prompt.put("data", response);
result.put("prompt", prompt);
result.put("todo", "prompt");
return result;