Show / Hide Table of Contents

Interface IAudienceAgent

Interface for the Audience Agent Services specific to the Audience client

Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.dll
Syntax
[Agent("Audience Agent", "Interface for the Audience Agent. Services specific to the Audience client")]
public interface IAudienceAgent : IAgent
Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

Methods

CreateDefaultAudienceLayoutEntity()

Loading default values into a new AudienceLayoutEntity. NetServer calculates default values (e.g. Country) on the entity, which is required when creating/storing a new instance

Declaration
AudienceLayoutEntity CreateDefaultAudienceLayoutEntity()
Returns
Type Description
AudienceLayoutEntity

New AudienceLayoutEntity with default values

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

DeleteAudienceLayoutEntity(Int32)

Deletes the AudienceLayoutEntity

Declaration
void DeleteAudienceLayoutEntity(int audienceLayoutEntityId)
Parameters
Type Name Description
Int32 audienceLayoutEntityId

The identity of the AudienceLayoutEntity

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

DeleteConfigParameter(String, String)

Deletes an Audience configuration parameter belonging to a Audience layout

Declaration
void DeleteConfigParameter(string layoutName, string parameterName)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

String parameterName

The name of the Audience configuration parameter

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetAudienceLayoutByName(String)

Gets an Audience layout by it's instance name

Declaration
AudienceLayoutEntity GetAudienceLayoutByName(string layoutName)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

Returns
Type Description
AudienceLayoutEntity

Audience layout entity

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetAudienceLayoutEntity(Int32)

Gets a AudienceLayoutEntity object.

Declaration
AudienceLayoutEntity GetAudienceLayoutEntity(int audienceLayoutEntityId)
Parameters
Type Name Description
Int32 audienceLayoutEntityId

The identifier of the AudienceLayoutEntity object

Returns
Type Description
AudienceLayoutEntity

AudienceLayoutEntity

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetAudienceLayoutOnPerson(Int32)

Gets the Audience layout belonging to the person specified.

Declaration
AudienceLayoutEntity GetAudienceLayoutOnPerson(int personId)
Parameters
Type Name Description
Int32 personId

The person id

Returns
Type Description
AudienceLayoutEntity

Audience layout entity

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetConfigParameter(String, String)

Gets an Audience configuration parameter belonging to a given Audience layout with the specified configuration parameter name

Declaration
AudienceConfigParameter GetConfigParameter(string layoutName, string parameterName)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

String parameterName

The name of the Audience configuration parameter

Returns
Type Description
AudienceConfigParameter

The Audience configuration parameter.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetConfigParameterOnPerson(String, Int32)

Gets an Audience configuration parameter with the specified configuration parameter name on the person specified

Declaration
AudienceConfigParameter GetConfigParameterOnPerson(string parameterName, int personId)
Parameters
Type Name Description
String parameterName

The name of the Audience configuration parameter

Int32 personId

Id of the person the parameter belongs to

Returns
Type Description
AudienceConfigParameter

The Audience configuration parameter.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetConfigParametersByLayoutName(String)

Gets the Audience configuration parameters belonging to a given Audience layout.

Declaration
AudienceConfigParameter[] GetConfigParametersByLayoutName(string layoutName)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

Returns
Type Description
AudienceConfigParameter[]

Array of Audience configuration parameters.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetConfigParametersOnPerson(Int32)

Gets the Audience configuration parameters belonging to the person specified

Declaration
AudienceConfigParameter[] GetConfigParametersOnPerson(int personId)
Parameters
Type Name Description
Int32 personId

Id of the person the parameter belongs to

Returns
Type Description
AudienceConfigParameter[]

Array of Audience configuration parameters.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetConfigParameterValue(String, String)

Gets the string value of an Audience configuration parameter belonging to a given Audience layout with the specified configuration parameter name

Declaration
string GetConfigParameterValue(string layoutName, string parameterName)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

String parameterName

The name of the Audience configuration parameter

Returns
Type Description
String

The string value of the Audience configuration parameter.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetConfigParameterValueOnPerson(String, Int32)

Gets the string value of an Audience configuration parameter with the specified configuration parameter name on the person specified

Declaration
string GetConfigParameterValueOnPerson(string parameterName, int personId)
Parameters
Type Name Description
String parameterName

The name of the Audience configuration parameter

Int32 personId

Id of the person the parameter belongs to

Returns
Type Description
String

The string value of the Audience configuration parameter.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetDefaultCountryFlag(String)

Returns the default country flag image that is displayed in Audience when no person image is found. The image belongs to a specific Audience layout instance.

