Click or drag to resize

AdministrationClientInsertMarketingSegment Method

Create a new Marketing Segment and link to an Entity Type and Entity RSN, from the submitted values.

Syntax
C#
public Result InsertMarketingSegment(
	ManagementGroupRequestOfMarketingSegment request
)

Parameters

request
Type: AdministrationServiceManagementGroupRequestOfMarketingSegment

Return Value

Type: Result
Examples
C#
using (var svc = new AdministrationService.AdministrationClient())
{
  var request = new AdministrationService.ManagementGroupRequestOfMarketingSegment();
  request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin
  request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin

  var marketingSegment = new AdministrationService.MarketingSegment();
  marketingSegment.DisplayValue = ""; //Optional
  marketingSegment.Division = "2"; //Optional - marketing segment group division
  marketingSegment.Entity_RSN = new Guid("1b3e7d94-8a2a-46cf-962c-f305b8ed32d2");; //Required - Member RSN
  marketingSegment.Entity_Type = "Person"; //Required Valid values are : 'Person' or 'Organisation',
  marketingSegment.SegmentName = ""; //Optional
  marketingSegment.Segment_Level1 = "";  //Optional Segment_Level2 - Segment_Level9 available

  request.Value = marketingSegment; //Required

  AdministrationService.Result result = svc.InsertMarketingSegment(request);

  if (result.FaultCode == 0)
  {
    //Request succeeded
  }
  else
  {
    //Request failed
    throw new Exception(result.FaultDescription);
  }
}
See Also