I have a business where we have affiliates who refer contacts to us. In our CRM (Hubspot) we then create (sometimes multiple) deals which are associated to each contact.
I am trying to create a portal for our affiliates to view a list of all their referred contacts with some associated details like, Contact Details and Deals.
So to explain the structure:
- An affiliate is a User who will login to the portal
- An affiliate refers us a contact
- A contact may have multiple deals attached to it
I want to display the referred contacts, with their associated deals in a table.
The information flow happens like this:
- A contact gets created in Hubspot (our CRM). The contact has a property Referrer. The Referrer property tells us which Affiliate the contact came from.
- A contact has one (or a few) Deals created for it.
- When a Deal status changes (from Open to Accepted, for example), I want to update the status of that Deal in the appropriate Affiliate’s portal.
- I have a trigger setup in Hubspot on Deal Status Change to post a webhook with the Deal’s information to Integromat. Integromat then creates a new Contact
My question is regarding how to link the three Data Types: Affiliates, Contacts, Deals. I want to be able to look up an affiliate, find a contact (if it doesn’t exist, create it) they have referred, find the associated deal (which has had a status update in Hubspot), and update the deal_status Field within Hubspot. I am just not sure how to link the three.
This example should illustrate my problem. Please see the Integromat screenshot:
- I am catching the webhook response for when a new deal is created in Hubspot.
- I am creating a new Deal in Bubble.
- I set the fields using the Hubspot properties.
- Now I don’t know how to set the field referral of type Contact so that it links this deal to a previously created Contact.
Should I be trying to do it in Integromat, or using Workflows in Bubble?
Attached images are for reference on the three different data types and how I have linked them.