COMMUNITY
How can we determine what traffic source a chat starts from?
Is there a way using either Chatbase or Snatchbot analytics to determine where the traffic is sourced? (e.g. Facebook ad vs. Pinterest ad vs. website link)
Thanks!
Posted by Emily almost 6 years ago
Webhook is not receiving User input
My Webook is not retrieving the users input. Only the Bots input.
$requestBody = file_get_contents('php://input');
$requestBodyJson = json_decode($requestBody,true);
$file = '/srv/uk-debtcollection.com/public/htdocs/chat';
$current = file_get_contents($file);
$current .= "*****START*****\n";
foreach($requestBodyJson as $key => $value)
{
if(is_array($value))
{
foreach($value as $k => $v)
{
$current .= "POST Arr parameter '$k' has '$v'\n";
file_put_contents($file, $current);
}
}
else
{
$current .= "POST parameter '$key' has '$value'\n";
file_put_contents($file, $current);
}
}
$current .= "*****END*****\n";
file_put_contents($file, $current);
This is my code. This is the result when the User types something:
*****START*****
POST parameter 'bot_id' has '51530'
POST Arr parameter 'channel' has 'webchat'
POST Arr parameter 'from' has 'TestBot'
POST Arr parameter 'message' has 'OK thank you for confirming that
::next::
May I please by take your name?'
POST Arr parameter 'module_id' has '770105'
POST parameter 'session_id' has '2812762'
POST parameter 'source' has 'bot'
*****END*****
*****START*****
POST parameter 'bot_id' has '51530'
POST Arr parameter 'channel' has 'webchat'
POST Arr parameter 'from' has 'user.15a1051c120d7fa1.pBFTPCdb'
POST Arr parameter 'message' has ''
POST Arr parameter 'module_id' has '770105'
POST parameter 'session_id' has '2812762'
POST parameter 'source' has 'bot'
*****END*****
As you can see there is no message in the second set, this is the users response. Please confirm what im doing wrong.
Posted by Daryl Goode almost 5 years ago
Multiple If statement reply
Hello, so in a reply of my bot I have multiple If statements based on the replies I gave the bot before. The code appears like this (isn't a better way to write it?):
OK, then the total cost is [IF([responseTo interaction=1180608 fallback=no]=I'm 21){[IF([responseTo interaction=1180652 fallback=no]=35 Lessons Package){ € 741,10 for a year subscription of 35 lessons of 30 minutes per lesson including 21% btw. You can pay it in one go or in 3 instalments. The last option has an administration fee of €7,50.}]}]
[IF([responseTo interaction=1180608 fallback=no]=I'm older than 21){[IF([responseTo interaction=1180652 fallback=no]=35 Lessons Package){ € 741,10 for a year subscription of 35 lessons of 30 minutes per lesson including 21% btw. You can pay it in one go or in 3 instalments. The last option has an administration fee of €7,50.}]}]
[IF([responseTo interaction=1180608 fallback=no]=I'm younger than 21){[IF([responseTo interaction=1180652 fallback=no]=35 Lessons Package){ € 612,50 for a year subscription of 35 lessons of 30 minutes per lesson. You can pay it in one go or in 3 instalments. The last option has an administration fee of €7,50.}]}]
The reply I got contains a lot of "}]" like this, that come when the other conditions are not met:
OK, then the total cost is € 741,10 for a year subscription of 35 lessons of 30 minutes per lesson including 21% btw. You can pay it in one go or in 3 instalments. The last option has an administration fee of €7,50.
}]
}]
How can I solve this problem?
Thanks
Luca
Posted by Luca Ridolfo over 4 years ago
Not getting my chat messages in a proper sequence
Hello I am not able to use reports to view all the message chat in a proper sequence, all the messages are shown in a shuffle way. Kindly view my chat bot and suggest me how I can get all the data given by my customer on chat bot.
Posted by Satish Sharma almost 6 years ago
Sending 2 messages without a user answer inbetween?
Hello. I'm new to SnatchBot. Can someone help me? I want my Bot to send a message in which he explains what he does and asks the user if he understands that. After the user said yes, the Bot sends the message "Awesome, so let's go then!". After this message I want the Bot to send the first question. How can I manage to do this?
Thank you so much guys!
Posted by Julia Egli about 5 years ago
Remove bot from facebook
Hi, I tried to remove bot from my fb page but its not moving from there. Need help urgently. Thanks
Posted by sakshi over 5 years ago
Why JSON always error
I want to ask about the JSON API module. so I want to connect between Snatchbot and Integromat, in which I want to send to Google Spreadsheets and Gmail and I have also prepared custom attributes. when I send it always gets an error response but it works, it's annoying very annoying help. please
Posted by Rafi about 5 years ago
Automated Sequence
Can the snatchbot platform send an automated sequence? If so how do i implement it?
Posted by JOQUEL O HALYARD almost 6 years ago
This bots can capture the location URLs?
I need that the bot at the end of conversation, capture the URL location using this simple script:
<script>
document.getElementById("demo").innerHTML =
"The full URL of this page is:<br>" + window.location.href;
</script>
Is it possible to be made? Thanks!
Posted by Willian almost 6 years ago
Vietnamese flag icon when choosing language for bot is wrong
Snatchbot flag icon for Vietnamese (https://snatchbot.me/img/flags_lang2/vi.png) is wrong. The official flag of Vietnam is a red flag with a yellow star in the middle.
I believe the current flag icon (a yellow eagle with U.S flag in the middle) is originally a logo used by the Third Republic of Vietnam, which is a government in exile. This oganization has acts of sabotage against current Vietnamese government.
Please correct this as it's not the official flag of Vietnam.
Posted by Le Thanh Vinh about 5 years ago