2

I am a little baffled with the issue I am facing with Zobot. I have developed a Zobot in which I am using visitorsession to store some values and reuse them later. It works great in Zoho Developer environment, we used Deluge scripts option to do the development.

But when I deploy it using embed script on my website, the visitorsession part of the code is returning null. I searched around and found not a single person facing this issue or posting it, I am really surprised its happening only to me. Can someone please suggest what I should do. I have explained what I am facing below:

  1. I am storing values like this storeResponse2 = zoho.salesiq.visitorsession.set(portal_name,{"a":"b"});

  2. I am getting the values like this zoho.salesiq.visitorsession.get(portal_name,"a").get("data").get("a");

  3. It is working great in Zobot Development environment in the Preview section, but when I go to my website where I put the embed, I am getting null.

  4. In both environments, the response I get when I do the set is the same. Its not throwing any error, it is giving me valid response. The response I am getting when I set, in both environments is: {"url":"/api/v2/bigtalk/visitorsessions","object":"session","data":{"a":"b"}}

  5. But when I do a get, in Zoho environment I get correct value, in production I get null Attachments area

ZohoCoder
  • 385
  • 5
  • 15
Ugendran R
  • 21
  • 1
  • As an alternative, will `response.get("data").get("a")` do the same thing and work in both environments? – ZohoCoder Aug 11 '22 at 19:21

2 Answers2

0

If this happens, it probably means that you are setting and getting the data from visitorsession in the same execution.

It doesn't work that way. It should be set in one execution and get in further executions (replies). And this won't be a problem anyway, as in the same execution, you'll have the data available already.

0

Sometimes when you go from development environment to deployment - you need to generate a new Oauth connection and update your function to show that.

This is a known issue with Zoho CRM and it may well be an issue with SalesIQ as well.

starball
  • 20,030
  • 7
  • 43
  • 238