I have a small question regarding the chat solutions and its integration to Shopify.
We want to buy a chat solution made in our country that is fully compatible with the WhatsApp API, this app has not been tested on Shopify. The developers sent us two demo files, a chat.js, and a chat.css files.
They also sent us the code we must insert in the pages, in order to call the chat widget in the pages we need it.
The code in question is this one:
My question is:
How can we make a chat that is not made for the Shopify platform work?, using the things I told you.
Right now I have uploaded into the “assets” part of the theme, the two files, chat.js and chat.css. But I do not know how to call it in order to use it in the front end.
Without seeing the code it’s not a question that could be answered completely. It’s also possible the code would need to be tested so even seeing it might not be enough.
That said I can see you have a few elements and can make assumptions on what each part does.
The HTML. You’d place that part in your theme code where you want the chat box to appear. Or they may want you to pop that at the bottom of the HTML (before the closing tag)
The css file will control the look and feel of the chat box
the js file is the main code that drives it all. Including this script will no doubt load more JS behind the scenes and will look for that HTML element you added. It’s in that element that the JS code will load the actual chat box.
Do you know how to add css and js in your theme? If not, we can start there. Post back so we’ve got a sense of what level of theme code skills you’re at. It’s totally ok if you’re a beginner!
Thank you for reaching out and posting this question!
I understand that you’re looking to purchase a chat solution and integrate it with Shopify. While I’m not a developer by any means and I wouldn’t be able to help with the custom coding provided by your developers, it is; however, possible for you to integrate external solutions using private apps and granting access to your store.
It’s awesome to see that you’re able to get some support from @Jason , and you can see if Jason can continue helping you with this integration. Alternatively, since your question has more to do with APIs, then you can also consider posting this question on the Shopify APIs and SDKs board so that other developers can take a closer look at your question as well.
I’d love to hear more about your business! What kinds of products do you sell? Do you have a marketing plan prepared for your store?