diff --git a/packages/destination-actions/src/destinations/braze/updateUserProfile/generated-types.ts b/packages/destination-actions/src/destinations/braze/updateUserProfile/generated-types.ts index 7d6393ebb77..a950ccaaf27 100644 --- a/packages/destination-actions/src/destinations/braze/updateUserProfile/generated-types.ts +++ b/packages/destination-actions/src/destinations/braze/updateUserProfile/generated-types.ts @@ -130,6 +130,19 @@ export interface Payload { friends_count?: number statuses_count?: number } + /** + * Array of objects used to manage a user's subscription status for specific subscription groups. + */ + subscription_groups?: { + /** + * The identifier for the subscription group + */ + subscription_group_id: string + /** + * The user's subscription status: "subscribed" or "unsubscribed" + */ + subscription_state: string + }[] /** * Hash of custom attributes to send to Braze */ diff --git a/packages/destination-actions/src/destinations/braze/updateUserProfile/index.ts b/packages/destination-actions/src/destinations/braze/updateUserProfile/index.ts index 4ee56126380..f8a89dda52f 100644 --- a/packages/destination-actions/src/destinations/braze/updateUserProfile/index.ts +++ b/packages/destination-actions/src/destinations/braze/updateUserProfile/index.ts @@ -266,6 +266,30 @@ const action: ActionDefinition = { } } }, + subscription_groups: { + label: 'Subscription Groups', + description: 'Array of objects used to manage a user\'s subscription status for specific subscription groups.', + type: 'object', + multiple: true, + properties: { + subscription_group_id: { + label: 'Subscription Group ID', + description: 'The identifier for the subscription group', + type: 'string', + required: true + }, + subscription_state: { + label: 'Subscription State', + description: 'The user\'s subscription status: "subscribed" or "unsubscribed"', + type: 'string', + required: true, + choices: [ + { label: 'Subscribed', value: 'subscribed' }, + { label: 'Unsubscribed', value: 'unsubscribed' } + ] + } + } + }, custom_attributes: { label: 'Custom Attributes', description: 'Hash of custom attributes to send to Braze', diff --git a/packages/destination-actions/src/destinations/braze/updateUserProfile2/generated-types.ts b/packages/destination-actions/src/destinations/braze/updateUserProfile2/generated-types.ts index 1547febef1b..d5457b8cd3c 100644 --- a/packages/destination-actions/src/destinations/braze/updateUserProfile2/generated-types.ts +++ b/packages/destination-actions/src/destinations/braze/updateUserProfile2/generated-types.ts @@ -130,6 +130,19 @@ export interface Payload { friends_count?: number statuses_count?: number } + /** + * Array of objects used to manage a user's subscription status for specific subscription groups. + */ + subscription_groups?: { + /** + * The identifier for the subscription group + */ + subscription_group_id: string + /** + * The user's subscription status: "subscribed" or "unsubscribed" + */ + subscription_state: string + }[] /** * Hash of custom attributes to send to Braze */ diff --git a/packages/destination-actions/src/destinations/braze/updateUserProfile2/index.ts b/packages/destination-actions/src/destinations/braze/updateUserProfile2/index.ts index e9c798b17f0..6c0defcbf95 100644 --- a/packages/destination-actions/src/destinations/braze/updateUserProfile2/index.ts +++ b/packages/destination-actions/src/destinations/braze/updateUserProfile2/index.ts @@ -273,6 +273,30 @@ const action: ActionDefinition = { } } }, + subscription_groups: { + label: 'Subscription Groups', + description: 'Array of objects used to manage a user\'s subscription status for specific subscription groups.', + type: 'object', + multiple: true, + properties: { + subscription_group_id: { + label: 'Subscription Group ID', + description: 'The identifier for the subscription group', + type: 'string', + required: true + }, + subscription_state: { + label: 'Subscription State', + description: 'The user\'s subscription status: "subscribed" or "unsubscribed"', + type: 'string', + required: true, + choices: [ + { label: 'Subscribed', value: 'subscribed' }, + { label: 'Unsubscribed', value: 'unsubscribed' } + ] + } + } + }, custom_attributes: { label: 'Custom Attributes', description: 'Hash of custom attributes to send to Braze', diff --git a/packages/destination-actions/src/destinations/braze/utils.ts b/packages/destination-actions/src/destinations/braze/utils.ts index 0a9869051c9..c382f116469 100644 --- a/packages/destination-actions/src/destinations/braze/utils.ts +++ b/packages/destination-actions/src/destinations/braze/utils.ts @@ -433,6 +433,7 @@ export function updateUserProfile( push_tokens: payload.push_tokens, time_zone: payload.time_zone, twitter: payload.twitter, + subscription_groups: payload.subscription_groups, _update_existing_only: updateExistingOnly } ] @@ -513,6 +514,7 @@ export async function updateBatchedUserProfile( push_tokens: payload.push_tokens, time_zone: payload.time_zone, twitter: payload.twitter, + subscription_groups: payload.subscription_groups, _update_existing_only: updateExistingOnly }