APIs & Integrations

ssj
Participant

How to get abandoned cart details

SOLVE

Hi,

 

I'm new to hubspot. I want to show abandoned cart details in my website to hubspot.

My website framework is Laravel and i'm using HubSpot PHP API client to integrate hubspot with my laravel website.

Things I have done so far:

* Installed hubspot in laravel project using ' composer require "hubspot/hubspot-php" ' * Created a test account in Hubspot account.

* Created hubspot api and integrated that in laravel project

* Created contacts  in hubspot at the time of registration using API

* Created products in hubspot at the time of creation of new products

* Created an ecommerce store using

$store = array(

          "id" => "My-website-store",

           "label" => "My Website Store",

            "adminUri" => "mywebsite.com"

             );

$hubspot->ecommerceBridge()->createOrUpdateStore($store);

This creates an ecommerce store "My Website Store" in hubspot account.

* I tried to map hubspot properties and my website properties.

$settings =
array(
"enabled"=> true,
"webhookUri"=> "https://demo72.chilscott.co.uk/jan2020/simplymedsonline/",
"mappings"=>
array(
"CONTACT" => array(
"properties"=> array(
/* PROPERTIES */
)
),
"DEAL" => array(
"properties"=> array(
/* PROPERTIES */
)
),
"PRODUCT" => array(
"properties"=> array(
/* PROPERTIES */
)
),
"LINE_ITEM" => array(
"properties"=> array(
/* PROPERTIES */
)
),
),
);
$ecommerce = $hubspot->ecommerceBridge()->upsertSettings($settings);

 

Is this the right way to do mapping?

How should I map my website product details and orders with the store in hubspot? How should I get abandoned cart details in hubspot?

How should I get order details in hubspot?

 

Please help me 

0 Upvotes
1 Accepted solution
Willson
Solution
HubSpot Employee
HubSpot Employee

How to get abandoned cart details

SOLVE

Hi @ssj 

 

This will depend on the configuration of your ecomm store, something that is not generated by us but by your store itself. 

 

As an example, let's take a look at Shopify. When an abandoned cart is detected, the URL is that of the store and then includes a specific parameter to this cart. 

 

To get a full idea of the process, we have a customer that lands on the store:

1. Customer clicks buy on an item.

2. They step through the purchase process

3. As this happens, a Contact and associated Deal record are created.

4. At the last stage for payment, if the customer stops here, the cart is abandoned.

5. At this point, Shopify will auto generate this URL which is then mapped across to HubSpot. 

 

This URL takes the form of: 

https://nam-hubspot.myshopify.com/PRODUCT_ID/checkouts/CHECKOUT_ID/recover?key=xxxx

But it's important to note that this is generated by Shopify and so you're ecomm store will need to have these generated too. 


I hope this helps!

Product Manager @ HubSpot

View solution in original post

3 Replies 3
Willson
HubSpot Employee
HubSpot Employee

How to get abandoned cart details

SOLVE

Hi @ssj 

 

I am unsure as to whether or not you have seen this resource, but if you head over to our Ecommerce Bridge Overview page, you'll see a full step list of instructions on installing and using the Ecomm Bridge. 

 

Within this doc, you'll find how to configure your mappings per object, setup specific ecommerce properties such as abandoned_cart URLs to then manage this within your HubSpot Portal and more. 

 

I hope this helps!

Product Manager @ HubSpot
0 Upvotes
ssj
Participant

How to get abandoned cart details

SOLVE

Hi Wilson,

 

Thank you for the quick response. I refer the documentation and i found abandoned cart url.


"URL to recover the customer's cart for an order that has been abandoned. This will be used in ecommerce emails"

 

What should be the parameter for abanoned cart url? 

0 Upvotes
Willson
Solution
HubSpot Employee
HubSpot Employee

How to get abandoned cart details

SOLVE

Hi @ssj 

 

This will depend on the configuration of your ecomm store, something that is not generated by us but by your store itself. 

 

As an example, let's take a look at Shopify. When an abandoned cart is detected, the URL is that of the store and then includes a specific parameter to this cart. 

 

To get a full idea of the process, we have a customer that lands on the store:

1. Customer clicks buy on an item.

2. They step through the purchase process

3. As this happens, a Contact and associated Deal record are created.

4. At the last stage for payment, if the customer stops here, the cart is abandoned.

5. At this point, Shopify will auto generate this URL which is then mapped across to HubSpot. 

 

This URL takes the form of: 

https://nam-hubspot.myshopify.com/PRODUCT_ID/checkouts/CHECKOUT_ID/recover?key=xxxx

But it's important to note that this is generated by Shopify and so you're ecomm store will need to have these generated too. 


I hope this helps!

Product Manager @ HubSpot