Skip to content

Conversation

@mmustafa-tse
Copy link
Contributor

Summary

  • We currently support forwarding subscriptionGroupIds mapped via user attributes in our Braze S2S forwarder only, a customer mentioned that Braze support this feature in their Braze and requested this as a feature to our kits, refer to our docs regarding subscription group ids

Testing Plan

  • Was this tested locally? If not, explain why.
  • E2E and Unit tested

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

}

private fun getSubscriptionGroupIds(subscriptionGroupMap: String): MutableMap<String, String> {
val subscriptionGroupsArray = JSONArray(subscriptionGroupMap)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
val subscriptionGroupsArray = JSONArray(subscriptionGroupMap)
if (subscriptionGroupMap.isEmpty()) {
return subscriptionGroupIds
}
val subscriptionGroupsArray = JSONArray(subscriptionGroupMap)

Check if the map string is empty before creating the JSON array, so you can avoid a JSONException

subscriptionGroupIds[key] = value
}

return subscriptionGroupIds
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return subscriptionGroupIds

Not needed because the code already returns subscriptionGroupIds above.

} else {
Logger.warning(
"unable to set Subscription Group ID for user attribute: "
+ key + "due to invalid value data type. expected value data type should be Boolean"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ key + "due to invalid value data type. expected value data type should be Boolean"
+ key + " due to invalid value data type. expected value data type should be Boolean"

Copy link
Collaborator

@Mansi-mParticle Mansi-mParticle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rmi22186 rmi22186 merged commit 22a9786 into mparticle-integrations:development Apr 23, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants