create and add new segment in mailchimp with api v3.0

51 Views Asked by At

I created one new segment but now i don't know how to send it to mailchimp platform the code I have is:

  
Public Shared Async Function MailchimpSendTemplate() As Task 

    Dim manager As IMailChimpManager = New MailChimpManager("xxxxxxxxxxxxxxa4fcb4654d6af-usxx") 'mykey
    Dim listId = "a4ac9d66b4"

    Dim segementoToCampaign As New Segment() With {
                .Name = "test1",
                .Options = New SegmentOptions() With {
                    .Match = Match.All,
                    .Conditions = New List(Of Condition) From {
                        New Condition With {
                        .Field = "tag_name",
                        .[Operator] = [Operator].Is,
                        .Value = "novotest"}
                    }
                }
        }
        ´´this dont work     
        Dim createdSegment As Segment = manager.ListSegments.AddAsync(listId, segementoToCampaign)
   End Function
0

There are 0 best solutions below