How to setup Buyer-Seller chat for your Marketplace

It only takes a few minutes to integrate AtomChat with your website! Once installed, you’ll be able to enable vendors and customers to chat with each other in real-time.

How to start an instant chat with a vendor?

A buyer on your website will browse through products listed by vendors on their pages. Similar to buying something just by clicking on a 'Buy Now' button, the most efficient way to enable a buyer to connect with the seller is by adding a 'Chat Now' button on their profiles!

How to launch a Private Chat window on-click of the button?

First, you need to create a button on your end. Once you've created and added a 'Chat Now' button against vendor profiles, clicking the button now has to action to open their private chat window.

We'll guide you how!

How to launch AtomChat's private chat window in the Docked layout on click-event of a button?

Docked Layout -

i. Create and add the button on your site against vendor profiles.

ii. Use our Launch AtomChat JavaScript API -


Here, you need to pass the user_id of the user to "uid" dynamically. This is the user_id of the vendor whose chat window should open.

In the above example, we have passed uid "1". This will open the chat box of the user whose user_id is "1". And this should be dynamically passed.

For example, if you are using WordPress, uid will be WordPress user_id.

How to launch AtomChat's Embedded layout on click-event of a button-

You may want an inbox-like layout, i.e our embedded chat window for vendors and buyers. This layout can be opened by clicking a button.

Embedded Layout -

i. Add AtomChat's Embedded layout to a page on your website.

ii. Create and add the button on your site.

iii. To launch the chat window on button click from one page to another page where you have the embedded integrated, you can refer to this sample code-


Please replace the href value with the page URL where you have AtomChat's embedded layout on your website and pass the userid value in the URL as GET parameter.

For userid, you need to pass the value of selected user's userid dynamically.

iv. After the first click event, you are redirected to the embedded layout chat page. Then, you need to use this passed userid value in the URL to launch the selected user's chat box in the layout directly.

Retrieve the userid value from URL using this code-


Once we get the userid value, use this code to launch that selected user's chat window-