HubSpot Setup Guide
HubSpot Custom Properties Setup
To ensure the abandoned cart sync functionality works correctly, you need to configure the following custom properties in your HubSpot account:
Required Deal Properties
- cart_hash
- Property Name:
cart_hash - Property Type: Single-line text
- Description: Unique identifier for abandoned cart tracking
- Used to link abandoned carts to converted orders
- Property Name:
- order_source
- Property Name:
order_source - Property Type: Single-line text
- Description: Source of the order (abandoned_cart, converted_from_abandoned_cart, etc.)
- Property Name:
Optional Deal Properties
These properties are used if available but won’t cause errors if missing:
- tax_amount
- Property Name:
tax_amount - Property Type: Number
- Description: Tax amount for the order
- Property Name:
- discount_amount
- Property Name:
discount_amount - Property Type: Number
- Description: Discount amount applied
- Property Name:
- coupon_codes
- Property Name:
coupon_codes - Property Type: Single-line text
- Description: Coupon codes applied to the order
- Property Name:
- products
- Property Name:
products - Property Type: Multi-line text (NOT single-line text)
- Description: List of products in the cart/order
- Important: Must be multi-line text to handle longer product lists
- Property Name:
Contact Properties
Standard HubSpot contact properties are used:
- email, firstname, lastname, phone, company
- address, city, state, zip, country
How to Create Properties
- Go to Settings > Properties in your HubSpot account
- Select “Deal properties”
- Click “Create property”
- Enter the property name and details above
- Save the property
Current Status
The plugin currently bypasses cart hash property searches to avoid 400 errors. Once you create the cart_hash property in HubSpot, you can:
- Uncomment the search lines in
class-sync-manager.php - Remove the temporary TODO comments
- Enable full abandoned cart deduplication
This will prevent duplicate deals from being created for the same abandoned cart.