Skip to main content

Integration guide

What you need to know

Bambuser Chat embeds easily on any website with a lightweight JavaScript code snippet. It will only appear after important website content because it loads asynchronously, and it won't interfere with any other on-page content, code, or SEO because it's in an iframe. It's also extendible so you can listen to and interact with it using the Bambuser Chat API for more advanced setups.

Set up Bambuser Chat

1. Add the Bambuser Chat tag

Ahead of implementation, we will send you two App IDs for each website region. In each case, one App ID is for your Staging environment and one for your Production environment.

  1. Staging App ID - add this to your Staging website pre-production or any other environment for testing which is not public and best reflects the live environment.
  2. Production App ID - add this to your live production environment. Bambuser will need to complete your production website's configuration and confirm that everything is set up correctly before the JavaScript is deployed. This step will usually take place at the end of the integration process just before going live.

The default integration is to include the following script tags on your website. It will automatically initiate the messenger widget for your customers when your agents are online in the store app.

<script>
window.HeroWebPluginSettings = { applicationId: "Your_App_ID" };
(function (i, a, m, h, e, r, o) {
i.HeroObject = e;
(i[e] =
i[e] ||
function () {
(i[e].q = i[e].q || []).push(arguments);
}),
(i[e].l = 1 * new Date());
(r = a.createElement(m)), (o = a.getElementsByTagName(m)[0]);
r.async = 1;
r.src = h;
o.parentNode.insertBefore(r, o);
})(window, document, "script", "https://cdn.usehero.com/loader.js", "hero");
</script>

Now the Chat will be visible on your website, if not please consult the Chat is Not Appearing on My Website troubleshooting document.

hint

After adding the Bambuser Chat code to the website please activate the Inspector Tool in order to spot the any issues that might appear.

2. Track Shopper Events

Bambuser Chat can empower store team members with context on how shoppers are behaving on your website to support their conversations. For this to work, you will need to set up Bambuser Chat to track the specific actions shoppers take on your website.

required

Make sure 'Product view' and 'Purchase' Shopper Event tracking is set up at launch. Bambuser Chat will not work properly without these events in place.

The Product View Shopper Event gives store experts who are about to chat to shoppers, context on which products they have been viewing.

Product View fields:

NameValueTypeRequiredDescription
typeecommerce:detailtextyesThe type of tracking
productsSee examplearrayyesThe product details
<script>
hero("track", {
type: "ecommerce:detail",
products: [
{
id: "314-7216-102",
name: "Tennis Shoe Classic - Size 10",
image: "https://example.com/images/314-7216-102.jpg",
price: 70.99,
currency: "USD",
brand: "Plausible Co.",
category: "Footwear > Sports > Tennis",
location: "https://example.com/products/314-7216",
},
],
});
</script>

eCommerce Subfields are the mandatory items you will need to provide Bambuser Chat with to ensure Shopper Events track all the key information.

note

Please note if all recommended fields have not been included during set up, Bambuser Chat will fall back on the data provided in your Product Feed.

Purchase array item subfields

NameTypeRequiredDescription
idtextyesThe purchase/order ID
subtotalnumberyesThe total price for all products in a purchase
currencytextyesThe purchase currency (ISO 4217)
totalnumbernoThe overall adjusted total calculated price for all of the product a purchase
taxnumbernoThe purchase tax
shippingCostnumbernoThe purchase shipping cost
shippingMethodtextnoThe purchase shipping method
coupontextnoThe purchase coupon

Product array item subfields

NameTypeRequiredDescription
idtextyesThe unique product or SKU (must exactly match one product in the Product Feed)
quantitynumberyes*The product quantity
basketQuantitynumberyes**The new basket quantity for this product
namenumberrecommendedThe product name
imagenumberrecommendedThe product image URL
pricenumberrecommendedThe product price
currencytextrecommendedThe product currency (ISO 4217)
locationtextrecommendedThe product URL
brandtextnoThe product brand
categorytextnoMust match the category hierarchy for this product as defined in the Product Feed E.g. Menswear > Shoes > Brogue

3. Integrate Product Feed

With the Bambuser Chat, experts can recommend products to website visitors during a chat to drive sales. These product recommendations are sent as Product Cards, which a store team member can send to a shopper during a chat.

How to integrate your Product Feed with the Bambuser Chat

For this to work, the Bambuser Chat needs access to a Product Feed in CSV format.

To share your Product Feed with Bambuser Chat, you can share a publicly accessible URL or an SFTP for Bambuser Chat to fetch it from - or we can provide an SFTP for you to put it in.

required

Please ensure each product entry contains:

  • Product SKU Code
  • Product Title
  • Product Image(s) URL
  • Product URL
  • Price
  • Description
  • Currency
  • Category
  • Stock Quantity
optional

We also recommend you include other fields that contain terms your associates may use to describe or search for a product such as:

  • Sale Price
  • Size Variant
  • Color Variant
  • Additional image URLs
  • Style Code or Master SKU (i.e. to group SKUs)
  • Brand Name
  • Barcode Number

Bambuser Chat indexes the Product Feed at least once per day so that the products available for associates to share in chats with shoppers are representative of the latest online product catalogue. Bambuser Chat can refresh the product feed more frequently if necessary.

Stock Changes

We recommend ensuring all products remain in a product feed, whether they are in stock or out of stock. Simply declare the stock quantity as 0 when out of stock, and we'll do the rest.

