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

Try our conversational search powered by Generative AI!

Provider class

Version InfoThis topic applies to Episerver.ConnectForMarketingAutomation 4.0.0 and lower. For later versions, see Sample Connector - IMarketingConnector

 This class is the main interface that the Marketing Automation Interface (MAI) plugin uses to load the connector. During the intitialize process of MAI the Service locator is used to load the connector.

Note: Only one connector can exist in the solution or be installed with the MAI framework.

  • Inheritance hierarchy.
    System.Object
      EPiServer.MarketingAutomationIntegration.Core.ProviderBase
        DemoConnector.Services.Provider
    
  • Namespace. DemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public class Provider : ProviderBase

Constructor 

Initializes a new instance of the Provider class.

  • NamespaceDemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public Provider()

Properties 

Provider.Name property 

The name of the connector.

  • NamespaceDemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public override string Name { get; }
  • Property value. TypeString
  • Implements. IProvider.Name

Provider.Settings property 

The settings for the connector.

  • NamespaceDemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public override IProviderSettings Settings { get; }
  • Property value. TypeIProviderSettings
  • Implements. IProvider.Settings
  • Remarks. Use an IDynamicData implementation to store configuration data required for the connector. This connector has no configuration data.

Methods 

Provider.GetDashboardUrl method 

You can attach an external URL, the URL of the configuration page, or another URL of a page of your choosing to the main connector button at the top of the configuration screen. 

  • NamespaceDemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public override string GetDashboardUrl()
  • Return value. TypeString
    A URL.
  • Implements. IProvider.GetDashboardUrl()
  • Remarks. This code demonstates how to re-direct the UI to the location of the configuration page for the connector.

Provider.Init method 

This method is called by the MAI framework at startup, which you can use to add services to the default EPiServer IoC container.

  • NamespaceDemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public override void Init(
      ServiceConfigurationContext serviceConfigurationContext
    )
  • Parameters.
    • serviceConfigurationContext. Type: EPiServer.ServiceLocation.ServiceConfigurationContext
      The service context
  • Implements. IProvider.Init(ServiceConfigurationContext)

Provider.IsReady method 

Called periodically by the MAI framework to verify that the connector is ready to use.

  • NamespaceDemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public override bool IsReady()
  • Return value. TypeBoolean
    Result stating whether the framework is ready for use.
  • Implements. IProvider.IsReady()

Provider.ProcessXFormData method (Object, XFormDataEventArgs) 

This function receives the connector data that is collected from the user. Read it in as XML and process it. This loops over the XML tags and parses out data for each one for processing. This code is executed when you click Submit on a form.

Implement this method to handle XFormData posting, from both MVC or WebForm app. You can use this as a main point to bring XForm data to the marketing automation service.

(Inherited from ProviderBase.)

  • NamespaceDemoConnector.Services
  • Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
  • C# syntax.
    public virtual void ProcessXFormData(
      Object sender,
      XFormDataEventArgs e
    )
  • Parameters.
    • sender. TypeSystem. Object
      Object
    • e. Type: XFormDataEventArgs
      Form data is passed in through this. You can retrieve the data as innerHtml or Xml. You also can loop through the nodes to get the user data.

Last updated: Dec 10, 2015