Skip to content

Add primaryTenantDomain support to PushNotificationData#23

Merged
ZiyamSanthosh merged 2 commits into
wso2-extensions:mainfrom
VihangaMunasinghe:tenant-organization-support
Apr 7, 2026
Merged

Add primaryTenantDomain support to PushNotificationData#23
ZiyamSanthosh merged 2 commits into
wso2-extensions:mainfrom
VihangaMunasinghe:tenant-organization-support

Conversation

@VihangaMunasinghe

Copy link
Copy Markdown
Contributor

Purpose

Add primaryTenantDomain support to PushNotificationData to enable proper tenant resolution for organization-level push notification routing. This is required to correctly differentiate organization tenants from root tenants and build the correct relative API path for push notification delivery.

GitHub Issue

Related PRs

  1. identity-event-handler-notification: Fix tenant and sub-organization differentiation logic when building the PushNotificationData in push notification handler identity-event-handler-notification#384

Goals

  • Introduce a primaryTenantDomain field in PushNotificationData and its Builder
  • Include primaryTenantDomain in the additional data map when present, overriding the regular tenantDomain
  • Build the correct relativePath based on organization and tenant context

Approach

  • Added primaryTenantDomain as a new final field in PushNotificationData with corresponding Builder setter and getter
  • Added a private buildRelativePath() method that constructs the relative path based on the combination of organizationId, primaryTenantDomain, and tenantDomain
  • getAdditionalData() now includes the relativePath entry and conditionally overrides tenantDomain with primaryTenantDomain when set

User stories

As a system handling push notifications for organization users, I need the notification data to carry the primary tenant domain so that the push notification provider can route requests to the correct tenant API path.

Release note

Added primaryTenantDomain support to PushNotificationData for correct tenant resolution in organization-level push notification delivery.

Documentation

N/A - Internal model change with no direct user-facing documentation impact.

Training

N/A

Certification

N/A - Internal API change only.

Marketing

N/A

Automation tests

  • Unit tests
    • N/A
  • Integration tests
    • N/A

Security checks

Samples

N/A

Migrations (if applicable)

N/A

Learning

N/A

@ZiyamSanthosh ZiyamSanthosh merged commit 5300b3d into wso2-extensions:main Apr 7, 2026
2 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.

2 participants