【问题标题】:How to find users by custom attribute in python-intercom如何在 python-intercom 中通过自定义属性查找用户
【发布时间】:2018-06-25 00:08:16
【问题描述】:

我将使用 python-intercom find_all 方法来查找所有自定义属性(“代理状态”)值为已暂停的用户,但找不到任何方法来处理此问题。

我写的如下,但它返回所有用户而不是暂停用户。

suspenso_users = intercom_client.users.find_all(custom_attributes={"Agency Status":"Suspensed"})

如果有人有基于自定义属性的过滤经验,请帮助我。

【问题讨论】:

标签: python intercom


【解决方案1】:

目前无法找到包含自定义属性特定值的用户。您将遍历您的用户列表并搜索具有您正在寻找的特定属性的用户。您可以使用 find 调用的唯一参数是 iduser_idemail 字段。不过,这可能会在未来发生变化。

也就是说,在构建模型时需要考虑的是,您可以search for users by tag or segment。因此,例如,您可以tag these users programmatically based off of webhooks,然后是search for them using the tag(s)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多