FactoryFour Learn Center Index

Last updated August 5, 2019


Analytics Data Dictionary

Analytics User Types

This document aims to define all datapoints captured within FactoryFour. Please contact your CS Representative if you have any questions or concerns.

FactoryFour gives organizations insight into the production visibility of their products in real time. Various aspects of production get captured in various phases of production.

Notes:

  • 100 character length maximum for all varchar fields.
  • User id’s always begin with auth0|. For formatting purposes, the vertical slash is represented as a backwards slach in the following tables.

allocations

The Allocations table indexes user allocations. If the scheduler is not being used by your organization, disregard this table.

Data Item Data Type Description Example
allocation_id integer Automated indexing value of allocation 20830
day timestamptz Starting time (in whole hours) of an allocation’s expected duration. Can be null 2019-02-12 08:00:00+00
entity_id varchar(100) The task id that an allocation has been made abc123…
assigned varchar(100) User id of the user that an allocation is assigned to auth0\123abc...
duration float The amount of time (in hours) an allocation has been made 7.5

datapoints

Datapoints can be created by extracting associated values from the order form or manually adding to an order in the datapoints mod.

Data Item Data Type Description Example
dp_id varchar(100) Automated indexing value of allocation abc123…
parent varchar(100) Id of parent the datapoint is associated to f4::order::abc123…, f4::task::abc123…
format varchar(100) Type format (always a string) string
type varchar(100) Name of datapoint shipping_type
created_at timestamptz Timestamp a datapoint was created 2019-02-12 08:00:00+00
content_value varchar(300) Value of a datapoint Standard 5 Days
deleted boolean Inticator of deleted datapoint true (if deleted after Oct. 7th)

entity

An entity is defined as either a task, job, or workflow within the factoryfour system. The last four columns of the table (created_by, initiated_by, template_modified_by, started_by) began populating on June 2nd, 2019. All entities created before this date will and all entities that are not type workflow will be null. The archived column began indexing on August 6th, 2019.

Data Item Data Type Description Example
allocated boolean If the entity has been scheduled t or f
laststatus_change timestamptz When the entity changes status 2018-07-19 20:28:46.893+00
alloc_max_date timestamptz Latest date a task has been allocated to 2018-07-18 00:00:00.000+00
alloc_min_date timestamptz Earliest date a task has been allocated to 2018-07-19 00:00:00.000+00
alloc_number_tasks integer Number of all tasks and subtasks in workflow 3
alloc_number_allocated_tasks integer Number of tasks that have been completely allocated out of alloc_number_tasks 4
initiated boolean Describes whether a workflow is initiated. Only shows t if type is workflow and format is order t or null
archived boolean Indicates whether an entity (workflow, job, or task) has been archived t or null
created_at timestamptz Time entity was created i.e. when a workflow was added to an order 2018-07-19 15:50:47.295+00
alloc_total_duration float Sum of all expected durations for the entity 2
alloc_total_allocated_duration float Sum of all allocated durations 3.5
alloc_total_assigned_duration float Sum of all assigned allocations 1
entity_id varchar(100) Unique id of the entity abc123…
key varchar(100) start if type is workflow is format is job or order. Otherwise, it represents the entity id of the task abc123…
workflow_parent varchar(100) Parent workflow field which is typically used for fast queries. For a workflow entity object, this will typically be itself abc123…
parent varchar(100) Order id the entity is associated to f4::order::abc123…
format string If entity is a workflow, then format is order or job. If entity is a task, then format is null. job or order
code varchar(100) Key name of entity. Numerical value at the end of the value is the revision number of the job/workflow if type is workflow shipping_prep
type string Entity type task or workflow
status string Status of the entity standby inactive active error complete
name string Name of entity seen by the user, null if format is order Shipping, QA Job
workflow_initiator varchar(100) Highest level workflow that initiated this entity - workflow that was added to the order. Null if format is order abc123…
workflow_member varchar(100) Workflow or job id the entity immediately belongs to. Null if format is order abc123…
duration float The amount of time (in hours) an allocation in the scheduler has been made. 0.5
created_by varchar(100) Defines whether a workflow of order format was added by a user or a rule, user_id or rule_id auth0\abc123… or internal_ruleabc123…
initiated_by varchar(100) Person that clicks the initiate button auth0\abc123… or internal_ruleabc123…
template_modified_by varchar(100) Person or rule who renames the workflow or selects a different workflow from the dropdown in the order auth0\abc123… or internal_ruleabc123…
started_by varchar(100) Person who starts the workflow. could be the same id as initiated_by is the user clicked Initiate & Start button auth0\abc123…

entity_event

