MailChimp广告系列内容更新 [英] MailChimp Campaign Content Update

查看:71
本文介绍了MailChimp广告系列内容更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MailChimp广告系列内容文档- https://developer.mailchimp.com/documentation /mailchimp/reference/campaigns/content

MailChimp campaign content docs - https://developer.mailchimp.com/documentation/mailchimp/reference/campaigns/content

我正在尝试通过API用实际值替换广告系列内容中的一些占位符.起初,我认为可能会出现一些语法错误或内部逻辑错误,例如将非唯一的mc:edit放入mc:repeatable中,这会使HTML被MailChimp拒绝/拒绝,因此更新没有发生,但是,并非如此.

I'm trying to replace some placeholders in a campaign content with actual values via the API. At first, I thought there might be some syntax errors or internal logic errors like non-unique mc:edits into a mc:repeatable that would get the HTML refused/declined by MailChimp, hence the update not taking place, however, that was not the case.

尝试用简单的<p>test</p>替换html,但仍无法正常工作.

Tried replacing html with a simple <p>test</p> and it was still not working.

以下是几个本地日志,我将使用 xyz 作为我的广告系列ID:

Here are a couple of local logs, I'll use xyz as my campaign id:

2018-02-26 16:26:13 [::1][9804][-][warning][application] calling GET /campaigns/xyz/content []

2018-02-26 16:26:13 [::1][9804][-][warning][application] got both plain_text and html versions of content

2018-02-26 16:26:13 [::1][9804][-][warning][application] calling PUT /campaigns/xyz/content {"html":"<p>test</p>"}

2018-02-26 16:26:14 [::1][9804][-][warning][application] got response [ 'plain_text' => 'test' + other MailChimp stuff such as footer, that were appended automatically by MailChimp, 'html' => '<p>test</p>' ]

2018-02-26 16:26:14 [::1][9804][-][warning][application] got response [ 'plain_text' => 'test' + other MailChimp stuff such as footer, that were appended automatically by MailChimp, 'html' => '<p>test</p>' ]

// calling GET immediately after PUT in order to see if any update occurred

2018-02-26 16:26:14 [::1][9804][-][warning][application] calling GET /campaigns/xyz/content []

2018-02-26 16:26:14 [::1][9804][-][warning][application] got updated html (my "test" paragraph + auto footer from MailChimp) and proper plain_text

根据这些,一切看起来都不错,这意味着两个版本均按预期进行了更新.但是,在下一个API/MailChimp仪表板请求上,它将显示旧的HTML内容,仅保留我刚才在纯文本版本中所做的更新.

Everything looks fine according to these, that means both versions updated as they were supposed to. However, on the next API/MailChimp dashboard request, it displays the old HTML content, preserving the update I've just made in the plain text version only.

没有错误,没什么可找的.可能是任何内部MailChimp行为.

No errors, nothing to look into. It could be any internal MailChimp behaviour.

PS:我了解设置Mailchimp广告系列内容html无法正常工作 MailChimp API v3广告系列内容模板部分,但没有一个提供给这些人的答案很有帮助.

PS: I know about Setting Mailchimp campaign content html not working or MailChimp API v3 campaign content template sections, but none of the answers provided to those are helpful.

PS2:我知道我应该联系MailChimp,但是根据

PS2: I know I should contact MailChimp, but according to

我们的MailChimp支持团队没有经过深入的API故障排除培训.如果您需要开发人员来帮助您使用API​​进行配置,请查看我们出色的专家目录,其中列出了可以聘请的第三方MailChimp专家来提供帮助.

他们不提供API故障排除支持.

they don't provide support for API troubleshooting.

推荐答案

MailChimp不允许更新广告系列的HTML内容,因为广告系列的类型基于模板.

MailChimp doesn't allow updating the campaign's HTML content because the campaign type is based on a template.

为了更新HTML内容,必须将广告系列设置为自定义HTML,而不是模板.您可以通过将GET API请求发送到/campaigns/campaigns/{campaign_id}并在响应中找到content_type属性来检查类型(

In order to update the HTML content, the campaign has to be set to custom HTML instead of a template. You can check the type by sending a GET API request to /campaigns or /campaigns/{campaign_id} and finding the content_type attribute in the response (documentation).

或者,在仪表板中,可以通过编辑电子邮件的设计来确定类型. 自己编写代码"下的所有内容都是HTML,模板当然也是模板.

Alternatively, in the dashboard, the type can be determined by editing the design of the email. Anything under 'Code your own' is HTML and templates are of course templates.

我不太确定为什么对模板广告系列中的PUT请求的第一个响应会显示更新后的内容,但是更改内容类型应该可以让您根据需要进行更新.

I'm not entirely sure why the first response to a PUT request on a template campaign shows the updated content, but changing the content type should let you update as you want to.

希望这会有所帮助!

这篇关于MailChimp广告系列内容更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