Sending data from another system to update HubSpot live chat properties - javascript

I'm using hubspot's live chat feature in one of my products. Currently, I am using a chatbot conversation to get user information in order to identify a user. But I need a way to get the user's input (email, username), whenever they start a conversation through the chat widget without asking them.
Is there any possible way to send data from another system to update the HubSpot live chat?

Related

Send web push notifications to specific users through js in a php web app

is there any way out / resource which can guide how we can send the push notifications through a javascript to a specific user (through a device id). We have a web app that contains of a login functionality backed by MySQL. We want to send specific alerts to the specific users who are registered. We are open to take any more hidden detail of user if required to complete this task.
We are currently using the JS push notification library to send push notifications but thats currently static not dynamic.
You could run an ajax-call in the background which calls a script with the user-id as an parameter and that returns the messages you want to show to the specific user. Then you can show the message to the user.

How to have one to one chat using firebase in AngularJS

I am trying to have a one to one chat feature using firebase. Right now, my structure of messages makes sense in the fb database but I am not able to implement one to one chat feature using firebase's api in angular. I am able to spam a chat room where all the users can see everyone's messages but i would like to have a one to one chat feature in my application. My structure is good in the firebase database and i just need to manipulate my javascript code to make it work. My code is as follows.
function chatController($scope,$firebaseArray) {
var ref1=firebase.database().ref().child('users/59c1c11cec/chats/-KuRshPYbO_d9B');
$scope.chats=$firebaseArray(ref1);
var ref=firebase.database().ref().child('chats/-KuRshPYbO_d9B/messages');
$scope.messages=$firebaseArray(ref);
$scope.send=function(){
$scope.messages.$add({
message:$scope.messageText,
// date:Date.now()
})
}
}
I am able to create a one to one chat between two users by hard coding their user ids, but I was wondering if firebase's api is able to do this dynamically. If yes, how would I do it? For reference, 59c1c11cec is the current logged in user id, -KuRshPYbO_d9B is the other person's id who the current person is starting a conversation with which I don't have any access to in my own database but only in firebase's database. And using that users id I retrieve the messages between the two users. How will I be able to achieve this? I just need to replace the hard coded values with the values I talked about.Thanks a lot in advance!

Firebase one to one chat implementation for web

I implemented friendly chat. But that is group chat. I am new to firebase. Need docs for creating one to one web chat. How to get list of user accounts and selecting single user to send message? Please help me
If the users communicating have user IDs uid_1 and uid_2.
The database structure should be:
contacts
--uid1
--uid2
--uid3
-- so on (1)
--uid2
--uid1
--uid4
-- so on (2)
messages
--uid1
--uid2
-- Push messages here.(3)
--uid2
--uid3
-- Push messages here also.(4)
Adding Contacts
If USER 1 knows USER 2 you can add USER 2 in location (1) and add USER 1 in location (2). Since you are implementing with user IDs the USERS will be able to send messages if they know the other USER's uid. You can send Chat Invites to exchange uids.
Adding Messages
If USER 1 or USER 2 sends a message add at locations (3) and (4). This implementation will make sure that even if USER 1 deletes a conversation with USER 2, USER 2 will still have a copy and thus ensuring privacy.
These are the key elements to make a basic one-on-one Firebase Chat App.
NOTE: User IDs are provided by Firebase on successful authentication.
Maybe try breaking your problem into individual milestones and learn how Firebase works as you need help in each milestone.
According to what you have written, you have to:
Authenticate Users (https://firebase.google.com/docs/auth/)
Save those user profiles onto the Real-Time Firebase Database in the following data structure (https://firebase.google.com/docs/database/)
List those users in a List / RecycleView (learnhowtoprogram.com/android/data-persistence/firebase-recycleradapter)
Manage the conversation through listeners in the adapter that reference child nodes which serve as rooms between 2 people.
Think about how to make your structure as efficient as possible such as not saving conversations twice under each user but rather saving a reference to a separate 'conversations' node.
I recently implemented this in my location-based app (Occupapp) if you want a live example. You will have to register, add a service and log in from another device and select that service to chat to the owner.

Banning users from Facebook group

I'm developing a userscript in which I want to place a "ban member" button next to every post on a group's timeline. I've already coded a way to get post author's UID and place the button, but how to ban a member from a group? Is there any way to do so? Graph API is not working for me in this case.
Facebook API doesn't let you ban users via their API - basically your only option is writing a script that opens a browser and does that for you. You can do it with something headless, like PhantomJS.

Using OneSignal Push Notifications with WebViewApp

We have a HTML5 website which uses normal user login and password. We have encapsulated this in a WebView App purchased on CodeCanyon. The app has facility for OneSignal push notification which is configured and working fine.
We want to send user specific push notifications. In OneSignal we can see the device ID - but we don't get the user ID. In our website database we can see only the user ID.
We understand that some programming is required to link this. We need help on achieving following:
a) When the user log in from the HTML5 website (and he is using mobile device) - it should update the OneSignal ID in the user table in the database.
b) The code for login is in JavaScript. There must definitely be some way to call OneSignal SDK (used by WebViewApp) in the JavaScript.
Acording to the onesignal API documentation you have to send data tags in order to get that info
https://documentation.onesignal.com/docs/add-user-data-tags

Categories