WFM_SCHEDULE_ACTIVITY Table - Incorrect schedule reflecting in Snowflake
There are few cases where schedules are updated in Genesys but they do not show ManagementUnit_ID (probably due to Workplan not used/assigned) and they are not showing in the output giving by query.
select distinct a.schedule_id , a.managementunit_id , a.week_id, a.version , a.user_id, b.managementunit_name from "A3S_GCD"."PUBLIC"."WFM_SCHEDULE_ACTIVITY" a
inner join
(select week_id , max(version) as version , user_id, managementunit_id , managementunit_name from "A3S_GCD"."PUBLIC"."WFM_SCHEDULE_ACTIVITY" a
left outer join "A3S_GCD"."PUBLIC"."WFM_MANAGEMENT_UNITS" b on a.managementunit_id = b.management_id
left outer join "A3S_GCD"."PUBLIC"."WFM_BUSINESS_UNITS" c on b.businessunit_id = c.businessunit_id where managementunit_id is not null
group by week_id , managementunit_id , user_id, managementunit_name ) b on a.managementunit_id = b.managementunit_id and a.week_id = b.week_id and a.version = b.version and a.user_id = b.user_id and a.published = 'true' and a.flag = 'Y'
#Genesys Cloud CX
------------------------------
Varun Srinivasan
Veritas Technologies LLC
------------------------------