I'm trying to create a segment based on a new merge field of type TEXT that I just created, by using condition_type = TextMerge since 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 for TextMerge looks identical to EmailAddress. To be more specific they both apply only for the EMAIL / MERGE0 field.
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 one 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 merge field of type TEXT? To me this looks like a bug from their side. Did anyone else have this problem? Does anyone have a solution?
errors
as an array. – Kelliekellinacondition_type
orop
has an invalid value, or bothcondition_type
andop
have invalid values. For examplecondition_type
isTextMerge2
orop
iscontains2
. Based on yourconditions
parameter, looks like this is the problem:'op: 'contains'
, are you sure it's not a typo? It should be'op': 'contains'
(notice the quote afterop
). – Kelliekellina