How to Use the ExpressionCategorySet
The following example programmatically accesses the ExpressionCategorySet.
To access the ExpressionCategorySet
Create a ExpressionCategorySet object.
Use the ExpressionCategories property on this object to access and modify the expression categories.
Use the SaveExpressionCategories method to save the changes.
Example
MarketingServiceAgent agent = new MarketingServiceAgent(url);
MarketingSystem marketingSystem = new MarketingSystem(agent);
ExpressionCategorySet ds = marketingSystem.Expressions.GetAllExpressionCategories();
// Modify an existing expression category.
ds.ExpressionCategories[0].Profile = “UpdatedProfile”;
// Delete an expression category.
ds.ExpressionCategories[1].Delete();
// Add a new expression category.
ds.ExpressionCategories.AddExpressionCategoryRow(“MyNewCategory”, “MyNewProfile”);
// Save changes to the Marketing System.
marketingSystem.Expressions.SaveExpressionCategories(ds);