Declaration
Image GetDefaultCountryFlag(string layoutName)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

Returns
Type Description
Image

The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetDefaultPersonImage(String)

Returns the default person (sales rep) image that is displayed in Audience when no person image is found. The image belongs to a specific Audience layout instance.

Declaration
Image GetDefaultPersonImage(string layoutName)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

Returns
Type Description
Image

The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetDefaultProjectImage(String)

Returns the default project or event image that is displayed in Audience when no project/event image is found. The image belongs to a specific Audience layout instance.

Declaration
Image GetDefaultProjectImage(string layoutName)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

Returns
Type Description
Image

The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetLogoImage(String)

Interface for the Audience Agent Services specific to the Audience client

Declaration
Image GetLogoImage(string layoutName)
Parameters
Type Name Description
String layoutName
Returns
Type Description
Image
Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetMyAudienceLayout()

Gets the Audience layout belonging to the currently logged on user.

Declaration
AudienceLayoutEntity GetMyAudienceLayout()
Returns
Type Description
AudienceLayoutEntity

Audience layout entity

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetMyConfigParameter(String)

Gets an Audience configuration parameter belonging to the currently logged on user with the specified configuration parameter name.

Declaration
AudienceConfigParameter GetMyConfigParameter(string parameterName)
Parameters
Type Name Description
String parameterName

The name of the Audience configuration parameter

Returns
Type Description
AudienceConfigParameter

The Audience configuration parameter.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetMyConfigParameters()

Gets the Audience configuration parameters belonging to the currently logged on user.

Declaration
AudienceConfigParameter[] GetMyConfigParameters()
Returns
Type Description
AudienceConfigParameter[]

Array of Audience configuration parameters.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

GetMyConfigParameterValue(String)

Gets the string value of an Audience configuration parameter belonging to the currently logged on user with the specified configuration parameter name.

Declaration
string GetMyConfigParameterValue(string parameterName)
Parameters
Type Name Description
String parameterName

The name of the Audience configuration parameter

Returns
Type Description
String

The string value of the Audience configuration parameter.

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

SaveAudienceLayoutEntity(AudienceLayoutEntity)

Updates the existing AudienceLayoutEntity or creates a new AudienceLayoutEntity if the id parameter is empty

Declaration
AudienceLayoutEntity SaveAudienceLayoutEntity(AudienceLayoutEntity audienceLayoutEntity)
Parameters
Type Name Description
AudienceLayoutEntity audienceLayoutEntity

The AudienceLayoutEntity that is saved.

Returns
Type Description
AudienceLayoutEntity

New or updated AudienceLayoutEntity

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

SaveConfigParameter(String, AudienceConfigParameter)

Saves an Audience configuration parameter belonging to a Audience layout

Declaration
AudienceConfigParameter SaveConfigParameter(string layoutName, AudienceConfigParameter configParameter)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

AudienceConfigParameter configParameter

The Audience configuration parameter to save.

Returns
Type Description
AudienceConfigParameter

The new or updated configuration parameter

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

SetDefaultCountryFlag(String, Image)

Stores the default country flag image that is displayed in Audience when no person image is found. The image is set on a specific Audience layout instance.

Declaration
void SetDefaultCountryFlag(string layoutName, Image image)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

Image image

The default country image to be stored for this Audience layout instance (System.Drawing.Image)

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

SetDefaultPersonImage(String, Image)

Stores the default person (sales rep) image that is displayed in Audience when no person image is found. The image is set on a specific Audience layout instance.

Declaration
void SetDefaultPersonImage(string layoutName, Image image)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

Image image

The default project/event image to be stored for this Audience layout instance (System.Drawing.Image)

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

SetDefaultProjectImage(String, Image)

Stores the default project or event image that is displayed in Audience when no project/event image is found. The image is set on a specific Audience layout instance.

Declaration
void SetDefaultProjectImage(string layoutName, Image image)
Parameters
Type Name Description
String layoutName

Name of the Audience layout instance

Image image

The default project/event image to be stored for this Audience layout instance (System.Drawing.Image)

Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }

SetLogoImage(String, Image)

Interface for the Audience Agent Services specific to the Audience client

Declaration
void SetLogoImage(string layoutName, Image image)
Parameters
Type Name Description
String layoutName
Image image
Examples
  using SuperOffice;
  using SuperOffice.CRM.Services;

  using (SoSession mySession = SoSession.Authenticate("user", "pass"))
  {
     using (AudienceAgent agent = new AudienceAgent())
     {
        // call methods on agent here...
     }
  }
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top