Updating & deleting Segments with createsend-dotnet

Hi, I can't find any samples in createsend-dotnet for managing Segments. I know how to add them, as there's an obvious static method for that.

But I can't work out how to update the rules of an existing Segment, or how to delete an existing Segment. Can anyone help me with that?


captaincamp, 4 years ago

Whoops no worries, sussed it out. Spotted the Update and Delete methods in the library source for the segment object.

So it goes a little something like this:

    Dim bseg = (From qs In yourCrmListObject.Segments Where qs.Title.Equals("your segment title", StringComparison.OrdinalIgnoreCase)).SingleOrDefault
    Dim seg = New cs.Segment(bseg.SegmentID)

Or use seg.Update() to change the title or rules.

Join 150,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free