Skip to main content

custom property not being set using node.js SDK

 

payload like so: 
 

const subscribe: SubscriptionCreateJobCreateQuery = {
data: {
type: ProfileSubscriptionBulkCreateJobEnum.ProfileSubscriptionBulkCreateJob,
attributes: {
profiles: {
data: a
{
type: ProfileEnum.Profile,
attributes: {
email: toEmail,
subscriptions: {
email: {
marketing: {
consent: "SUBSCRIBED",
},
},
},
properties: {
submissionId,
},
},
},
],
},
},
relationships: {
list: { data: { type: "list", id: listId } },
},
},
};
const response = await profilesApi.subscribeProfiles(subscribe);

 

 

properties: { submissionId }

 

This value is not present in the UI when I submit the profile - I can the contact has been created in the UI, but the proeprty is not being set. 

Am I doing something wrong? 

Thanks. 

Hello @hmenen you have to pass the customer property  as a key value pair.

 

Change 

submission Id

To

submissionId: "ID_VALUE"


Hi @hmenen,

As far as I know, the new bulk-subscribe endpoint doesn’t supporting adding/updating profile properties anymore. There is no field `properties` in the documentation: https://developers.klaviyo.com/en/reference/subscribe_profiles.

We’ve had to change our integrations to call an insert/update/upsert function for the profile before subscribing the profile (or vice versa since you can create a profile via the bulk subscribe endpoint).

 

Best,

Kevin.


Reply