Monetize360

Insert Workflow Tracker

Insert or update workflow tracker records with auto-generated request ID and workflow context information

Insert Workflow Tracker

Insert or update records in workflow tracker objects. This function automatically generates a unique request ID and extracts workflow execution context (flow ID, execution ID) from the current workflow.

Technical Name: InsertWorkflowTrackerFunc

Properties

  • Execution Mode: SYNC
  • Type: NATIVE
  • Category: CRUD Operations
  • Function ID: 4a2b1cd9-7e8f-4c3b-b9d6-5f7a9b1c2d3e

Input Schema

Required Parameters

ParameterTypeDescription
mobjectIdstring (uuid)UUID of the workflow tracker Object
dataobjectData object containing workflow tracker fields

Optional Parameters

ParameterTypeDescription
idstring (uuid)UUID of existing record to update. Omit to create a new record

[Image placeholder: InsertWorkflowTracker function configuration panel]

Auto-Generated Fields

The function automatically adds these fields if not provided:

FieldDescription
request_id7-digit base32 identifier (e.g., "ABC2XYZ")
flow_idCurrent workflow ID (extracted from execution context)
execution_idCurrent execution ID (extracted from execution context)

Input Example

Create New Tracker Record

{
  "mobjectId": "workflow-tracker-mobject-uuid",
  "data": {
    "reference_field": "customer-uuid",
    "status": "in_progress",
    "notes": "Processing customer order"
  }
}

Update Existing Tracker Record

{
  "mobjectId": "workflow-tracker-mobject-uuid",
  "id": "existing-record-uuid",
  "data": {
    "status": "completed",
    "notes": "Order processed successfully"
  }
}

With Custom Request ID

{
  "mobjectId": "workflow-tracker-mobject-uuid",
  "data": {
    "request_id": "CUSTOM123",
    "reference_field": "order-uuid",
    "flow_type": "order_processing"
  }
}

Output Schema

FieldTypeDescription
idstring (uuid)Unique identifier of the created or updated record
mflowIdstring (uuid)ID of the workflow that executed this function
requestIdstringRequest ID (auto-generated or provided)
executionIdstring (uuid)ID of the workflow execution
createdBystringID of the user who created the record
createdAtstring (date-time)Timestamp when the record was created

Output Example

{
  "id": "a7b9c4d2-3e5f-4a1b-9c8d-7e6f5a4b3c2d",
  "mflowId": "f1a2b3c4-d5e6-f7a8-b9c0-d1e2f3a4b5c6",
  "requestId": "ABC2XYZ",
  "executionId": "e1f2a3b4-c5d6-e7f8-a9b0-c1d2e3f4a5b6",
  "createdBy": "user-uuid",
  "createdAt": "2024-01-20T14:30:22Z"
}

[Image placeholder: Workflow tracker output visualization]

Request ID Format

Request IDs are 7-character base32 strings using characters: ABCDEFGHJKLMNPQRSTUVWXYZ23456789 (excluding 0, 1, 8, 9 for clarity).

Examples: ABC2XYZ, KLM9NOP, 2345DEF

Use Cases

Track Workflow Execution

Track each workflow execution with a unique request ID:

{
  "mobjectId": "workflow-tracker-mobject-uuid",
  "data": {
    "reference_field": "{{context.objectId}}",
    "status": "started"
  }
}

Update Tracker Status

Update tracker status as workflow progresses:

Start → InsertWorkflowTracker(status: "started") → ProcessData → InsertWorkflowTracker(status: "completed") → End

[Image placeholder: Workflow tracker use cases]