HubSpot
HubSpot is a powerful CRM system that offers great capabilities for managing your sales process. HubSpot and MRPeasy can work seamlessly together via Zapier so that sales are handled in HubSpot and production, inventory, purchasing management, and order fulfillment are handled in MRPeasy.
How do you import deals from HubSpot to MRPeasy?
1. Set up the trigger
- Choose the HubSpot app and select the event Updated Deal Stage.
- Select your HubSpot account.
- Select the pipeline and stage.
2. Load customer details
2.1. First, it is necessary to get the ID of the client's company.
- Choose the app HubSpot and select the action Find Associations.
- Select your HubSpot account.
- Enter the ID of the object you want to search: Deal ID.
- Select the type of the object: Deal.
- Select the number of associations: One.
- Select the object being associated: Company.
2.2. Next, get company details.
- Choose the app HubSpot and select the action Find Company.
- Select your HubSpot account.
- Enter the first search property name Company information: Record ID (hs_object_id).
- Enter the first search property value Deal to Company.
3. Get the list of products
3.1. First, getting the IDs of the products is necessary.
- Choose the app HubSpot and select the action Find Associations.
- Select your HubSpot account.
- Enter the ID of the object you want to search: Deal ID.
- Select the type of the object: Deal.
- Select the number of associations: One.
- Select the object being associated: Line Item.
3.2. Next, prepare IDs of products to request product details.
- Choose the app Code by Zapier and select the action Run Javascript.
- Enter the input data line_items: Deal To Line Item.
- Ask for code from MRPeasy Support by opening a support ticket.
3.3. Load product details.
- Choose the app HubSpot and select the action Find Line_item in HubSpot.
- Select your HubSpot account.
- Enter the first search property name Record ID (hs_object_id).
- Enter the first search property value Hs Line Id.
3.4. Temporarily save details of all products.
- Choose the app Code by Zapier and select the action Run Javascript.
- Enter the input data
sku: Line item information: SKU
quantity: Price: Quantity
price: Price: Net price
deal_id: Deal ID
line_item_ids: Deal to Line Item - Ask for code from MRPeasy Support by opening a support ticket.
- In Code, enter a unique STORE_KEY. Please copy a unique UUID version 4 from https://www.uuidgenerator.net/version4.
3.5. Pass products to the next stage.
- Choose the app Filter by Zapier.
- Configure the following condition: Only continue if ID exists.
4. Create a customer order
- Choose the app MRPeasy and select the action Create Customer Order.
- Select your MRPeasy account.
- Enter the input data:
Reference: Deal information: Deal Name
Customer Name: if you want to import customer details, use Company information: Name. If you want to import orders anonymously, please enter any text (e.g. HubSpot customer).
Shipping - Company: Company information: Name
Shipping - Street Line 1: Company information: Street Address
Shipping - Street Line 2: Company information: Street Address 2
Shipping - City: Company information: City
Shipping - State: Company information: State/Region
Shipping - Postal Code: Company information: Postal Code
Shipping - Country Code: Company information: Country/Region
Shipping - Phone: Company information: Phone Number
Lines - SKU: Lines Sku
Lines - Quantity: Lines Quantity
Lines - Total Price: Lines Price
When testing the Zap in the Zapier test environment, please note:
- If the HubSpot test deal has multiple lines, the first line of the deal will be repeated in MRPeasy test CO as often as there are products in the deal. This is OK. This is a feature of the Zapier test environment.
- Please enable this ZAP and create a new deal in Hubspot to test the live environment. You should then receive a correct customer order in MRPeasy.
- It may take up to 15 minutes before MRPeasy receives the deal from HubSpot and Zapier.
Update a customer order
Set up another ZAP using the "Update Customer Order" action instead of "Create Customer Order." In both ZAPs, be sure to pass the same order number in the "Customer Order Number" field (not "Reference") to update the correct order.