Mailchimp api v3 - cannot create a segment based on the TEXT merge field

I am trying to create a segment based on the new TEXT type merge field that I just created using condition_type = TextMerge, as it seems to be the only option from their documentation that matches my field: http://developer.mailchimp.com/documentation/ mailchimp / reference / lists / segments / # create-post_lists_list_id_segments

However, the description of TextMerge is similar to EmailAddress. To be more specific, they apply only to the EMAIL / MERGE0 field.

TextMerge vs EmailAddress

I tried the following combinations for "conditions":

{ 'condition_type': 'TextMerge', 'field': 'EVENTS', 'op': 'contains', 'value': 'test' } 

and

 { 'condition_type': 'TextMerge', 'field': 'EMAIL', 'op': 'contains', 'value': 'test' } 

The first returns an error:

 { "type":"http:\/\/developer.mailchimp.com\/documentation\/mailchimp\/guides\/error-glossary\/", "title":"Invalid Resource", "status":400, "detail":"The resource submitted could not be validated. For field-specific details, see the 'errors' array.", "instance":"", "errors": [ { "field":"options.conditions.item:0", "message":"Data did not match any of the schemas described in anyOf." } ] } 

The second one works.

My question is: how can I create a segment based on a custom TEXT merge field? For me, it looks like a mistake on their part. Has anyone else had this problem? Anyone have a solution?

+2
source share

Source: https://habr.com/ru/post/1232555/


All Articles