Deals and revenue attribution

I have been slowly working on the ecommerce bridge and deal objects in Hubspot. Currently I have all orders from our site coming through successfully as a deal in Hubspot.

The amount, contact and line items all appear fine. I have been sending along the deal with the deal stage property as ‘checkout_completed’.

Now I am working on how to use these ‘deal’ objects. I believe the whole point is to run reports on this information. When I click on a deal to view it’s detail page, I see in the sidebar an option for ‘revenue attribution’. When clicking, I always get the message:

Not enough data to use attribution reports

When I click on the help link it mentions I need 3 things.

1. The deal should be in the ‘closed-won’ stage

2. The deal should be related to a contact

3. The deal’s amount, create date and close date properties should have values

For #'s 2 and 3 I believe I have the needed info. For 1 I have created a ‘closed-won’ stage and changed any of the ‘checkout-completed’ deals to the closed-won stage.

My first question: Is it possible to use the api to set the deal stage to ‘closed-won’? It does not seem to work if I use ‘closed-won’ or the id value of the created closed-won property, when sending the data (all other stages work).

My second question comes from following the steps on the article for:

[

Create a custom multi-touch revenue attribution report

](Create attribution reports)

I get the following:

  • You must have closed won deals.
  • Deals must have amount value, a create date, and a close date.
  • Deals must have associated contact(s) with some interactions.

I should have closed won deals - check

I should have amout value, create and close date - check

I should have contacts associated with each deal - check, but, what is meant by ‘with some interactions’ ? - I imagine that is what I a missing.

@Bryantworks , are both of these questions in your wheelhouse?

Hey @rygap_hs, for the first question:

- I think you can set the stage via API by declaring the stage when you import the deal, I think this can be done by name or the ID of that particular stage.

As for the second question, interactions me things like emails going back and forth, page views from the contact, form submissions, meetings, and calls.

Hope this helps!

Hi Chris,

Thank you for the reply.

For the first part, dealing with sending the stage of the deal through the api - I cannot seem to get it to go through with either the name or id of the deal stage. It does work with all predefined deal stages though such as ‘checkout_completed’. I’ll skip this one for now though, since I can manually change the deal stage through the hubspot dashboard. I can comeback to figure this part out later.

For the second part, I think I was on the right track. So, we definitely have emails going out, and we include CTAs in each email we send out. We also have the hubspot tracking code on our site. When viewing a sent email in the hubspot dashboard we can see the click rates, open rates etc, but nothing under ‘Revenue Attribution’. Emails are indeed resulting in purchases as I can see orders come through after sending out emails. I first figured, well, I need to import deals into hubspot on the order complete page on our site and then maybe tie a promo code or something to the deal to tell hubspot that the deal is tied to the email. It sounds like I should put something on the order complete page like this?:

_hsq.push([“trackEvent”, {
id: “order_complete”,
value: 20.5
}]);

I am not sure what to put though that would tie the order to being from the email. Any ideas?

The overall goal here, is to see what revenue our hubspot emails are generating.

Ok, so after trying a bunch of things here was the problem:

According to the docs I needed to create a Closed Won stage. I swear I had seen somewhere to use Closed-Won or closed-won. I changed the name of the deal stage to ‘Closed Won’ and voila it works.

I can’t however pass the ‘Closed Won’ deal stage through the api - either with the name of the deal stage or the id it is given.