Skip to content

[AI-FSSDK] [FSSDK-12670] Block ODP identify events with single identifier#409

Open
jaeopt wants to merge 1 commit into
masterfrom
ai/jaeopt/FSSDK-12670-odp-event
Open

[AI-FSSDK] [FSSDK-12670] Block ODP identify events with single identifier#409
jaeopt wants to merge 1 commit into
masterfrom
ai/jaeopt/FSSDK-12670-odp-event

Conversation

@jaeopt
Copy link
Copy Markdown
Contributor

@jaeopt jaeopt commented May 26, 2026

Summary

Block ODP identify events when only a single valid identifier is provided. Identify events exist to link multiple user identifiers together; sending them with a single identifier provides no value and wastes network calls.

Jira: FSSDK-12670

Changes

OptimizelySDK/Odp/OdpEventManager.cs

  • Added filtering of null/empty identifier values using LINQ in IdentifyUser
  • Added guard: requires 2+ valid identifiers to dispatch identify event
  • Added debug log message when skipping: "ODP identify event is not dispatched (only one identifier provided)."

Tests (OdpEventManagerTests.cs)

  • Updated ShouldLogWhenOdpNotIntegratedAndIdentifyUserCalled to expect 2 ODP_NOT_INTEGRATED logs (instead of 3) since IdentifyUser now returns before reaching SendEvent
  • Replaced ShouldPrepareCorrectPayloadForIdentifyUser with ShouldNotSendIdentifyEventWithSingleIdentifier to verify single-identifier identify events are blocked

Notes

  • C# SDK is server-side only (no VUID), so IdentifyUser always has a single fs_user_id identifier and identify events will be correctly skipped
  • The public IdentifyUser(string userId) API is unchanged for backward compatibility
  • The count check matches behavior across all SDKs per the spec

Add count check in IdentifyUser to filter out empty identifier values
and require 2+ valid identifiers before dispatching. Server-side C# SDK
only has fs_user_id (no VUID), so identify events will be correctly
skipped with a debug log message.
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.

1 participant