analytics.identify(
userId = "1hKOmRA4GRlm",
traits = buildJsonObject {
put("firstName", "Alex")
put("lastName", "Keener")
},
options = RudderOption(
externalIds = listOf(
ExternalId(type = "listId", id = "13314el9Z")
),
integrations = buildJsonObject {
put("Mailjet", buildJsonObject {
put("Action", "remove")
})
}
)
)
The corresponding Java snippet is shown below:
String userId = "1hKOmRA4GRlm";
Map<String, Object> traits = new HashMap<>();
traits.put("firstName", "Alex");
traits.put("lastName", "Keener");
List<ExternalId> externalIds = new ArrayList<>();
externalIds.add(new ExternalId("listId", "13314el9Z"));
Map<String, Object> mailjetConfig = new HashMap<>();
mailjetConfig.put("Action", "remove");
Map<String, Object> integrations = new HashMap<>();
integrations.put("Mailjet", mailjetConfig);
RudderOption option = new RudderOptionBuilder()
.setIntegrations(integrations)
.setExternalId(externalIds)
.build();
analytics.identify(userId, traits, option);
analytics.identify(
userId: "User123",
traits: [
"firstName": "Alex",
"lastName": "Keener"
],
options: RudderOption(
integrations: [
"Mailjet": [
"Action": "remove"
]
],
externalIds: [
ExternalId(type: "listId", id: "13314el9Z")
]
)
)
The corresponding Objective-C snippet is shown below:
RSSOptionBuilder *optionBuilder = [RSSOptionBuilder new];
[optionBuilder setIntegrations:@{
@"Mailjet": @{@"Action": @"remove"}
}];
[optionBuilder setExternalIds:@[
[[RSSExternalId alloc] initWithType:@"listId" id:@"13314el9Z"]
]];
[analytics identify:@"User123"
traits:@{
@"firstName": @"Alex",
@"lastName": @"Keener"
}
options:[optionBuilder build]];
{
//.....
"context": {
//......
"externalId": [{
"id": "13314el9Z",
"type": "listId"
}],
//......
}
//.....
"integrations": {
"All": false,
"Mailjet": true
},
//.....
}