MonetizationOS Docs
Workflows ReferenceType Definitions

WorkflowIdentity

type WorkflowIdentity = {
  authType: "provided" | "jwt" | "anonymous";
  identifier: string;
  jwtClaims: Record<string, any>;
  testGroup100: number;
  userType: "authenticated" | "anonymous";
};

Object containing the user's identity.

Properties

authType

authType: "provided" | "jwt" | "anonymous";

identifier

identifier: string;

jwtClaims

jwtClaims: Record<string, any>;

Claim values contained in the supplied JWT, if applicable.


testGroup100

testGroup100: number;

A number between 0 and 99 calculated from a hash of the user's identifier.

Allows assigning users to a test group consistently.

Example

return identity.testGroup100 < 50 ? ['plan-a'] : ['plan-b'];


userType

userType: "authenticated" | "anonymous";