Outbound campaign model: one row per voice campaign as currently configured in Genesys Cloud, from odcampaigndetails.
CREATE VIEW vwoutboundcampaign AS (
SELECT c.id AS campaign_id,
c.name AS campaign_name,
c.campaignstatus AS campaign_status,
c.contactlist AS contact_list_id,
c.contactlistname AS contact_list_name,
c.dialingmode AS dial_mode,
c.queue AS queue_id,
qd.name AS queue_name,
c.division AS division_id,
c.divisionname AS division_name,
(round(c.previewtimeoutseconds))::integer AS preview_time_seconds,
c.abandonrate AS abandon_rate,
c.script AS script_id,
c.scriptname AS script_name,
c.rulesetids AS dialing_rule_set_id,
c.dnclistids AS dnc_list_id,
((c.campaignstatus)::text = 'on'::text) AS active_flag,
'GenesysCloud'::character varying(50) AS source_system,
(c.created)::timestamp(3) without time zone AS created_ts,
(c.updated)::timestamp(3) without time zone AS updated_ts
FROM (odcampaigndetails c
LEFT JOIN queuedetails qd ON (((qd.id)::text = (c.queue)::text)))
)| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| campaign_id | varchar(50) | true | ||||
| campaign_name | varchar(200) | true | ||||
| campaign_status | varchar(50) | true | ||||
| contact_list_id | varchar(50) | true | ||||
| contact_list_name | varchar(200) | true | ||||
| dial_mode | varchar(50) | true | ||||
| queue_id | varchar(50) | true | ||||
| queue_name | varchar(255) | true | ||||
| division_id | varchar(50) | true | ||||
| division_name | varchar(200) | true | ||||
| preview_time_seconds | integer | true | ||||
| abandon_rate | numeric(20,2) | true | ||||
| script_id | varchar(50) | true | ||||
| script_name | varchar(200) | true | ||||
| dialing_rule_set_id | text | true | ||||
| dnc_list_id | text | true | ||||
| active_flag | boolean | true | ||||
| source_system | varchar(50) | true | ||||
| created_ts | timestamp(3) without time zone | true | ||||
| updated_ts | timestamp(3) without time zone | true |
| Name | Columns | Comment | Type |
|---|---|---|---|
| public.odcampaigndetails | 33 | Outbound Dialling Campaign Lookup Data | BASE TABLE |
| public.queuedetails | 25 | Queue Lookup data | BASE TABLE |