public.subuserlicensedata

public.subuserlicensedata

Description

License assignment history from Genesys Cloud: one row per Assignment interval, open or closed. User attributes are copied from userdetails when a row is written.

Columns

Name Type Default Nullable Children Parents Comment
keyid varchar(255) false Unique identifier: {userId}{licenseName}{First seen as yyyyMMddHHmmss}. Rows from before intervals were tracked end in _na and have no First seen
userid varchar(50) false Genesys Cloud user GUID
username varchar(255) true User display name, copied from userdetails.name when the row is written
email varchar(255) true User email address, copied from userdetails when the row is written
licenseid varchar(100) true Genesys Cloud license name (the license API does not expose a separate id)
licensename varchar(100) true License name as returned by Genesys Cloud (e.g. cloudCX3, agentCopilotLicense)
licensetype varchar(100) true Not provided by the license API; always NULL
licenseassignmentdate timestamp without time zone true First seen: the first sync that observed this assignment. An upper bound of the real grant time; NULL for assignments that predate this tracking
licenseremovaldate timestamp without time zone true Removal observed: the first sync that found this assignment absent. NULL while the assignment is active
licenseactive boolean true TRUE while the interval is open (Genesys keeps returning the assignment); FALSE once a sync observed it absent. A user and license pair has at most one open row
copilotlicense boolean true TRUE if this is an Agent Copilot license (license name contains Copilot)
divisionid varchar(50) true Genesys Cloud division GUID of the user, copied from userdetails when the row is written
updated timestamp without time zone true Last seen: the most recent sync that observed this assignment. Not refreshed when the row is marked inactive

Constraints

Name Type Definition
subuserlicensedata_pkey PRIMARY KEY PRIMARY KEY (keyid)

Indexes

Name Definition Comment
subuserlicensedata_pkey CREATE UNIQUE INDEX subuserlicensedata_pkey ON public.subuserlicensedata USING btree (keyid)
subuserlicensedata_userid_idx CREATE INDEX subuserlicensedata_userid_idx ON public.subuserlicensedata USING btree (userid) Index for user-based license lookups
subuserlicensedata_copilot_idx CREATE INDEX subuserlicensedata_copilot_idx ON public.subuserlicensedata USING btree (copilotlicense, licenseactive) Composite index for Copilot license queries
subuserlicensedata_licensetype_idx CREATE INDEX subuserlicensedata_licensetype_idx ON public.subuserlicensedata USING btree (licensetype) Index for license type filtering
subuserlicensedata_active_idx CREATE INDEX subuserlicensedata_active_idx ON public.subuserlicensedata USING btree (licenseactive) Index for active license filtering