全球取消订阅eloqua与BULK或REST API 2.0的联系

时间:2015-07-30 12:50:10

标签: rest eloqua

我只是想知道eloqua中是否有任何URI可以全球取消订阅来自所有eloqua群组的电子邮件联系人,

现在我正在迭代小组并逐个取消订阅,

如果有任何方法比这更容易做到这一点,因为它非常耗时,还检查了新的参考页面(https://secure.eloqua.com/api/docs/Dynamic/Rest/2.0/Reference.aspx),那里也没有这个...

请在此帮助我,提前致谢。

2 个答案:

答案 0 :(得分:2)

此端点 API /散装/ 2.0 / emailAddresses /进口

不会在Eloqua中创建联系人,但会全局取消订阅电子邮件地址。如果您以后使用此电子邮件地址创建联系人,则该联系人已取消订阅。

有这样的定义:

{
    "fields": {
        "Email": "{{EmailAddress.Field(EmailAddress)}}"
    },
    "syncActions": [
        {
            "destination": "{{GlobalSubscribe}}",
            "action": "setStatus",
            "status": "unsubscribed"
        }
    ],
    "identifierFieldName": "Email",
    "name": "Bulk Import",
    "updateRule": "always"
}

或者,如果您希望创建联系人并将该联系人全局取消订阅,则可以使用普通联系人/导入端点。

答案 1 :(得分:0)

[找到答案,这可能会有助于其他人。]

使用批量API,我可以全局取消订阅联系人 设置{{Contact.Email.IsSubscribed}}字段。我并非完全 确定这是否是正确的方法。但它工作正常!

这是C#示例代码:

// Define the list of fields that will be used in the data import
Dictionary<string, string> fields = new Dictionary<string, string>
{
    {"C_EmailAddress", "{{Contact.Field(C_EmailAddress)}}"},
    {"C_FirstName", "{{Contact.Field(C_FirstName)}}"},
    {"C_LastName", "{{Contact.Field(C_LastName)}}"},
    {"C_IsSubscribed", "{{Contact.Email.IsSubscribed}}"}  // The Global Unsubscription field
};

// Create the definition (structure) of the import
var importUri = _contactImportHelper.CreateImportStructure(fields);

// Contact data to be imported
Dictionary<string, string> data1 = new Dictionary<string, string>
{
   {"C_EmailAddress", "test1@test.com"},
   {"C_FirstName", "Test1First"},
   {"C_LastName", "Test1Last"},
   {"C_IsSubscribed", "false"}
};
Dictionary<string, string> data2 = new Dictionary<string, string>
{
   {"C_EmailAddress", "test2@test.com"},
   {"C_FirstName", "Test2First"},
   {"C_LastName", "Test2Last"},
   {"C_IsSubscribed", "true"}
};

List<Dictionary<string, string>> list = new List<Dictionary<string, string>>
{
   data1,
   data2
};

Sync sync = _contactImportHelper.ImportData(importUri, list);  

以下是链接: https://community.oracle.com/thread/3655521
阅读Seema menon回答。