BayReviews offers built-in integration with major eCommerce platforms. If your eCommerce store platform is not listed, you can still integrate it via Custom API.
This guide is for custom-built or other e-commerce platforms, except:
Limelite CRM aka sticky.io
Get started with BayReviews: A Detailed Step-by-Step Guide
STEP 1: Open your web browser and navigate to the BayReviews dashboard by clicking on the URL https://app.targetbay.com/.
STEP 2: Once you're on the BayReviews dashboard login page, enter your login credentials (username and password) in the provided fields. If you're a new user without an account, you can create one by clicking on the "SIGN UP HERE" button in the page's top right corner. Follow the prompts to register for a new account.
Step 3: Connecting Your Store:
Store Details: Enter your email ID, store URL (web address), and store name(optional).
Select Platform: Select "Others" as the e-commerce platform if your platform is not listed under "Select Your Ecommerce Platform".
Connect to BayReviews: Click the button that says "Connect Your Store" or something similar to establish the connection between your store and BayReviews service.
Step 4: You'll be directed to a setup page where you'll need to provide additional information, including:
Basic Email Settings: Configure email-sending options.
Review Settings: Define how reviews are collected and displayed.
Look & Feel Settings: Customize the appearance of review widgets on your store.
Note💡: Once you complete the setup, you should receive your login credentials information through a popup and email to the registered account.
To Do:
After successfully installing the BayReviews app on your store, follow the below sections to set up your account:
Section 1 guides to place the integration script on your store page.
Section 2 allows to add the placeholder scripts at appropriate points to display the review widgets on your website.
Section 3 to import existing products and order details into your account.
Section 4 for API Endpoint scripts for Single/Bulk order placed, Single/Bulk order status update, Product add, Product update, and Product delete.
Section 5 explains the payload end results in BayReview UI.
Section 1: Custom Platform Integration with BayReviews Account
Note💡: Public key is required to display reviews;
Public Key can be found in the following location in the app: Settings -> Tools-> API Keys. Or |
1.1 Steps to find the API settings in your BayReviews account:
1. Log into BayReviews app by entering the correct credentials. (https://app.targetbay.com/)
2. Once you're on the BayReviews dashboard, Click on the "Settings" icon located in the top right corner of the screen.
3. In the "Settings" menu, navigate to the “Tools” sections. Click on "API Keys.”
4. Under the "Data API" section, you can find the Public Key for your API authentication.
1.2 Script for displaying reviews on your website:
For integrating the BayReviews account with the custom platform for displaying reviews, the below script has to be placed on the store page.
Note💡:
3. The following variables should be filled in dynamically on the website:
|
<script type="text/javascript">
(function() { window.tbConfig = {
platform: 'cp',
apiStatus: 'app',
apiVersion: 'v1',
apiUrl: 'https://app.targetbay.com/api/v1/webhooks/',
domain:'https://domain.com',
trackingType: '1',
productName: '',
productId: '',
productImageUrl: '',
productUrl: '',
userId: '',
userMail: '',
userName: 'anonymous',
userAvatar: '',
pageUrl: 'page-visit',
pageData: '',
orderId: '',
tbTrack: true,
tbInstagram: false,
tbRecommendations: false,
tbReview:
{
tbSiteReview: true,
tbProductReview: true,
tbBulkReview: true,
tbQa: true,
tbReviewBadge: false,
tbReviewPopup: false,
}
};
var sNew = document.scripts[0], gNew;gNew = document.createElement('script');gNew.src = 'https://' + tbConfig.apiStatus + '.targetbay.com/js/tb-track.js';gNew.type = 'text/javascript';gNew.async = true;sNew.parentNode.insertBefore(gNew, sNew);
})();
</script>
Here is a detailed explanation of the fields used in the above script:
platform: 'cp', "Used by BayReviews as identification for the platform."
apiStatus: 'app', - "Used to indicate the server type (production/staging)."
apiVersion: 'v1', - "Used to indi"cate Targetbay API version."
apiUrl: 'https://app.targetbay.com/api/v1/webhooks/', - "Webhooks url for data."
domain:'https://domain.com', - "To verify the store domain URL"
trackingType: '1', - "Used for event and UTM tracking. (default value as '1')."
productName: - "For using in BayReview widget API."
productId: - "This allows fetching the reviews for the particular product ID (accepts integer)."
productImageUrl: - "For using in BayReview widget API."
productUrl: - "For using in BayReview widget API"
userId: - "Gets authenticated user id when user visits. Accepts integer value or empty."
userMail: - "Gets User email id"
userName: 'anonymous' - "Gets user name if provided during visits (default as anonymous)."
userAvatar: - "Required for our product recommendation"
pageUrl: 'page-visit - "Used for event and UTM tracking. (default as 'page-visit')"
pageData: '', - "Used for event and UTM tracking."
orderId: '', - "Gets the order id in the success page. Accepts integer"
tbTrack: false, - "Used for tracking purpose in our legacy system"
tbInstagram: false,- "For Instagram feature enable if true"
tbRecommendations: false, - "For enabling product recommendation feature"
tbReview:
{tbSiteReview: true,
tbProductReview: true,
tbBulkReview: true,
tbQa: true,
tbReviewBadge: false,
tbReviewPopup: false,
}
};
- "For enabling individual features flag for BayReviews widget"
var sNew = document.scripts[0], gNew;gNew = document.createElement('script');gNew.src = 'https://' + tbConfig.apiStatus + '.targetbay.com/js/tb-track.js';gNew.type = 'text/javascript';gNew.async = true;sNew.parentNode.insertBefore(gNew, sNew);})();
</script>
Section 2: Display reviews at high conversion points on your website:
Integrate a BayReviews account with your custom platform to display reviews on your eCommerce stores.
2.1 Adding BayReviews Widget to your store
1. Adding Product Review Widget:
<div id="targetbay_reviews"></div>
This placeholder has to be placed on the product detail pages usually under the product description or above the footer sections
2. Adding Site Review Widget:
<div id="targetbay_site_reviews"></div>
This placeholder has to be placed on all pages to display the floating widget as a sidebar.
3. Product Review Statistics:
<div class="product-name"></div>
This placeholder has to be placed on the product page below the product name.
4. Bulk Reviews (Review collection):
<div class="targetbay_star_container" id="xxxxx"></div>
(The ‘id’ has to be placed dynamically for the products)
This placeholder must be placed on the collection page below the product name.
Section 3: Import existing data through BayReviews via .CSV file
You can import existing products and orders from your eCommerce store via a .csv file while integrating with the BayReviews app.
3.1 Import Order
1. Log into the BayReviews app by entering the correct credentials. (https://app.targetbay.com/)
2. On the BayReviews dashboard, Click on the "Settings" icon located in the top right corner of the screen.
3. In the "Settings" menu, Navigate to the “Tools” sections. Click on "Import Orders" to import your orders.
4. Now browse for the .CSV file from your system and click on the option “Import.”
Note💡: Please find a sample CSV format available for download. The required fields for importing orders are order_id, customer_user_email, sku_1.
3.2 Import Product
1. Log into BayReviews app by entering the correct credentials. (https://app.targetbay.com/)
2. On the BayReviews dashboard, Click on the "Settings" icon located in the top right corner of the screen.
3. In the "Settings" menu, Navigate to the “Tools” sections. Click on "Import Products" to import your products.
4. Now browse for the .CSV file from your system and click on the option “Import”.
Note💡: Please find a sample CSV format available for download. The required fields for product imports are product_id, product_name, product_page_url.
Section 4: API Endpoints
4.1 For Orders
Syncs orders placed and order updates information from the store to BayReviews and triggers Review request emails to the customers. The API is limited to daily syncs of orders and not to historical orders.
a) Single order placed:
Creates order information once the order has been placed in the store. Orders with an "order_status" of "complete" and "send_review_request_email" as "now" will trigger the Review Request email immediately. Orders with an "order_status" of "orderopen" will prevent the initiation of the Review Request email or remove users who are already in the workflow.
Note💡: Review Request Email feature should be enabled to trigger email through API.
Endpoint:https://app.targetbay.com/api/v1/customplatform/order-placed?_t= XXXXXXXXX
Note💡: Please note that XXXXX is your BayReviews public key |
Method: POST
Payload:
{
"order_id": 5015,
"user_mail": "xyz@gmail.com",
"user_name": "Smart",
"first_name": "John",
"last_name": "Test bv",
"order_price": "100",
"order_quantity": 1,
"order_status": "orderopen",
"send_review_request_email": "",
"cart_items": [
{
"type": "simple",
"product_id": 124,
"product_name": "FE Supp's",
"price": 1200,
"special price": 1150,
"productimg": "https://domain.com/img/page-order/bottle-bonus-books-lg.jpg",
"quantity": 2
}
]
}
Validation:
If the payload is successful, then return “Order placed successfully.”
If the request has an empty payload, then return “No data found.”
If no required fields are available, return “<field> is required.”
Example: user_mail is required.
Note💡:
Required fields:
user_mail, order_id, product_id |
The result will be seen on section 4.1.1 to verifying order sync within BayReviews
b) Bulk order placed
Utilize this API to synchronize multiple orders from your store with BayReviews. Each request supports syncing up to 100 orders. Orders with an "order_status" of "complete" and "send_review_request_email" as "now" will trigger the Review Request email immediately. Orders with an "order_status" of "orderopen" will prevent the initiation of the Review Request email or remove users who are already in the workflow. This API is solely for syncing new orders. To import historical orders, please use your BayReview account to upload as CSV file.
Note💡: Review Request Email feature should be enabled to trigger email through API.
Endpoint: https://app.targetbay.com/api/v1/customplatform/bulk/order-placed?_t=XXXXXXXXX
Note💡: Please note that XXXXX is your BayReviews public key |
Method: POST
Payload:
[
{
"order_id": 5014,
"user_mail": "abc@domain.com",
"user_name": "ABC Test",
"first_name": "ABC",
"last_name": "Test",
"order_price": "100",
"order_quantity": 1,
"order_status": "orderopen",
"send_review_request_email": "",
"cart_items": [
{
"type": "simple",
"product_id": 678,
"product_name": "TGB Test1",
"price": 1150,
"special price": 1100,
"productimg": "https://domain.com/img/page-order/bottle-bonus-books-lg.jpg",
"quantity": 2
}
]
},
{
"order_id": 5015,
"user_mail": "abc@domain.com",
"user_name": "ABC Test",
"first_name": "ABC",
"last_name": "Test",
"order_price": "100",
"order_quantity": 1,
"order_status": "orderopen",
"send_review_request_email": "",
"cart_items": [
{
"type": "simple",
"product_id": 123,
"product_name": "TGB Test2",
"price": 1200,
"special price": 1150,
"productimg": "https://domain.com/img/page-order/bottle-bonus-books-lg.jpg",
"quantity": 2
}
]
}
]
Note💡: To process multiple orders, use the single order placed payload separated by a comma within the array. Example: [ single order api 1, single order api 2,......]
Validation:
If the request has an empty payload, then return “No data found.”
If no required fields are available, return “<field> is required.”
If an order has more than 100 items, then it returns “Order limit exceeded; please ensure your batch contains a maximum of 100 orders.”
If the payload is successful, then return “Order placed successfully.”
Example: user_mail is required.
Note💡:
Required fields:
user_mail, order_id, product_id |
The result will be seen on section 4.1.1 to verifying order sync within BayReviews
c) If user placed an order with multiple product use the below cart items on the payload
Payload:
"cart_items": [
{
"type": "simple",
"product_id": 678,
"product_name": "TGB Test1",
"price": 1150,
"special price": 1100,
"productimg": "https://domain.com/img/page-order/bottle-bonus-books-lg.jpg",
"quantity": 2
},
{
"type": "simple",
"product_id": 123,
"product_name": "TGB Test2",
"price": 1200,
"special price": 1150,
"productimg": "https://domain.com/img/page-order/bottle-bonus-books-lg.jpg",
"quantity": 4
}
]
Validation:
If the payload is successful, then return “Order placed successfully.”
If the request has an empty payload, then return “No data found.”
If no required fields are available, then returns “<field> is required.”
Example: user_mail is required.
Note💡:
Required fields:
user_mail, order_id, product_id |
The result will be seen on section 4.1.1 to verifying order sync within BayReviews
d) Single order status update:
Endpoint: https://app.targetbay.com/api/v1/customplatform/order-status-update?_t=XXXXX
Note💡: Please note that XXXXX is your BayReviews public key |
Method: POST
Payload:
{
"order_id": "201",
"order_status": "complete"
}
Validation:
If the order has an empty value, then it returns “ No data found.”
If no required fields are available, return “<field> is required."
If order_status contains a random string other than the specified order statuses, then return "Invalid order status."
If the payload is successful, then return “Order status updated.”
Example: order_status field is required.
Note💡: Order status could be like orderopen and complete.
Required fields:
order_id, order_status |
The result will be seen in section 4.1.1, Verifying order sync within BayReviews.
e) Bulk order status update:
Endpoint:
Note💡: Please note that XXXXX is your BayReviews public key |
Method: POST
Payload:
[
{
"order_id": 5014,
"order_status": "complete"
},
{
"order_id": 5015,
"order_status": "complete"
}
]
Validation:
If the order has an empty value, then returns “ No data found”.
If no required fields are available, then returns “<field> is required”.
If an order has more than 100 items, then it returns “Order limit exceeded; please ensure your batch contains a maximum of 100 orders.”
If order_status contains a random string other than the specified order statuses, then return "Invalid order status."
If the payload is successful, then return “Order status updated.”
Example: order_status field is required.
Note💡: Order status could be like orderopen and complete.
Required fields:
order_id, order_status |
The result will be seen on section 4.1.1 to verify order sync within BayReviews.
4.1.1 Verifying order sync within BayReviews
To verify if orders have been added to the BayReviews account, follow these instructions:
Step 1: On the BayReviews dashboard, move your cursor over the ‘three dots icon’ on the menu bar and select ‘Audience’ from the drop-down.
Step 2: Under "Customer Tools," click the "Segments" option.
Step 3: Choose “Create Segment” on the right-side corner.
Step 4: Under Choose Event options, select "Order placed" as your search condition from the event. Choose the logical condition and assign a search value under “Value.”
Step 5: Customize your report by selecting the date range using the “Select Date Range” option and click “Search” to view results.
For example,
To search for orders within the last three days:
Choose "Order placed" from the Event dropdown menu.
From the "Select Date Range" options, select "Within x number of days."
Enter "3" in the "Start days" box.
Click "Search".
To search for orders within the last 2 months:
Choose "Order placed" from the Event dropdown menu.
From the "Select Date Range" options, select "Custom date range."
Click "Last 2 months" from the "Select Date Range" drop-down options.
Click "Search".
Step 6: Upon viewing the results, click on the username or action information provided. This action will redirect you to a new tab displaying the customer profile audience page.
Step 7: Within the customer profile audience page, navigate to the "Latest activities" section. Click on the activity labeled "placed an order" to verify the information related to the order placement.
Following these steps should allow you to effectively verify if orders have been synced to your BayReviews account.
4.2 For Product
a) Product Add:
Endpoint:https://app.targetbay.com/api/v1/customplatform/add-product?_t=XXXXXXXXX
Note💡: Please note that XXXXX is your BayReviews public key |
Payload:
{
"product_id": "903",
"sku": "2345sqwr",
"name": "test products",
"url_key" : "test-products",
"product_status": 1,
"category" : ["499", "667"],
"price": "100",
"full_url_key": "https://example.com/products/test-products",
"image_url" : [{
"url" : "https://example.com/3b4tre6op78mnnz2.jpg"
}]
}
Note💡:
Required fields:
Product_id, name, full_url_key |
Verify your product addition by viewing the results in section 4.2.1 of BayReviews.
b) Product update:
Endpoint: https://app.targetbay.com/api/v1/customplatform/update-product?_t=XXXXXXX
Note💡: Please note that XXXXX is your BayReviews public key |
Payload:
{
"product_id": "903",
"sku": "2345sqwr",
"name": "test products",
"url_key" : "https://example.com/products/test-products",
"product_status": 1,
"category" : ["499", "667"],
"price": "102",
"full_url_key": "test-products",
"special_price": "89",
"image_url" : [{
"url" : "https://example.com/3b4tre6op78mnnz2.jpg"
}]
}
Note💡:
Required fields:
Product_id, name, full_url_key |
Verify your product addition by viewing the results in section 4.2.1 of BayReviews.
c) Product Delete:
Endpoint: https://app.targetbay.com/api/v1/customplatform/delete-product?_t=XXXXXXXXX
Note💡: Please note that XXXXX is your BayReviews public key |
Payload:
{
"product_id": 903
}
Note💡:
Required fields:
Product_id |
API should be called whenever certain actions are to be performed
Verify your product addition by viewing the results in section 4.2.1 of BayReviews.
4.2.1 Verify product addition with BayReviews:
After successfully executing the API Endpoints(product), you can verify whether your product has been added to the BayReviews account by following these instructions:
Step 1: Navigate to the settings section by clicking the settings icon.
Step 2: Under "Store Management," click the "Product" option. Here, you should be able to view a list of products that have been added to your BayReviews application.