Pocus Data Share Reference

This page explains the tables that Pocus shares via Snowflake. Reach out to our team if you have any questions!

Tables

Table names on this document are listed without customer prefixes. For example, instead of ACTION_HISTORY, Google would actually have a table named GOOGLE_ACTION_HISTORY. Data for all tables is refreshed every 12 hours.

ACTION_HISTORY

This table records the history of actions performed within the Pocus system. This includes actions taken on integrations (i.e. updating Salesforce or enrolling a user into an Outreach sequence) as well as snoozes (i.e. users hiding records from themselves).

Column nameDescription
TIMESTAMPThe timestamp when the action was performed.
OBJECT_CONFIGURATION_IDThe identifier of the object configuration associated with the action.
IDThe primary key for this table, a unique identifier for each action invocation
POCUS_IDThe internal identifier for the row of data within Pocus.
EXTERNAL_ID_NAMEThe name of the primary key that EXTERNAL_ID uses. For example, USER_ID
EXTERNAL_IDThe value for the primary key for this row of data within your system. For example, ABC123
ACTION_CONFIGURATION_IDThe identifier of the action configuration for this action.
ACTION_NAMEThe name or label of the action.
ACTION_TYPEThe type of action performed (e.g., create, update, delete).
ACTIONED_BY_EMAILThe email address of the user or system that performed the action.
ACTION_SUCCESSThe indication wether or not the invocation completed successfully
INBOX_ENTRY_IDThe identifier for the inbox entry being acted on (if the acted on item is in a playbook)
SOURCE_IDThe identifier for the context of where the item was acted on
SOURCE_TYPEThe context of where the item was acted on (PLAYBOOK, LIST, or DRILLDOWN)

CURRENT_INBOX_STATE

This table stores the current state of inbox entries in the Pocus system. The data in this table powers the inbox that users see in the Pocus application.

Column nameDescription
INBOX_ENTRY_IDUnique identifier for each inbox entry. If a row of data is surfaced multiple times, it will be given a new inbox entry ID each time.
POCUS_IDThe internal identifier for the row of data within Pocus.
EXTERNAL_ID_NAMEThe name of the primary key that EXTERNAL_ID uses. For example, USER_ID
EXTERNAL_IDThe primary key for this table, a unique identifier for current inbox states
OBJECT_CONFIGURATION_IDThe identifier of the object configuration associated with the inbox entry.
PLAYBOOK_IDThe identifier of the playbook associated with the inbox entry.
SURFACED_ATThe timestamp when the inbox entry was surfaced.
UPDATED_ATThe timestamp when the inbox entry was last updated.
LATEST_STATEThe current state of the inbox entry. See the inbox states section below for more details.

INBOX_STATE_HISTORY

This table maintains a history log of state changes for inbox entries in the Pocus.

