Infusionsoft DataService.query或按标签查找联系人

问题描述 投票:0回答:2

我有一项任务是使用InfusionSoft API按标签查找联系人。按现有ID轻松获取数据,但如果我需要排除某些标签,该怎么办?

例如,有没有办法获取标签ID为111的联系人,但是跳过标签ID为222的联系人?

我可以看到在ContactGroupAssign表中有一个字段Contact.Groups,它有所有标签ID,但我找不到执行查询NOT LIKE的方法

是否有可能在InfusionSoft的NOT LIKE中使用DataService.query?或者也许还有另一种通过标签获取联系人的方法?

我使用PHP SDK,但我不想管理我的数据。我知道我可以检索数据,然后在foreach中删除一些数据,但我更愿意提出更好的查询请求。

另外:是否可以在查询中使用OR / AND?例如,GroupId => 111||222

php infusionsoft
2个回答
0
投票

Infusionsoft API文档已更新,此处列出了所有支持的查询运算符:https://developer.infusionsoft.com/docs/xml-rpc/#data-query-a-data-table。不相等且支持IN语句。


-1
投票

InfusionSoft根据请求更新了他们的文档,你可以使用IN和NOT(嗯,不相等):

1. Greater Than ex: LastUpdated => '~>~ 2017-01-01 00:00:00' 
2. Greater Than or Equal to ex: LastUpdated => '~>=~ 2017-01-01 00:00:00'
3. Less Than ex: LastUpdated => '~<~ 2017-01-01 00:00:00'
4. Less Than or Equal to ex: LastUpdated => '~<=~ 2017-01-01 00:00:00'
5. Not Equal to ex: Id => '~<>~123'
6. Is Null ex: FirstName => '~null~'
7. IN statement ex: Id => [1,2,3,4]**
*The raw xml, will need be html encoded for '>' and '<'
**IN statements only work on Id fields and are limited to 1000 ids

https://developer.infusionsoft.com/docs/xml-rpc/#data-query-a-data-table

© www.soinside.com 2019 - 2024. All rights reserved.