客户首次登录 客户 账户 现在将 Customer.state 设置为 ENABLED 并发送 customers/enable 和 customers/update webhook。这与传统客户账户中的账户激活方式一致。
变更内容
当客户首次登录客户账户时,Shopify 将 Customer.state 设置为 ENABLED。随后 Shopify 发送 customers/enable 和 customers/update webhook。这适用于所有登录方式,包括电子邮件验证码、Shop、Google、Facebook、Apple 以及 第三方身份 提供商。
在此之前,使用客户账户的客户在登录后状态仍为 DISABLED 。因此,Liquid customer.has_account 返回 false 给他们。现在它在 true 后返回 true。
已经登录过的客户
在 2024 年 5 月 27 日至今天之间登录客户账户的客户已经处于 ENABLED。Shopify 通过一次性更新设置了他们的状态,该更新未发送任何 webhook。不要依赖 updated _at 来查找这些客户,因为该更新并未更改其中所有客户的此字段。请改为查询 Customer.state。 updated_at 来查找这些客户,因为该更新并未更改其中所有客户的此字段。请改为查询 Customer.state 。
自 2024 年 5 月 27 日以来尚未登录的客户将保持 DISABLED。他们下一次的登录将被视为首次登录。它会将他们的状态设置为 ENABLED 并发送两个 webhook。
受影响对象
如果您的应用、集成或主题执行以下任何操作,则您会受到影响:
- 读取 Customer.state 从 GraphQL Admin API
- 监听 customers/enable 或 customers/update 监听 customers /enable 或 customers /update webhook
- 消费 customer.state 来自 Events API 的事件
- 使用 Liquid customer.has_account 来检查客户是否拥有账户
您应该采取的操作
大多数应用无需更改。如果您的应用在接收 customers /enable 时发送欢迎消息、奖励积分或同步记录,或者在检测到 customers/enable 或看到 state: ENABLED时,请检查以下内容:
- 客户的首次登录是您希望应用执行操作的时刻。
- 您的应用处理在一次更新中变为 ENABLED 的客户。他们没有触发 webhook,因此仅监听 webhook 的应用将无法看到他们。 ENABLED 在一次更新中变为 ENABLED。他们没有触发 webhook,因此仅监听 webhook 的应用将无法看到他们。
- 现在,由于 customer.has_account 返回 true 对于已登录客户账户的客户,customer.has_account 为 true。

