Action data model

Updated:

A corrective or preventive action (CAPA)

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNo
created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
numberstringNoAction number, e.g. CAPA-0017
namestringNo
descriptionstringNo
typeenumNoValues: CORRECTIVE, PREVENTIVE, SUPPLIER_CORRECTIVE, OTHER
original_typestringNoThe vendor's own action type or template name
statusenumNoNormalized status of a quality record Values: OPEN, IN_PROGRESS, IN_REVIEW, CLOSED, CANCELLED
lifecycle_statestringNoVendor's own state or workflow step name
prioritystringNoVendor priority value
issue_idsstring[]NoThe QmsIssue IDs this action addresses
affected_itemsQmsAffectedItem[]No
affected_items[].part_idstringNoThe PlmPart (revision) ID, when the same vendor also provides PLM
affected_items[].document_idstringNoThe PlmDocument ID, when the same vendor also provides PLM
affected_items[].part_numberstringNo
affected_items[].revisionstringNo
affected_items[].lot_numberstringNo
affected_items[].serial_numberstringNo
affected_items[].quantitynumberNoQuantity affected
root_causestringNo
supplier_namestringNo
user_idstringNoOwner (reference to HrisEmployee)
due_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
closed_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
verified_atstring (date-time)NoWhen the effectiveness check was completed (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
file_idsstring[]NoAttachment IDs retrievable from StorageFile
urlstringNoDeep link to the vendor UI
metadataQmsMetadata[]No
metadata[].idstringNoThe ID of the custom field definition (from the metadata/metadata endpoint).
metadata[].slugstringNoThe integration's API name (key) of an existing custom field.
metadata[].valueobjectNoThe field's value, typed by format.
metadata[].namespacestringNo
metadata[].formatenumNoThe data type of the custom field, which determines how value is formatted. Values: TEXT, NUMBER, DATE, BOOLEAN, FILE, TEXTAREA, SINGLE_SELECT, MULTIPLE_SELECT, MEASUREMENT, PRICE, YES_NO, CURRENCY, URL
metadata[].extra_dataobjectNo

TypeScript

TypeScript
export type QmsAction = {
	id?: string;
	created_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	number?: string; // Action number, e.g. CAPA-0017
	name?: string;
	description?: string;
	type?: 'CORRECTIVE' | 'PREVENTIVE' | 'SUPPLIER_CORRECTIVE' | 'OTHER';
	original_type?: string; // The vendor's own action type or template name
	status?: 'OPEN' | 'IN_PROGRESS' | 'IN_REVIEW' | 'CLOSED' | 'CANCELLED'; // Normalized status of a quality record
	lifecycle_state?: string; // Vendor's own state or workflow step name
	priority?: string; // Vendor priority value
	issue_ids?: string[]; // The QmsIssue IDs this action addresses
	affected_items?: [];
	root_cause?: string;
	supplier_name?: string;
	user_id?: string; // Owner (reference to HrisEmployee)
	due_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	closed_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	verified_at?: string-time; // When the effectiveness check was completed (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	file_ids?: string[]; // Attachment IDs retrievable from StorageFile
	url?: string; // Deep link to the vendor UI
	metadata?: [];
	raw?: any; // Raw data from integration
} 

Zod

Zod
import { z } from 'zod';

export const ZodQmsAction = z.object({
	id: z.string().optional(),
	created_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	number: z.string().optional().describe("Action number, e.g. CAPA-0017"),
	name: z.string().optional(),
	description: z.string().optional(),
	type: z.enum("CORRECTIVE", "PREVENTIVE", "SUPPLIER_CORRECTIVE", "OTHER").optional(),
	original_type: z.string().optional().describe("The vendor's own action type or template name"),
	status: z.enum("OPEN", "IN_PROGRESS", "IN_REVIEW", "CLOSED", "CANCELLED").optional().describe("Normalized status of a quality record"),
	lifecycle_state: z.string().optional().describe("Vendor's own state or workflow step name"),
	priority: z.string().optional().describe("Vendor priority value"),
	issue_ids: z.array().optional().describe("The QmsIssue IDs this action addresses"),
	affected_items: z.array().optional(),
	root_cause: z.string().optional(),
	supplier_name: z.string().optional(),
	user_id: z.string().optional().describe("Owner (reference to HrisEmployee)"),
	due_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	closed_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	verified_at: z.string-time().optional().describe("When the effectiveness check was completed (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	file_ids: z.array().optional().describe("Attachment IDs retrievable from StorageFile"),
	url: z.string().optional().describe("Deep link to the vendor UI"),
	metadata: z.array().optional(),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class QmsActionType(str, Enum):
	CORRECTIVE = 'CORRECTIVE'
	PREVENTIVE = 'PREVENTIVE'
	SUPPLIER_CORRECTIVE = 'SUPPLIER_CORRECTIVE'
	OTHER = 'OTHER'

@dataclasses.dataclass
class QmsActionStatus(str, Enum):
	OPEN = 'OPEN'
	IN_PROGRESS = 'IN_PROGRESS'
	IN_REVIEW = 'IN_REVIEW'
	CLOSED = 'CLOSED'
	CANCELLED = 'CANCELLED'

@dataclasses.dataclass
class QmsAction:
	id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""Action number, e.g. CAPA-0017"""
	number: Optional[str]
	name: Optional[str]
	description: Optional[str]
	type: Optional[QmsActionType]
	"""The vendor's own action type or template name"""
	original_type: Optional[str]
	"""Normalized status of a quality record"""
	status: Optional[QmsActionStatus]
	"""Vendor's own state or workflow step name"""
	lifecycle_state: Optional[str]
	"""Vendor priority value"""
	priority: Optional[str]
	"""The QmsIssue IDs this action addresses"""
	issue_ids: Optional[List[List[str]]]
	affected_items: Optional[PropertyQmsActionAffected_items]
	root_cause: Optional[str]
	supplier_name: Optional[str]
	"""Owner (reference to HrisEmployee)"""
	user_id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	due_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	closed_at: Optional[str]
	"""When the effectiveness check was completed (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	verified_at: Optional[str]
	"""Attachment IDs retrievable from StorageFile"""
	file_ids: Optional[List[List[str]]]
	"""Deep link to the vendor UI"""
	url: Optional[str]
	metadata: Optional[PropertyQmsActionMetadata]
Are we missing anything? Let us know
Was this page helpful?