The entity_event table indexes each status change of entities (task, workflow) within FactoryFour. Status changes are accomplished manually or via rules. Status changes from false to true are generated when a workflow is archived.

  • user_credit - Calculates total duration for each user check-in interaction
  • work_credit - Calculates the average duration for user check-in if a user checks into more than one task at the same time. Will always be generated for an event if there is a user credit against it.
Data Item Data Type Description Example
timestamp timestamptz Time when event occurred 2018-07-19 18:32:37.171+00
event_id varchar(100) Unique identifier for specific event change abcd123-def…
entity_id varchar(100) Unique id of the entity abc123…
status_from varchar(100) Status that entity held before the event inactive active complete error standby false
status_to varchar(100) Status that entity changed to at the end of the event active complete error standby true
entity_type varchar(100) Type of entity that the event is occurring on. Null if type is user_credit task workflow
format varchar(100) Type of workflow. Null if type is user_credit job order
code varchar(100) Code representing the current workflow with revision number. Could be the code of the workflow or job color_wrokflow\2
parent_code varchar(100) Code representing the parent workflow with revision number. Could be the code of the workflow. Always null unless format is job or job task Color_Workflow\3
workflow_member varchar(100) Workflow this task immediately belongs abc123..
workflow_parent varchar(100) Parent workflow field which is typically used for fast queries. For a workflow entity object, this will typically be itself abc123…
workflow_initiator varchar(100) Highest level workflow that initiated this entity - workflow that was added to the order. abc123…
parent varchar(100) Order to which the event is associated to f4::order::abc123
type varchar(100) The type of event that has occurred status user_credit work_credit
base_code varchar(100) Code representing the current workflow without revision number. Could be the code of the workflow or job color_workflow
parent_base_code varchar(100) Code representing the parent workflow without revision number. Could be the code of the workflow. Always null unless format is job or job task color_workflow
user_id varchar(100) Identifier of the user that checked into the task. Null if type is not user_credit or work_credit auth0\abc123…
duration integer Milliseconds between the status change 9312031

metrics_number

The Metrics Number table indexes number metric information submitted from the task form.

Data Item Data Type Description Example
name varchar(100) Name of metric InnerDiameter
value float Value of metric 44.21
task_form_id varchar(100) Unique id of the task form the associated metric abc123
user_id varchar(100) User that submitted the task form auth0\abc123…
submitted_at timestamptz Time when task form was submitted 2019-07-19 18:35:28.404+00
metric_id varchar(100) unique id of the metric abc123-…

metrics_relationship

The Metrics Relationship table indexes relationship of each metric along with its parent (order/task)

Data Item Data Type Description Example
relationship_id integer Unique identifier for the metric relationship 15
metric_type varchar(100) Type of the metric string, number
parent_type varchar(100) Type of parent for the metric relationship task, order
parent_id varchar(100) Unique id of parent for the metric relationship abc123…
metric_id varchar(100) Unique id of the metric abc123-…

metrics_string

The Metrics String table indexes string metric information submitted from the task form.

Data Item Data Type Description Example
name varchar(100) Name of metric Error Cause
value varchar(300) Value of metric Tool Breakage
task_form_id varchar(100) Unique id of the task form the associated metric abc123
user_id varchar(100) User that submitted the task form auth0\abc123…
submitted_at timestamptz Time when task form was submitted 2019-07-19 18:35:28.404+00
metric_id varchar(100) Unique id of the metric abc123-…

order_assigned

Users that have been assigned to an order appear are indexed. If a user becomes unassigned, or they unassign themselves from an order, the instance disappears from the table.

Data Item Data Type Description Example
assign_id integer index value of assignment 15
order_id varchar(100) Order unique id abc123…
user_id varchar(100) User that has been assigned to the order auth0\abc123…

order_event

The Order Event table indexes event logs for changes of order status, production_stage, and archive.

Data Item Data Type Description Example
timestamp timestamptz Time when event completed 2019-07-19 18:32:04.603+00
event_id varchar(100) Unique id for order status change abc123-…
order_id varchar(100) Unique id for the order abc123…
type varchar(100) Order events can either be production stage changes or status changes production_stage status archive
parent varchar(100) The route through which an order was made. Either in association with a customer, patient or null f4::customer::abc123…
orgid varchar(100) The organization with which the order is associated. Null for timestamps after 10/15/2018 abc123… or null
status_from varchar(100) Previous production stage name or order status active or Production
status_to varchar(100) New production stage name or status complete or QA
user_id varchar(100) Unique id of user that made the change. Specified for order_archive events. auth0\user123

order_participants