This ensures Bambuser Chat still has access to all products in your inventory, and experts can recommend these products.

Creating Your Product Feed

To ensure a seamless handover and quick setup, we recommend sending Bambuser Chat your Product Feed in an easy-to-handle format.

Below we've assembled an example table of property names that you can use when setting up your Product Feed to send to Bambuser Chat. If using these names is not possible, the Bambuser Chat team can map your feed as part of the launch process.

PropertyTypeRequiredDescriptionExample
sku_codestringyesThe unique identifier for a specific product.314-7216-102
group_skustringnoThe identifier for a group of products: each variation i.e. size / colour or fabric will have a unique identifier it's sku_code. The group_sku is used to ensure product variations appear under the same product in the app.314-7216
titlestringyesA product’s title.Relaxed Fit T-shirt
descriptionstringyesDescription of the product with all markdown or HTML removed.Our classic 100% cotton relaxed fit shirt
currencystringyesThe ISO-4217 currency code for this product. This will generally be the same for all products in a feed.USD
normal_pricenumberyesHow much the product usually costs.99.99
sale_pricenumbernoIf the product is on sale, how much it costs while on sale.79.99
stock_quantitynumberyesHow many units of this product are currently in stock. You can supply a 1 / 0 for in and out of stock, respectively.34
urlURLyesA link to the product’s product detail page.https://example.c/products/01234ADefGH
categoriesstringyesThe category breadcrumb trail for this product, as a delimited string.Ladies fashion > Jeans & Trouser > Skinny jeans
image_urlURLyesA link to the main image for this product.https://example.c/products/01234ADefGH/images/01.jpg
alternate_imageURLnoOne or more links to images for this product.
CSV
If you have multiple additional images use columns with an incremented number e.g. alternate_image_1 alternate_image_2
XML
Wrap each URL in the same tag e.g. <alternate_image>URL_1</alternate_image><alternate_image>URL_N</alternate_image>
https://example.c/products/01234ADefGH/images/02.jpg
genderstringnoIf you have gender specific products, you can supply a value for gender.unisex
sizestringnoInclude for products that have size variations.XX-Small
colorstringnoInclude for products that have colour variations.Navy
fitstringnoInclude for products that have fit variations.Relaxed
fabricstringnoInclude for products that have fabric information.98% Cotton, 2% Elastane
barcodestringnoInclude if you need to show barcode information.0100234567890
collarstringnoInclude for products that have collar variations.Point
featurestringnoInclude for products that have feature information.Hidden Pocket

Representing discounted/sale prices

If a product is currently on sale, we can display it in the Bambuser Chat for Product Experts (not to shoppers) with "strikethrough" pricing. If you provide a sales_price value for a product, we will display the normal_price crossed-out, and the sale_price in its place.

For example:

"normal_price": 449.00,
"sale_price": 369.00,
"currency": "USD",

Upload the Product Feed in VS Dashboard

The Product Feed ingestion tool can be accesed in the VS Dashboard under Settings tab.

Get notified of any issues with your Product Feed.

Bambuser Chat indexes the Product Feed at least once a day to ensure your product experts have access to your latest online offering. If there are any issues, which means indexing fails, your designated contacts will be notied by email.

Proactively resolve product feed issues.

The email will contain a CSV file containing clear details of what the errors are to make it quick and simple for you to resolve these. In this section, you'll find details about what each error means, and how you'll be able to resolve them.

Happy Product Feed, high performing product experts.

Being able to quickly resolve any issues helps keep your product feed up-to-date. That in turn helps you ensure your product experts have access to the latest information on pricing, availability and assortment to continue making recommendations and driving sales.

Troubleshooting

Chat FAQ

The Bambuser Chat plugin and Bambuser Chat mobile app are localized into the following languages:

  • English (US)
  • Chinese (simplified)
  • Chinese (traditional)
  • Danish
  • Dutch
  • Finnish
  • French
  • German
  • Italian
  • Japanese
  • Korean
  • Norwegian
  • Polish
  • Portuguese
  • Spanish
  • Swedish

The language shown will depend on the languages selected in the shopper's browser settings for the Plugin or the product expert's mobile device for the App.

The Bambuser Chat JavaScript is designed to offer maximum functionality with minimum impact on your overall site performance.


The Chat JavaScript loads asynchronously for optimal performance, ensuring all priority website content is loaded before the Chat JavaScript starts to load. It also loads only the parts that are needed depending on the user interaction. The following details what is loaded in each scenario.

The Loader is a JavaScript file which handles the loading of theChat launcher button and messenger. It's as small as possible whilst still allowing us to understand display rules, determine sales attribution and understand the shopper journey to inform the product expert. On a page where Chat won't show to a shopper, such as a checkout page, this is all that loads.


Total load: 27 KB


On pages where the customer can interact with the Chat, there are three exclusive scenarios which determine the plugin size: The Launcher and Launcher Bubble loads but the user does not interact with the plugin.


Total load: 275 KB


The Launcher is interacted with to open the Messenger.


Total load: 340 KB


The Launcher is interacted with to open the Messenger and the customer starts a conversation.


Total load: 445 KB


There are a number of other minor asynchronous loads beyond this, but these are used by a minimum number of users for specific functions around map and country selector functionality. These are kept to a minimum.


We are continually committed to reducing the file size where possible.