Hi there! I’ve to create a brief integration via API (the API library of the Freshbot) between Freshbot and Freshchat.
The Freshbot is already implemented in Freshchat, but what I’ve to do is create a API (in the bot) that will make a request to the user API in Freshchat, updating the custom properties of that user with some info of the same. Like so:
The problem is that I can’t get the user’s id in a dynamic way. Thought I could use the “Customer’s Id” parameter in freshbot as shown above (I don’t know if that is a native parameter), but it doesn’t work. I also send that parameter to a webhook *(webhook.site)*and it’s data was empty.
This is the parameter.
How can I get the current user’s id automatically? Is it possible to do that in Freshbot?
I will check with the product team regarding this query and get back to you at the earliest
You can hit the conversations API and get the user ID,
Once you get the user_id you can use it in the user API
please refer this API for more reference
Hope it helps
To set custom user properties from bot to chat, you can do to this:
For freshbots accounts that is not embedded into freshchat:
In the integration configuration: Settings > Freshchat > select Freshchat Widget + Live Agent Assist > then edit the integration configuration for your bot > field “Customer meta”: you can set the payload to return:
PS: in this case you can pick up the nodes id in the classic interface.
For new accounts where bots is embedded into chat:
Just set it using the action “Set property”:
Hi Samuel. The Freshbot that I’m working on isn’t embedded into Freshchat.
So, I didn’t understand what I need to do in the Customer meta, I fill that filed with a json, but how that will be registered in Freshchat on the user object?
The properties you set in customer meta will be set in custom user properties in freshchat when you assign the conversation to freshchat, using actions “assign to group” or “resolve” from freshbots.
I tried doing as you told, but it didn’t work
Can we make a call to resolve this issue?
@Matheus_Souza_Silva While we are checking with the Freshchat internal team and passing on the suggested solution, could you try connecting with Freshbots support at Support : Freddy?
We tried connecting with the Freshchat team to help you out on this. Unfortunately, we haven’t received any response from the team. I recommend you raise a ticket with firstname.lastname@example.org including the link to this topic for additional context.
This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.