For the purposes of analytics, the org_ids of all roles will be the same. The following are the different roles an organization could have.

  • org|req - the org that submits an orders
  • org|fab - org that is creating the product
  • org|dist - org that distributes the product

As the data is structured so that each order has a request, fabircator, and distributor, the order_id’s in the order_participants table will be triplicated.

Data Item Data Type Description Example
order_id varchar(100) Order unique id abc123…
org_id varchar(100) Organization unique id abc123…
type varchar(100) Type of organization factoryfour
role varchar(100) Role of organization. org\req org\fab org\dist

orders

The Orders Table indexes up to date information for orders.

Data Item Data Type Description Example
created_at timestamptz Time when the order was created 2018-07-19 00:00:00.000+00
device_revision integer The revision of the order form that the order was created with 12
order_id varchar(100) Unique alphanumerical order identifier. Gets appended to order_parents in other tables that begin with f4::order:: abc123…
device_id varchar(100) Unique id of the order form used to create the order v2-abc123…
status string Status of order in FactoryFour incomplete pending progress error complete
parent varchar(100) Unique id of customer the order is associated to. Null if order has no customer association. f4::customer::abc123…
creator varchar(100) Unique id of the user or rule that created the order rule…, auth0…
order_name varchar(100) Auto-generated FactoryFour term for an order powerful_ship
device_name varchar(100) Name of the order form v2-abc123-…
production_stage varchar(100) Current production stage of the order. Incomplete if no production stage exists for the order Quality Check
is_external boolean Describes whether order was submitted via a external org that exists on the FactoryFour platform t or f
needed_date varchar(100) When the customer requests the order to be completed. Null if no date selected in order overview for the field 2019-07-19 07:00:00+00
due_date varchar(100) When the fabricator projects the order will be completed - can only be set by an Admin. Null if no date selected in order overview for the field 2019-07-12 07:00:00+00
submitted_date varchar(100) Latest date the order was submitted 2019-07-03 17:59:52.089+00
user_defined_id varchar(100) User defined identifier that has been extracted from the order form Test123

permission

The Permission table indexes permission information for entity, datapoint, entity_event, tags, tag_event.

Data Item Data Type Description Example
perm_id varchar(100) Entity_id (workflows, tasks, job) dp_id and event_id abc123…, abc-123
parent_id varchar(100) Order id that the perm_id is associated to f4::order::abc123…
get varchar(100) Defines users with permission to view the perm_id / parent_id (org_id by default or rarely user_id) f4::Organization::abc123…, f4::User::auth0\123abc…
type varchar(100) Defines type of the permission entity, tag-event, order-tag, etc

users

The Users table indexes user information for each organization.

Data Item Data Type Description Example
user_id varchar(100) Unique identifier of user in your organization auth0\123abc…
org_id varchar(100) The organization that the user was added to abc123…
first_name varchar(100) First name of user Thomas
last_name varchar(100) Last name of user Edison
Name varchar(100) Full name of user Thomas Edison
email varchar(100) Email address used to set up the user’s account thomas.edison@factoryfour.com
deleted boolean Indicator of whether an user is deleted true/false
modified_at timestamptz Timestamp of when user document is modified 2019-10-09 18:35:28.404+00

order_archived

The Order Archived Table indexes archived order information with org_id of whom archived the order.

Data Item Data Type Description Example
id integer index value of order_archived object 15
order_id varchar(100) Order unique id abc123…
org_id varchar(100) The organization unique id archived the order abc123…
archived boolean Indicator of whether an order is archived true/false

tags

The Tags table indexes order and task tag information.

Data Item Data Type Description Example
tag_id varchar(100) Unique identifier for tag abc123…
tag_group varchar(100) Key for the tag priority
tag_value varchar(100) Value for the tag high
parent varchar(100) Id of parent the tag is associated to f4::order::abc123..., f4::task::abc123...
modified_at timestamptz Timestamp indicating the last modified time for the tag (in UTC) 2019-02-12 08:00:00+00

tag_event

The Tag Event table indexes event logs for order and task tags.

Data Item Data Type Description Example
timestamp timestamptz Timestamp indicating when the event occurred (in UTC) 2019-02-12 08:00:00+00
tag_event_id varchar(100) Unique identifier for tag event abc123…
type varchar(100) Type of the tag event add, remove
tag_group varchar(100) Key for the tag priority
tag_value varchar(100) Value for the tag high
parent varchar(100) Id of parent the tag is associated to f4::order::abc123..., f4::task::abc123...
user_id varchar(100) Id of the user created the event. Can be null if tag was added/removed via rule abc123…

Search the FactoryFour Learn Center


FactoryFour Learn Center