Column nameDescription
TIMESTAMPThe timestamp when the state change occurred.
IDThe primary key for this table, a unique identifier for inbox state updates
OBJECT_CONFIGURATION_IDThe identifier of the object configuration associated with the inbox entry.
POCUS_IDThe internal identifier for the row of data within Pocus.
EXTERNAL_ID_NAMEThe name of the primary key that EXTERNAL_ID uses. For example, USER_ID
EXTERNAL_IDThe value for the primary key for this row of data within your system. For example, ABC123
PLAYBOOK_IDThe identifier of the playbook associated with the inbox entry. See the Playbook table for more details.
INBOX_ENTRY_IDUnique identifier for the inbox entry that underwent the state change.
NEW_STATEThe new state of the inbox entry after the change. See the inbox states section below for more details.
ACTIONED_BY_EMAILThe email address of the user or system that initiated the state change. Will only be included if the state transition occurred because of a user action (i.e. "Mark done"

LIST

This table stores information about lists created within Pocus.

Column nameDescription
IDUnique identifier for each list.
CREATED_ATThe timestamp when the list was created.
UPDATED_ATThe timestamp when the list was last updated.
NAMEThe name or label of the list.
OBJECT_CONFIGURATION_IDThe identifier of the object configuration associated with the list.
OWNER_EMAILThe email address of the user who owns the list.
LAST_EDITOR_EMAILThe email address of the user who last edited the list.
FILTER_CONDITIONSConditions or criteria used to filter items in the list.
LIST_COLUMNSThe columns or attributes included in the list.

OBJECT_CONFIGURATION

This table stores configurations for various objects within Pocus. For example, User or Account would each be one object configuration.

Column nameDescription
IDUnique identifier for each object configuration.
CREATED_ATThe timestamp when the configuration was created.
UPDATED_ATThe timestamp when the configuration was last updated.
NAMEThe name or label of the object configuration.

PLAYBOOK

This table stores information about playbooks that are configured within Pocus.

Column nameDescription
IDUnique identifier for each playbook.
NAMEThe name or label of the playbook.
GOAL_IDThe identifier of the goal associated with the playbook.
CREATED_ATThe timestamp when the playbook was created.
UPDATED_ATThe timestamp when the playbook was last updated.
QUALIFIED_CONDITIONSConditions that determine when the playbook is qualified for execution.
OBJECT_CONFIGURATION_IDThe identifier of the object configuration associated with the playbook

GOAL

This table stores information about goals that are configured within Pocus.

Column nameDescription
IDUnique identifier for each Goal.
NAMEThe name or label of the Goal.
GOAL_CONDITIONSThe conditions that determine if an items meets the set Goal outcomes.
CREATED_ATThe timestamp when the Goal was created.
UPDATED_ATThe timestamp when the playbook was last updated.
ELIGIBLE_CONDITIONSConditions that determine when the Goal is qualified for execution.
OBJECT_CONFIGURATION_IDThe identifier of the object configuration associated with the playbook.

USER_ACTIVITY

This table lists every day a user was active in the last 365 days. Rows where a user has a single NULL date value indicates the user has not been active in Pocus

Column nameDescription
USER_IDUnique identifier for each User
EMAILEmail of the user
ACTIVITY_DATEDate the user was active. Activity is defined as any engagement with Pocus where an item was loaded i.e. drilldown opened, list refreshed, playbook results filtered etc.

Helpful Queries

Here are some example queries used to provide useful insights into engagement and user activity

Count Days Active By User In Last Month, Week, etc.

Select 
EMAIL,
USER_ID,
COUNT_IF(ACTIVITY_DATE > CURRENT_DATE - interval '30 days') as days_active_l30D,
COUNT_IF(ACTIVITY_DATE > CURRENT_DATE - interval '7 days') as days_active_l7D
FROM USER_ACTIVITY
GROUP BY 1,2;

Count of Specified Action Invocations and Playbook Activity in Time Frame

WITH ah AS (
    SELECT ACTIONED_BY_EMAIL
    , CONCAT(object_configuration_id, timestamp) as pk
    , ACTION_TYPE
    FROM action_history
    WHERE ACTIONED_BY_EMAIL IS NOT NULL
    AND TIMESTAMP >= '2023-12-01' //<---- UPDATE AS NEEDED

    UNION ALL

    SELECT ACTIONED_BY_EMAIL //<---- ONLY INCLUDE FOR MARK DONE COUNT
        , CONCAT(object_configuration_id, timestamp) as pk
        , NEW_STATE as ACTION_TYPE
    FROM inbox_state_history
    WHERE NEW_STATE = 'SUPPRESSED' AND ACTIONED_BY_EMAIL IS NOT NULL
    AND TIMESTAMP >= '2023-12-01' //<---- UPDATE AS NEEDED
)

SELECT * 
FROM ah
PIVOT(COUNT(pk) FOR 
    ACTION_TYPE IN ('GET_OR_CREATE_OUTREACH_PROSPECT', 'ENROLL_IN_OUTREACH_SEQUENCE', 'SUPPRESSED'))
AS p (USER_EMAIL, OPEN_IN_OUTREACH, ENROLL, MARKED_DONE)
ORDER BY USER_EMAIL;

Count of Items Marked Done in Playbooks within Time Frame

SELECT
G.NAME AS GOAL_NAME,
PB.NAME AS PLAYBOOK_NAME,
COUNT_IF(NEW_STATE = 'SUPPRESSED') AS COUNT_MARK_DONE,
PLAYBOOK_ID
FROM INBOX_STATE_HISTORY AS IH
JOIN PLAYBOOK AS PB ON IH.PLAYBOOK_ID = PB.ID
JOIN GOAL AS G ON PB.GOAL_ID = G.ID
WHERE TIMESTAMP >= '2023-12-01' //<----ADJUST AS NEEDED
GROUP BY 1,2,4;

Playbook Action Table

Tells you the distinct playbooks and actions taken on each external identifier (this varies by object acted on).

SELECT
      p.name AS playbook_name,
      g.name,
      external_id,
      external_id_name,
      action_type,
      array_agg(DISTINCT (action_name)) AS action_names,
      MIN(timestamp) AS first_action,
      MAX(timestamp) AS most_recent_action,
      ARRAY_AGG(DISTINCT actioned_by_email) AS actioned_by_emails
    FROM
      action_history ah
      LEFT JOIN playbook p ON p.id = ah.source_id
      LEFT JOIN goal g ON g.id = p.goal_id
    WHERE
      source_type = 'PLAYBOOK'
      AND actioned_by_email IS NOT NULL
      AND action_type != 'MARK_DONE'
      AND action_type != 'SNOOZE_OBJECT'
    GROUP BY
      1,
      2,
      3,
      4,
      5
    ORDER BY
      playbook_name ASC,
      external_id_name ASC,
      action_type ASC

Playbook Funnel Analysis by External ID

For a given playbook and external object when was it first surfaced, most recently surfaced, first marked as done (complete), most recently, and when did it convert (most likely meaning SQL opp)

SELECT p.name as playbook_name
    , g.name as goal_name
    , external_id
    , external_id_name
    , MIN(case when new_state = 'ACTIVE' then timestamp END) as first_active_date
    , MAX(case when new_state = 'ACTIVE' then timestamp END) as last_active_date
    , MIN(case when new_state = 'SUPPRESSED' then timestamp END) as first_markdone_date
    , MAX(case when new_state = 'SUPPRESSED' then timestamp END) as last_markdone_date
    , ARRAY_AGG( DISTINCT (case when new_state = 'SUPPRESSED' then actioned_by_email END)) as markdone_by_array
    , MIN(case when new_state = 'CONVERTED' then timestamp END) as first_converted_date
    , MAX(case when new_state = 'CONVERTED' then timestamp END) as last_converted_date
FROM inbox_state_history ih 
LEFT JOIN playbook p ON p.id = ih.playbook_id
LEFT JOIN goal g ON g.id = p.goal_id
WHERE NEW_STATE IN ('ACTIVE', 'SUPPRESSED', 'CONVERTED')
AND timestamp > '2023-12-31' //<----ADJUST AS NEEDED
GROUP BY 1, 2, 3, 4
ORDER BY playbook_name ASC, external_id_name ASC, external_id ASC

Playbook Conversion Pivot Table

High level what the surfaced in pocus -> mark done conversion is as well as the surface -> converted ratio is. Note that conversion likely means Sales Qualified Lead opp and that records do not need to be marked done to count as converted.

WITH
  ie AS (
    SELECT
      INBOX_ENTRY_ID
    FROM
      INBOX_STATE_HISTORY ih
    WHERE
      NEW_STATE = 'ACTIVE'
      AND TIMESTAMP >= DATEADD(MONTH, -3, GETDATE()) //<----ADJUST AS NEEDED
  ),
  raw_data AS (
    SELECT
      CONCAT(g.name, ' - ', p.name) AS playbook_name,
      new_state,
      COUNT(DISTINCT (INBOX_ENTRY_ID)) AS COUNT
    FROM
      INBOX_STATE_HISTORY ih
      LEFT JOIN PLAYBOOK p ON p.id = ih.playbook_id
      LEFT JOIN GOAL g ON g.id = p.goal_id
    WHERE
      INBOX_ENTRY_ID IN (
        SELECT
          INBOX_ENTRY_ID
        FROM
          ie
      )
      AND (
        NEW_STATE LIKE '%ACTIVE%'
        OR NEW_STATE LIKE '%SUPPRESSED%'
        OR NEW_STATE LIKE '%CONVERTED%'
      )
    GROUP BY
      1,
      2
  )
SELECT
  *
FROM
  raw_data PIVOT (
    SUM(COUNT) FOR new_state IN (
      SELECT DISTINCT
        new_state
      FROM
        raw_data
    )
  )
ORDER BY
  playbook_name ASC;

Inbox States

The below diagram describes the different possible states of an inbox entry and how an inbox entry transitions between states.


There are 6 states an entry can be in:

  • Pre-Active State (in workflow):
    • PROCESSING-- has entered workflow, pending action.
  • Active States (visible in inbox):
    • ACTIVE -- currently meets all eligibiltiy criteria, not yet converted
  • Invisible active states (not visible, but still filter-eligible):
    • SUPPRESSED -- was marked done or disqualified by a user.
  • Inactive States (not visible in inbox):
    • INELIGIBLE -- not goal or playbook eligible
    • CONVERTED -- met the goal
    • SUPPRESSED_INELIGIBLE -- was suppressed, now ineligible