Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

IHubSpotService - override implementation (EPiServer.MarketingAutomation.HubSpotService)


Episerver.Marketing.Connector.HubSpot, Version=

namespace EPiServer.MarketingAutomation.HubSpotService.Contracts.Interfaces

public interface IHubSpotService

namespace EPiServer.MarketingAutomation.HubSpotService

Hubspot has changed their API and now requires a header that describes the ContentType. See link here:

Anyone using episervers hubspot connector is likely going to be facing issues with forms not being able to correctly submit data to hubspot.

I have contacted epi support because their current implementation will be affected by this. But in the meantime I have been investigating if i can use the IOC to override the IHubSpotService and implement my own code. Unfortunately I haven't been that successful.  

I've tried multiple things (ConfigureContainer(ServiceConfigurationContext context)) / context.Services.AddTransient / context.StructureMap().Configure but nothing seems to work for this class. I'm able to override other interfaces with my own implementations but this one has me stuck.

Basically episervers method (CallHubSpot()) needs to have the extra header added...

headers.Add("User-Agent", "Episerver Hubspot Provider");
headers.Add("Content-Type", "application/json");  <-- missing

Has anyone had any success in implementing their own version of this Interface?

On a side note - using episerver forms and hubspot, I'm curious what other implementations are out there. Are people just not using episervers connector and using their own code to talk directly to the hubspot API ? 


Sep 17, 2020 4:26
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.