Click or drag to resize

LoyaltyCampaignOfferClientInsertCampaignOfferCategory Method

Create a new Campaign Offer Category, from the submitted values.

Syntax
C#
public Result InsertCampaignOfferCategory(
	ManagementGroupRequestOfCampaignOfferCategory request
)

Parameters

request
Type: LoyaltyServiceManagementGroupRequestOfCampaignOfferCategory

Return Value

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

  var campaignOfferCategory = new LoyaltyService.CampaignOfferCategory();
  campaignOfferCategory.RSN = Guid.NewGuid();//Required
  campaignOfferCategory.DisplayValue = "Bags";//Required
  campaignOfferCategory.FeatureCategory = false;//Optional
  campaignOfferCategory.HomeCategory = false;//Optional
  campaignOfferCategory.MaximumMemberOrders = 0;//Optional
  campaignOfferCategory.MaximumStockOrders = 0;//Optional
  campaignOfferCategory.Parent_RSN = new Guid("4c1abc3a-620d-4b8c-bd9f-ea2dc63ded8a");;//Optional - RSN of parent campaign offer category

  //add campaignOfferCategory to request
  request.Value = campaignOfferCategory;

  LoyaltyService.Result result = svc.InsertCampaignOfferCategory(request);

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