@daeda/mcp-pro 0.1.27 → 0.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3542 -361
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -637,17 +637,41 @@ var ACTION_TYPE_CATALOG_ROW_SCHEMA = z6.object({
637
637
  connectionType: z6.string(),
638
638
  usageCount: z6.number(),
639
639
  exampleActionsJson: z6.string(),
640
- fieldSchemaJson: z6.string()
640
+ recommendedCreateExamplesJson: z6.string(),
641
+ fieldSchemaJson: z6.string(),
642
+ resourceRequirementsJson: z6.string(),
643
+ createGuidanceText: z6.string()
641
644
  });
642
- var EVENT_TYPE_CATALOG_ROW_SCHEMA = z6.object({
645
+ var ENROLLMENT_TRIGGER_CATALOG_ROW_SCHEMA = z6.object({
646
+ catalogId: z6.string(),
647
+ criteriaType: z6.string(),
648
+ shortcutKind: z6.string(),
643
649
  eventTypeId: z6.string(),
644
650
  name: z6.string(),
645
- description: z6.string()
651
+ description: z6.string(),
652
+ requiresRefinementFilters: z6.boolean(),
653
+ refinementNote: z6.string(),
654
+ officialFilterTemplate: z6.string(),
655
+ officialFiltersExampleJson: z6.string(),
656
+ officialCriteriaExampleJson: z6.string(),
657
+ criteriaShapeJson: z6.string(),
658
+ triggerCategoryId: z6.string(),
659
+ modernCategoryId: z6.string(),
660
+ triggerGroupLabel: z6.string(),
661
+ requiredScopesJson: z6.string(),
662
+ requiredGatesJson: z6.string(),
663
+ requiredObjectTypeIdsJson: z6.string(),
664
+ parameterSchemaJson: z6.string(),
665
+ sampleWorkflowId: z6.string(),
666
+ sampleWorkflowName: z6.string(),
667
+ usageGuidance: z6.string(),
668
+ preferredForJson: z6.string(),
669
+ avoidForJson: z6.string()
646
670
  });
647
671
  var workflowsPayloadSchema = z6.object({
648
672
  workflows: z6.array(WORKFLOW_ROW_SCHEMA),
649
673
  actionTypeCatalog: z6.array(ACTION_TYPE_CATALOG_ROW_SCHEMA),
650
- eventTypeCatalog: z6.array(EVENT_TYPE_CATALOG_ROW_SCHEMA)
674
+ enrollmentTriggerCatalog: z6.array(ENROLLMENT_TRIGGER_CATALOG_ROW_SCHEMA)
651
675
  });
652
676
  var TABLE_STATEMENTS6 = [
653
677
  `CREATE TABLE IF NOT EXISTS workflows (
@@ -678,36 +702,75 @@ var TABLE_STATEMENTS6 = [
678
702
  connection_type TEXT NOT NULL,
679
703
  usage_count INTEGER NOT NULL,
680
704
  example_actions_json TEXT NOT NULL,
681
- field_schema_json TEXT NOT NULL
705
+ recommended_create_examples_json TEXT NOT NULL,
706
+ field_schema_json TEXT NOT NULL,
707
+ resource_requirements_json TEXT NOT NULL,
708
+ create_guidance_text TEXT NOT NULL
682
709
  )`,
683
710
  `CREATE INDEX IF NOT EXISTS idx_action_type_catalog_category ON action_type_catalog(category)`,
684
- `CREATE TABLE IF NOT EXISTS workflow_event_types (
685
- event_type_id TEXT NOT NULL PRIMARY KEY,
711
+ `DROP TABLE IF EXISTS workflow_event_types`,
712
+ `CREATE TABLE IF NOT EXISTS workflow_enrollment_triggers (
713
+ catalog_id TEXT NOT NULL PRIMARY KEY,
714
+ criteria_type TEXT NOT NULL,
715
+ shortcut_kind TEXT NOT NULL,
716
+ event_type_id TEXT NOT NULL,
686
717
  name TEXT NOT NULL,
687
- description TEXT NOT NULL
718
+ description TEXT NOT NULL,
719
+ requires_refinement_filters TEXT NOT NULL,
720
+ refinement_note TEXT NOT NULL,
721
+ official_filter_template TEXT NOT NULL,
722
+ official_filters_example_json TEXT NOT NULL,
723
+ official_criteria_example_json TEXT NOT NULL,
724
+ criteria_shape_json TEXT NOT NULL,
725
+ trigger_category_id TEXT NOT NULL,
726
+ modern_category_id TEXT NOT NULL,
727
+ trigger_group_label TEXT NOT NULL,
728
+ required_scopes_json TEXT NOT NULL,
729
+ required_gates_json TEXT NOT NULL,
730
+ required_object_type_ids_json TEXT NOT NULL,
731
+ parameter_schema_json TEXT NOT NULL,
732
+ sample_workflow_id TEXT NOT NULL,
733
+ sample_workflow_name TEXT NOT NULL,
734
+ usage_guidance TEXT NOT NULL,
735
+ preferred_for_json TEXT NOT NULL,
736
+ avoid_for_json TEXT NOT NULL
688
737
  )`
689
738
  ];
690
739
  var QUERY_DOCS7 = [
691
740
  '- The "workflows" table has: workflow_id, name, description, type, flow_type, object_type_id, is_enabled, created_at, updated_at, revision_id, start_action_id, enrollment_criteria_json, suppression_list_ids_json, time_windows_json, blocked_dates_json, actions_json',
692
- '- The "action_type_catalog" table has: action_type_id, name, category, connection_type, usage_count, example_actions_json, field_schema_json',
741
+ '- The "action_type_catalog" table has: action_type_id, name, category, connection_type, usage_count, example_actions_json, recommended_create_examples_json, field_schema_json, resource_requirements_json, create_guidance_text',
693
742
  "- actions_json contains synced workflow graphs for portal reference, but may include unsupported or portal-specific actions. Do not use it to discover action types for new workflows.",
694
743
  "- Filter active workflows: WHERE is_enabled = 'true'",
695
744
  "- Use json_extract_string() to query JSON fields like enrollment_criteria_json or actions_json",
696
745
  "- Query action_type_catalog to discover supported workflow action types before constructing workflows",
697
746
  "- category is 'built_in' for the supported workflow action types surfaced to the LLM",
698
- "- field_schema_json documents required fields for supported actions; example_actions_json provides up to 3 curated full-action examples from validated workflow definition fixtures",
747
+ "- field_schema_json documents required fields for supported actions; example_actions_json contains curated fixture-derived examples for reference",
748
+ "- Use recommended_create_examples_json as the preferred template source when constructing new workflow actions",
749
+ "- Use resource_requirements_json to see whether an action needs IDs like listId, user_ids, flow_id, sequenceId, subscriptionId, inbox IDs, or association label IDs before creation",
750
+ "- create_guidance_text captures action-specific creation tips discovered through live validation",
699
751
  "- Workflow suppression lists can be cross-referenced: json_extract_string(workflows.suppression_list_ids_json, '$[0]') = lists.list_id",
700
- '- The "workflow_event_types" table has: event_type_id, name, description',
701
- "- Query workflow_event_types to find the correct eventTypeId for workflow enrollment criteria UNIFIED_EVENTS branches",
752
+ '- The "workflow_enrollment_triggers" table has: catalog_id, criteria_type, shortcut_kind, event_type_id, name, description, requires_refinement_filters, refinement_note, official_filter_template, official_filters_example_json, official_criteria_example_json, criteria_shape_json, trigger_category_id, modern_category_id, trigger_group_label, required_scopes_json, required_gates_json, required_object_type_ids_json, parameter_schema_json, sample_workflow_id, sample_workflow_name, usage_guidance, preferred_for_json, avoid_for_json',
753
+ "- Query workflow_enrollment_triggers to find valid eventTypeId values for EVENT_BASED enrollment criteria UNIFIED_EVENTS branches by filtering criteria_type = 'EVENT_BASED' and shortcut_kind = 'EVENT_TRIGGER_SHORTCUT'",
702
754
  "- IMPORTANT: eventTypeId identifies the EVENT (e.g. '4-655002' for property change), NOT the CRM object type (e.g. '0-3' for deals)",
703
- "- Common: '4-655002' (property changed), '4-1639801' (form submission), '4-1463224' (object created)",
704
- "- WARNING: EVENT_BASED enrollment with '4-655002' (property changed) requires event-specific refinement filters (e.g. hs_property_name, hs_property_value) embedded in the event filter branch \u2014 standard PROPERTY filters are NOT sufficient and will cause errors in the HubSpot UI",
705
- "- For 'when property X changes to Y' scenarios, prefer LIST_BASED enrollment with re-enrollment triggers on that property instead of EVENT_BASED with '4-655002'"
755
+ "- Query workflow_enrollment_triggers when using create_workflow/update_workflow enrollment_trigger shortcuts keyed by catalog_id, but only for rows where shortcut_kind = 'EVENT_TRIGGER_SHORTCUT'",
756
+ "- catalog_id maps browser trigger catalog entries and synthetic enrollment examples to confirmed or curated API payload templates",
757
+ "- criteria_type tells you whether the row is EVENT_BASED, LIST_BASED, or MANUAL",
758
+ "- shortcut_kind = 'EVENT_TRIGGER_SHORTCUT' means the row can be used with enrollment_trigger; shortcut_kind = 'CRITERIA_EXAMPLE' means use it as a reference when hand-authoring enrollment_criteria",
759
+ "- event_type_id is only meaningful for EVENT_BASED rows; blank values mean the row is a LIST_BASED or MANUAL reference example",
760
+ "- requires_refinement_filters = 'true' means the event needs event-specific PROPERTY filters inside the event branch; read refinement_note and official_filters_example_json before hand-authoring criteria",
761
+ "- official_filter_template identifies which confirmed payload family HubSpot accepted for that trigger",
762
+ "- official_filters_example_json contains the confirmed event-branch refinement filters, if any",
763
+ "- official_criteria_example_json contains a full enrollmentCriteria example for the row's criteria_type",
764
+ "- criteria_shape_json contains a reusable skeleton with placeholders for hand-authoring enrollment_criteria",
765
+ "- parameter_schema_json describes the extra fields required by each enrollment_trigger shortcut; it will be empty for LIST_BASED and MANUAL reference rows",
766
+ "- required_object_type_ids_json constrains which workflow object_type_id values can use the trigger",
767
+ "- sample_workflow_id and sample_workflow_name point to a real harvested workflow definition for reference",
768
+ "- usage_guidance, preferred_for_json, and avoid_for_json explain when to choose LIST_BASED, MANUAL, or EVENT_BASED patterns"
706
769
  ];
707
770
  var workflowsPlugin = {
708
771
  name: "workflows",
709
- schemaVersion: 4,
710
- tableNames: ["workflows", "action_type_catalog", "workflow_event_types"],
772
+ schemaVersion: 9,
773
+ tableNames: ["workflows", "action_type_catalog", "workflow_enrollment_triggers"],
711
774
  ddlStatements: TABLE_STATEMENTS6,
712
775
  initStrategy: "eager",
713
776
  queryDocs: QUERY_DOCS7,
@@ -722,7 +785,10 @@ var workflowsPlugin = {
722
785
  `SELECT COUNT(*) as count FROM action_type_catalog`
723
786
  );
724
787
  const eventTypeReader = await conn.runAndReadAll(
725
- `SELECT COUNT(*) as count FROM workflow_event_types`
788
+ `SELECT COUNT(DISTINCT event_type_id) as count FROM workflow_enrollment_triggers WHERE event_type_id != ''`
789
+ );
790
+ const enrollmentTriggerReader = await conn.runAndReadAll(
791
+ `SELECT COUNT(*) as count FROM workflow_enrollment_triggers`
726
792
  );
727
793
  const workflowCount = Number(
728
794
  workflowsReader.getRowObjects()[0].count
@@ -733,6 +799,9 @@ var workflowsPlugin = {
733
799
  const eventTypeCount = Number(
734
800
  eventTypeReader.getRowObjects()[0].count
735
801
  );
802
+ const enrollmentTriggerCount = Number(
803
+ enrollmentTriggerReader.getRowObjects()[0].count
804
+ );
736
805
  let syncError = null;
737
806
  try {
738
807
  const errorReader = await conn.runAndReadAll(
@@ -751,6 +820,7 @@ var workflowsPlugin = {
751
820
  workflowCount,
752
821
  actionTypeCount,
753
822
  eventTypeCount,
823
+ enrollmentTriggerCount,
754
824
  ...syncError ? { syncError } : {}
755
825
  }
756
826
  };
@@ -784,14 +854,38 @@ var workflowsPlugin = {
784
854
  parsed.actionTypeCatalog.map((row) => row.connectionType),
785
855
  parsed.actionTypeCatalog.map((row) => String(row.usageCount)),
786
856
  parsed.actionTypeCatalog.map((row) => row.exampleActionsJson),
787
- parsed.actionTypeCatalog.map((row) => row.fieldSchemaJson)
857
+ parsed.actionTypeCatalog.map((row) => row.recommendedCreateExamplesJson),
858
+ parsed.actionTypeCatalog.map((row) => row.fieldSchemaJson),
859
+ parsed.actionTypeCatalog.map((row) => row.resourceRequirementsJson),
860
+ parsed.actionTypeCatalog.map((row) => row.createGuidanceText)
788
861
  ])
789
862
  ),
790
863
  Effect7.flatMap(
791
- () => replaceTable("workflow_event_types", [
792
- parsed.eventTypeCatalog.map((row) => row.eventTypeId),
793
- parsed.eventTypeCatalog.map((row) => row.name),
794
- parsed.eventTypeCatalog.map((row) => row.description)
864
+ () => replaceTable("workflow_enrollment_triggers", [
865
+ parsed.enrollmentTriggerCatalog.map((row) => row.catalogId),
866
+ parsed.enrollmentTriggerCatalog.map((row) => row.criteriaType),
867
+ parsed.enrollmentTriggerCatalog.map((row) => row.shortcutKind),
868
+ parsed.enrollmentTriggerCatalog.map((row) => row.eventTypeId),
869
+ parsed.enrollmentTriggerCatalog.map((row) => row.name),
870
+ parsed.enrollmentTriggerCatalog.map((row) => row.description),
871
+ parsed.enrollmentTriggerCatalog.map((row) => String(row.requiresRefinementFilters)),
872
+ parsed.enrollmentTriggerCatalog.map((row) => row.refinementNote),
873
+ parsed.enrollmentTriggerCatalog.map((row) => row.officialFilterTemplate),
874
+ parsed.enrollmentTriggerCatalog.map((row) => row.officialFiltersExampleJson),
875
+ parsed.enrollmentTriggerCatalog.map((row) => row.officialCriteriaExampleJson),
876
+ parsed.enrollmentTriggerCatalog.map((row) => row.criteriaShapeJson),
877
+ parsed.enrollmentTriggerCatalog.map((row) => row.triggerCategoryId),
878
+ parsed.enrollmentTriggerCatalog.map((row) => row.modernCategoryId),
879
+ parsed.enrollmentTriggerCatalog.map((row) => row.triggerGroupLabel),
880
+ parsed.enrollmentTriggerCatalog.map((row) => row.requiredScopesJson),
881
+ parsed.enrollmentTriggerCatalog.map((row) => row.requiredGatesJson),
882
+ parsed.enrollmentTriggerCatalog.map((row) => row.requiredObjectTypeIdsJson),
883
+ parsed.enrollmentTriggerCatalog.map((row) => row.parameterSchemaJson),
884
+ parsed.enrollmentTriggerCatalog.map((row) => row.sampleWorkflowId),
885
+ parsed.enrollmentTriggerCatalog.map((row) => row.sampleWorkflowName),
886
+ parsed.enrollmentTriggerCatalog.map((row) => row.usageGuidance),
887
+ parsed.enrollmentTriggerCatalog.map((row) => row.preferredForJson),
888
+ parsed.enrollmentTriggerCatalog.map((row) => row.avoidForJson)
795
889
  ])
796
890
  ),
797
891
  Effect7.asVoid
@@ -1333,7 +1427,7 @@ var ClientStateSchema = z12.object({
1333
1427
  selectedPortalId: z12.number().nullable()
1334
1428
  });
1335
1429
  var SyncStatusSchema = z12.enum(["NOT_STARTED", "DOWNLOADING", "PROCESSING", "PARTIAL", "SYNCED", "FAILED"]);
1336
- var PluginSyncStatusSchema = z12.enum(["NOT_STARTED", "SYNCING", "SYNCED", "FAILED"]);
1430
+ var PluginSyncStatusSchema = z12.enum(["NOT_STARTED", "SYNCING", "SYNCED", "PARTIAL", "FAILED"]);
1337
1431
  var SyncPluginItemSchema = z12.object({
1338
1432
  name: z12.string(),
1339
1433
  status: PluginSyncStatusSchema,
@@ -3989,7 +4083,7 @@ var upsertArtifact = (artifacts, input, updatedAt) => {
3989
4083
  ];
3990
4084
  };
3991
4085
  var upsertPlugin = (plugins, input, updatedAt) => {
3992
- const errorValue = input.status === "FAILED" ? input.error ?? null : null;
4086
+ const errorValue = input.status === "FAILED" || input.status === "PARTIAL" ? input.error ?? null : null;
3993
4087
  let didUpdate = false;
3994
4088
  const nextPlugins = plugins.map((plugin) => {
3995
4089
  if (plugin.name !== input.pluginName) {
@@ -4000,7 +4094,7 @@ var upsertPlugin = (plugins, input, updatedAt) => {
4000
4094
  name: input.pluginName,
4001
4095
  status: input.status,
4002
4096
  error: errorValue,
4003
- lastSynced: input.lastSynced !== void 0 ? input.lastSynced : input.status === "SYNCED" ? updatedAt : plugin.lastSynced ?? null,
4097
+ lastSynced: input.lastSynced !== void 0 ? input.lastSynced : input.status === "SYNCED" || input.status === "PARTIAL" ? updatedAt : plugin.lastSynced ?? null,
4004
4098
  sourcePath: input.sourcePath ?? plugin.sourcePath ?? null,
4005
4099
  updatedAt
4006
4100
  };
@@ -4014,7 +4108,7 @@ var upsertPlugin = (plugins, input, updatedAt) => {
4014
4108
  name: input.pluginName,
4015
4109
  status: input.status,
4016
4110
  error: errorValue,
4017
- lastSynced: input.lastSynced !== void 0 ? input.lastSynced : input.status === "SYNCED" ? updatedAt : null,
4111
+ lastSynced: input.lastSynced !== void 0 ? input.lastSynced : input.status === "SYNCED" || input.status === "PARTIAL" ? updatedAt : null,
4018
4112
  sourcePath: input.sourcePath ?? null,
4019
4113
  updatedAt
4020
4114
  }
@@ -4433,31 +4527,11 @@ var PortalDataLiveBase = Layer7.effect(
4433
4527
  requireMasterConnection(input.portalId, `syncPluginPayload:${input.pluginName}`),
4434
4528
  Effect33.flatMap(
4435
4529
  () => pipe21(
4436
- swallowPortalFileStateError(
4437
- portalFileState.updatePluginStatus({
4438
- portalId: input.portalId,
4439
- pluginName: input.pluginName,
4440
- status: "SYNCING",
4441
- sourcePath: input.source.kind === "jsonPath" ? input.source.jsonPath : null
4442
- })
4443
- ),
4444
- Effect33.flatMap(
4445
- () => duckDb.syncPlugin({
4446
- portalId: input.portalId,
4447
- pluginName: input.pluginName,
4448
- source: input.source
4449
- })
4450
- ),
4451
- Effect33.flatMap(
4452
- () => swallowPortalFileStateError(
4453
- portalFileState.updatePluginStatus({
4454
- portalId: input.portalId,
4455
- pluginName: input.pluginName,
4456
- status: "SYNCED",
4457
- sourcePath: input.source.kind === "jsonPath" ? input.source.jsonPath : null
4458
- })
4459
- )
4460
- ),
4530
+ duckDb.syncPlugin({
4531
+ portalId: input.portalId,
4532
+ pluginName: input.pluginName,
4533
+ source: input.source
4534
+ }),
4461
4535
  Effect33.flatMap(
4462
4536
  () => swallowPortalFileStateError(portalFileState.touchSyncedAt(input.portalId))
4463
4537
  ),
@@ -4467,23 +4541,9 @@ var PortalDataLiveBase = Layer7.effect(
4467
4541
  })),
4468
4542
  Effect33.catchAllCause((cause) => {
4469
4543
  const error = squashError(cause);
4470
- const message = formatErrorMessage(error);
4471
- return pipe21(
4472
- swallowPortalFileStateError(
4473
- portalFileState.updatePluginStatus({
4474
- portalId: input.portalId,
4475
- pluginName: input.pluginName,
4476
- status: "FAILED",
4477
- error: message,
4478
- sourcePath: input.source.kind === "jsonPath" ? input.source.jsonPath : null
4479
- })
4480
- ),
4481
- Effect33.flatMap(
4482
- () => toSyncFailure(
4483
- `Failed to sync plugin ${input.pluginName} for portal ${input.portalId}`,
4484
- cause
4485
- )
4486
- )
4544
+ return toSyncFailure(
4545
+ `Failed to sync plugin ${input.pluginName} for portal ${input.portalId}: ${formatErrorMessage(error)}`,
4546
+ cause
4487
4547
  );
4488
4548
  })
4489
4549
  )
@@ -4674,6 +4734,7 @@ var extractMessage = (value) => {
4674
4734
  return null;
4675
4735
  };
4676
4736
  var isReadOnlySkipError = (error) => error instanceof ReadOnlyClientSkipError;
4737
+ var getPluginTerminalStatus = (response) => response.plugin_status === "PARTIAL" ? "PARTIAL" : "SYNCED";
4677
4738
  var formatPluginError2 = (error, pluginName) => {
4678
4739
  const messages = [];
4679
4740
  let current = error;
@@ -4711,14 +4772,31 @@ var syncMessagePlugin = (ws, portalData, portalFileState, portalId, plugin) => p
4711
4772
  () => ws.requestPluginData(portalId, plugin.name, plugin.timeoutSeconds)
4712
4773
  ),
4713
4774
  Effect35.flatMap(
4714
- (payload) => portalData.syncPluginPayload({
4775
+ (response) => portalData.syncPluginPayload({
4715
4776
  portalId,
4716
4777
  pluginName: plugin.name,
4717
4778
  source: {
4718
4779
  kind: "payload",
4719
- payload
4780
+ payload: response.data
4720
4781
  }
4721
- })
4782
+ }).pipe(
4783
+ Effect35.flatMap(() => {
4784
+ const terminalStatus = getPluginTerminalStatus(response);
4785
+ const message = response.warning ?? null;
4786
+ return pipe23(
4787
+ portalData.setMetadata(portalId, PLUGIN_ERROR_KEY2(plugin.name), message ?? ""),
4788
+ Effect35.catchAll(() => Effect35.void),
4789
+ Effect35.flatMap(
4790
+ () => portalFileState.updatePluginStatus({
4791
+ portalId,
4792
+ pluginName: plugin.name,
4793
+ status: terminalStatus,
4794
+ error: message
4795
+ }).pipe(Effect35.catchAll(() => Effect35.void))
4796
+ )
4797
+ );
4798
+ })
4799
+ )
4722
4800
  ),
4723
4801
  Effect35.asVoid
4724
4802
  );
@@ -4991,7 +5069,7 @@ var handlePluginDataResponse = (payload, ctx) => pipe35(
4991
5069
  return Effect47.void;
4992
5070
  }
4993
5071
  if (payload.success) {
4994
- return Effect47.sync(() => pending.resolve(payload.data));
5072
+ return Effect47.sync(() => pending.resolve(payload));
4995
5073
  }
4996
5074
  return Effect47.sync(
4997
5075
  () => pending.reject(
@@ -9079,15 +9157,15 @@ var BUILT_IN_ACTION_TYPES = {
9079
9157
  "0-3": {
9080
9158
  actionTypeId: "0-3",
9081
9159
  name: "Create task",
9082
- description: "Create a new HubSpot task for the enrolled record",
9160
+ description: "Create a new HubSpot task for the enrolled record. IMPORTANT: on CONTACT_FLOW, HubSpot may return HTTP 500 unless the task explicitly associates to the enrolled contact using associations + use_explicit_associations.",
9083
9161
  connectionType: "SINGLE_CONNECTION",
9084
9162
  fields: [
9085
9163
  { name: "task_type", type: "string", required: true, description: "Task type: TODO" },
9086
9164
  { name: "subject", type: "string", required: true, description: "Task subject line" },
9087
- { name: "body", type: "string", required: false, description: "Task body (HTML)" },
9165
+ { name: "body", type: "string", required: true, description: "Task body (HTML)" },
9088
9166
  { name: "priority", type: "string", required: false, description: "Priority: NONE, LOW, MEDIUM, HIGH" },
9089
- { name: "associations", type: "array", required: false, description: "Association targets" },
9090
- { name: "use_explicit_associations", type: "string", required: false, description: "'true' to use explicit associations" }
9167
+ { name: "associations", type: "array", required: false, description: "Association targets. On CONTACT_FLOW, use [{ target: { associationCategory: 'HUBSPOT_DEFINED', associationTypeId: 204 }, value: { type: 'ENROLLED_OBJECT' } }]." },
9168
+ { name: "use_explicit_associations", type: "string", required: false, description: "'true' to use explicit associations. On CONTACT_FLOW create-task actions, set this to 'true' with the enrolled-contact association to avoid HubSpot HTTP 500 errors." }
9091
9169
  ]
9092
9170
  },
9093
9171
  "0-4": {
@@ -9105,7 +9183,7 @@ var BUILT_IN_ACTION_TYPES = {
9105
9183
  description: "Set, edit, copy, or clear property values for enrolled or associated records",
9106
9184
  connectionType: "SINGLE_CONNECTION",
9107
9185
  fields: [
9108
- { name: "property", type: "string", required: true, description: "Internal property name to set" },
9186
+ { name: "property_name", type: "string", required: true, description: "Internal property name to set" },
9109
9187
  { name: "value", type: "object", required: true, description: "MUST include type: 'STATIC_VALUE' when setting a value, e.g. { type: 'STATIC_VALUE', staticValue: 'value' }. Omitting type causes HTTP 500." },
9110
9188
  { name: "association", type: "object", required: false, description: "Association spec if setting on an associated record: { associationCategory: 'HUBSPOT_DEFINED', associationTypeId: <number> }" }
9111
9189
  ]
@@ -9159,12 +9237,11 @@ var BUILT_IN_ACTION_TYPES = {
9159
9237
  "0-15": {
9160
9238
  actionTypeId: "0-15",
9161
9239
  name: "Go to workflow",
9162
- description: "Enroll record in another workflow of the same type. API-INCOMPATIBLE: HubSpot V4 API returns 500 on all workflow types (contact, deal, ticket) regardless of field configuration (flow_id, valid/invalid IDs, empty fields, all versions). Create without actions and configure in HubSpot UI.",
9240
+ description: "Enroll the record in another workflow of the same type.",
9163
9241
  connectionType: "SINGLE_CONNECTION",
9164
9242
  fields: [
9165
- { name: "flow_id", type: "string", required: true, description: "ID of the target workflow (only configurable via HubSpot UI)" }
9166
- ],
9167
- apiIncompatible: true
9243
+ { name: "flow_id", type: "string", required: true, description: "ID of the target workflow" }
9244
+ ]
9168
9245
  },
9169
9246
  "0-18": {
9170
9247
  actionTypeId: "0-18",
@@ -9194,10 +9271,11 @@ var BUILT_IN_ACTION_TYPES = {
9194
9271
  "0-29": {
9195
9272
  actionTypeId: "0-29",
9196
9273
  name: "Delay until an event occurs",
9197
- description: "Delay enrolled records until a specified event occurs. API-INCOMPATIBLE: HubSpot V4 API returns 500 on all workflow types regardless of field configuration (empty, event filters, delay-style fields, all versions). Create without actions and configure in HubSpot UI.",
9274
+ description: "Delay enrolled records until a specified event occurs.",
9198
9275
  connectionType: "SINGLE_CONNECTION",
9199
- fields: [],
9200
- apiIncompatible: true
9276
+ fields: [
9277
+ { name: "expiration_minutes", type: "string", required: true, description: "How long the workflow should wait for the event before timing out" }
9278
+ ]
9201
9279
  },
9202
9280
  "0-30": {
9203
9281
  actionTypeId: "0-30",
@@ -9211,7 +9289,10 @@ var BUILT_IN_ACTION_TYPES = {
9211
9289
  name: "Set marketing contact status",
9212
9290
  description: "Mark contact as marketing or non-marketing",
9213
9291
  connectionType: "SINGLE_CONNECTION",
9214
- fields: []
9292
+ fields: [
9293
+ { name: "targetContact", type: "string", required: true, description: "Target contact token or fetched object reference, usually '{{ enrolled_object }}' in contact workflows" },
9294
+ { name: "marketableType", type: "string", required: true, description: "Marketing status to apply, e.g. 'MARKETABLE' or 'MARKETABLE_UNTIL_RENEWAL'" }
9295
+ ]
9215
9296
  },
9216
9297
  "0-35": {
9217
9298
  actionTypeId: "0-35",
@@ -9220,8 +9301,8 @@ var BUILT_IN_ACTION_TYPES = {
9220
9301
  connectionType: "SINGLE_CONNECTION",
9221
9302
  fields: [
9222
9303
  { name: "date", type: "object", required: true, description: "Date spec \u2014 MUST include type: { type: 'STATIC_VALUE', staticValue: '<unix ms>' } or { type: 'OBJECT_PROPERTY', propertyName: '<name>' }. Omitting type causes HTTP 500." },
9223
- { name: "delta", type: "string", required: false, description: "Offset from the date (e.g. '0')" },
9224
- { name: "time_unit", type: "string", required: false, description: "Unit for delta: DAYS, HOURS, MINUTES" },
9304
+ { name: "delta", type: "string", required: true, description: "Offset from the date (e.g. '0')" },
9305
+ { name: "time_unit", type: "string", required: true, description: "Unit for delta: DAYS, HOURS, MINUTES" },
9225
9306
  { name: "time_of_day", type: "object", required: true, description: "Required time of day: { hour: number, minute: number }. HubSpot UI rejects delay-until-date actions without it." }
9226
9307
  ]
9227
9308
  },
@@ -9289,35 +9370,49 @@ var BUILT_IN_ACTION_TYPES = {
9289
9370
  name: "Create associations",
9290
9371
  description: "Create new CRM record associations",
9291
9372
  connectionType: "SINGLE_CONNECTION",
9292
- fields: []
9373
+ fields: [
9374
+ { name: "fromObjectType", type: "string", required: true, description: "HubSpot object type ID of the enrolled record, e.g. '0-3' for deals" },
9375
+ { name: "toObjectType", type: "string", required: true, description: "HubSpot object type ID of the associated record to create links to, e.g. '0-1' for contacts" },
9376
+ { name: "createAssociationOnly", type: "string", required: true, description: "'true' or 'false' to control whether HubSpot should only create missing associations" },
9377
+ { name: "labelToApply", type: "string", required: true, description: "Association label type ID to apply to the created association" },
9378
+ { name: "matchBy", type: "string", required: true, description: "Association matching mode, e.g. 'fromAndToObjects'" },
9379
+ { name: "enrolledObjectPropertyNameToMatch", type: "string", required: true, description: "Property name on the enrolled object used for matching. Prefer bare property names over 'objectTypeId/propertyName' prefixes." },
9380
+ { name: "associatedObjectPropertyNameToMatch", type: "string", required: true, description: "Property name on the associated object used for matching. Prefer bare property names over 'objectTypeId/propertyName' prefixes." }
9381
+ ]
9293
9382
  },
9294
9383
  "0-73444249": {
9295
9384
  actionTypeId: "0-73444249",
9296
9385
  name: "Apply association labels",
9297
9386
  description: "Add a label to already-associated CRM records",
9298
9387
  connectionType: "SINGLE_CONNECTION",
9299
- fields: []
9300
- },
9301
- "0-61139484": {
9302
- actionTypeId: "0-61139484",
9303
- name: "Update association labels",
9304
- description: "Replace existing or append new labels to associations",
9305
- connectionType: "SINGLE_CONNECTION",
9306
- fields: []
9388
+ fields: [
9389
+ { name: "fromObjectType", type: "string", required: true, description: "HubSpot object type ID on the source side of the association pair" },
9390
+ { name: "toObjectType", type: "string", required: true, description: "HubSpot object type ID on the destination side of the association pair" },
9391
+ { name: "labelToApply", type: "string", required: true, description: "Association label type ID to apply" },
9392
+ { name: "applyLabelToAllAssociatedObjects", type: "string", required: true, description: "'true' or 'false' to control whether the label applies to all associated objects" }
9393
+ ]
9307
9394
  },
9308
9395
  "0-61139476": {
9309
9396
  actionTypeId: "0-61139476",
9310
9397
  name: "Remove association labels",
9311
9398
  description: "Clear all current association labels",
9312
9399
  connectionType: "SINGLE_CONNECTION",
9313
- fields: []
9400
+ fields: [
9401
+ { name: "fromObjectType", type: "string", required: true, description: "HubSpot object type ID on the source side of the association pair" },
9402
+ { name: "toObjectType", type: "string", required: true, description: "HubSpot object type ID on the destination side of the association pair" },
9403
+ { name: "labelToRemove", type: "string", required: true, description: "Association label type ID to remove" },
9404
+ { name: "fullyDissociate", type: "string", required: true, description: "'true' or 'false' to control whether HubSpot should fully remove the association" }
9405
+ ]
9314
9406
  },
9315
9407
  "0-169425243": {
9316
9408
  actionTypeId: "0-169425243",
9317
9409
  name: "Create note",
9318
- description: "Create and associate a note with the enrolled record. Field schema is undocumented \u2014 do NOT pass fields via the API. Add this action without fields and configure it in the HubSpot UI.",
9410
+ description: "Create and associate a note with the enrolled record",
9319
9411
  connectionType: "SINGLE_CONNECTION",
9320
- fields: []
9412
+ fields: [
9413
+ { name: "note_body", type: "string", required: true, description: "HTML note body content" },
9414
+ { name: "pin_note", type: "string", required: true, description: "'true' or 'false' to pin the created note" }
9415
+ ]
9321
9416
  },
9322
9417
  "0-44475148": {
9323
9418
  actionTypeId: "0-44475148",
@@ -9332,9 +9427,11 @@ var BUILT_IN_ACTION_TYPES = {
9332
9427
  "0-225935194": {
9333
9428
  actionTypeId: "0-225935194",
9334
9429
  name: "Validate and format phone number",
9335
- description: "Format phone numbers for calling compatibility. Accepts property-to-validate and default-country-code settings, but exact API field names are undocumented \u2014 do NOT pass fields via the API. Add this action without fields and configure it in the HubSpot UI.",
9430
+ description: "Format phone numbers for calling compatibility",
9336
9431
  connectionType: "SINGLE_CONNECTION",
9337
- fields: []
9432
+ fields: [
9433
+ { name: "defaultCountryCodeMode", type: "string", required: true, description: "Default country code mode, e.g. 'static_default_country_code', 'dynamic_default_country_code', or 'none'" }
9434
+ ]
9338
9435
  },
9339
9436
  "0-177946906": {
9340
9437
  actionTypeId: "0-177946906",
@@ -9425,14 +9522,18 @@ var BUILT_IN_ACTION_TYPES = {
9425
9522
  name: "Stop tracking intent signals",
9426
9523
  description: "Deactivate ongoing intent signals tracking and enrichment",
9427
9524
  connectionType: "SINGLE_CONNECTION",
9428
- fields: []
9525
+ fields: [
9526
+ { name: "targetCompany", type: "string", required: true, description: "Target company token or fetched object reference, usually '{{ enrolled_object }}' in company workflows" }
9527
+ ]
9429
9528
  },
9430
9529
  "0-219160146": {
9431
9530
  actionTypeId: "0-219160146",
9432
9531
  name: "Track intent signals",
9433
9532
  description: "Activate intent signal tracking and enrichment",
9434
9533
  connectionType: "SINGLE_CONNECTION",
9435
- fields: []
9534
+ fields: [
9535
+ { name: "targetCompany", type: "string", required: true, description: "Target company token or fetched object reference, usually '{{ enrolled_object }}' in company workflows" }
9536
+ ]
9436
9537
  },
9437
9538
  "1-179507819": {
9438
9539
  actionTypeId: "1-179507819",
@@ -9458,6 +9559,180 @@ var BUILT_IN_ACTION_TYPES = {
9458
9559
  };
9459
9560
  var isApiIncompatibleActionType = (actionTypeId) => BUILT_IN_ACTION_TYPES[actionTypeId]?.apiIncompatible === true;
9460
9561
 
9562
+ // ../shared/pure/workflow-action-create-metadata.ts
9563
+ var WORKFLOW_ACTION_CREATE_METADATA_BY_ID = {
9564
+ "0-3": {
9565
+ resourceRequirements: [
9566
+ {
9567
+ fieldName: "associations",
9568
+ resourceKind: "association_label",
9569
+ resolutionMode: "not_exposed",
9570
+ sourceHint: "Use the enrolled object association payload for contact workflows",
9571
+ notes: "For CONTACT_FLOW task actions, HubSpot may return HTTP 500 unless the task explicitly associates to the enrolled contact via associationTypeId 204 and value.type ENROLLED_OBJECT."
9572
+ }
9573
+ ],
9574
+ createGuidanceText: "For CONTACT_FLOW create-task actions, include associations with target { associationCategory: 'HUBSPOT_DEFINED', associationTypeId: 204 }, value { type: 'ENROLLED_OBJECT' }, and use_explicit_associations: 'true'. Omitting these can cause HubSpot to return HTTP 500 even when task_type, subject, and body are present."
9575
+ },
9576
+ "0-8": {
9577
+ resourceRequirements: [
9578
+ {
9579
+ fieldName: "user_ids",
9580
+ resourceKind: "user",
9581
+ resolutionMode: "queryable",
9582
+ sourceHint: "owners.user_id",
9583
+ notes: "Use HubSpot user IDs from the owners table user_id column, not owner_id."
9584
+ }
9585
+ ],
9586
+ createGuidanceText: "Use minimal notification payloads and omit owner_properties unless you have a specific reason to target owners dynamically."
9587
+ },
9588
+ "0-9": {
9589
+ resourceRequirements: [
9590
+ {
9591
+ fieldName: "user_ids",
9592
+ resourceKind: "user",
9593
+ resolutionMode: "queryable",
9594
+ sourceHint: "owners.user_id",
9595
+ notes: "Use HubSpot user IDs from the owners table user_id column, not owner_id."
9596
+ }
9597
+ ],
9598
+ createGuidanceText: "Use minimal notification payloads and omit owner_properties unless you have a specific reason to target owners dynamically."
9599
+ },
9600
+ "0-11": {
9601
+ resourceRequirements: [
9602
+ {
9603
+ fieldName: "user_ids",
9604
+ resourceKind: "user",
9605
+ resolutionMode: "queryable",
9606
+ sourceHint: "owners.user_id",
9607
+ notes: "CONTACT_FLOW requires target_property and overwrite_current_owner in addition to user_ids."
9608
+ }
9609
+ ],
9610
+ createGuidanceText: "On CONTACT_FLOW, always send user_ids, target_property, and overwrite_current_owner together. Use owners.user_id values, never owner_id."
9611
+ },
9612
+ "0-15": {
9613
+ resourceRequirements: [
9614
+ {
9615
+ fieldName: "flow_id",
9616
+ resourceKind: "workflow",
9617
+ resolutionMode: "not_exposed",
9618
+ sourceHint: "HubSpot workflow ID",
9619
+ notes: "Target workflow should match the current workflow type."
9620
+ }
9621
+ ],
9622
+ createGuidanceText: "Use a known target workflow ID of the same workflow type. Do not leave flow_id empty."
9623
+ },
9624
+ "0-35": {
9625
+ resourceRequirements: [],
9626
+ createGuidanceText: "When using STATIC_VALUE dates, send a future Unix-milliseconds timestamp. time_of_day is required for reliable creation."
9627
+ },
9628
+ "0-14": {
9629
+ resourceRequirements: [],
9630
+ createGuidanceText: "Prefer standard object types and explicit STATIC_VALUE property payloads for creation examples. Avoid portal-specific custom object IDs in default templates."
9631
+ },
9632
+ "0-63809083": {
9633
+ resourceRequirements: [
9634
+ {
9635
+ fieldName: "listId",
9636
+ resourceKind: "list",
9637
+ resolutionMode: "queryable",
9638
+ sourceHint: "lists.list_id"
9639
+ }
9640
+ ],
9641
+ createGuidanceText: "Resolve listId from the lists table before creating the workflow."
9642
+ },
9643
+ "0-63863438": {
9644
+ resourceRequirements: [
9645
+ {
9646
+ fieldName: "listId",
9647
+ resourceKind: "list",
9648
+ resolutionMode: "queryable",
9649
+ sourceHint: "lists.list_id"
9650
+ }
9651
+ ],
9652
+ createGuidanceText: "Resolve listId from the lists table before creating the workflow."
9653
+ },
9654
+ "0-43347357": {
9655
+ resourceRequirements: [
9656
+ {
9657
+ fieldName: "subscriptionId",
9658
+ resourceKind: "subscription_definition",
9659
+ resolutionMode: "not_exposed",
9660
+ sourceHint: "HubSpot communication subscription definition ID"
9661
+ }
9662
+ ],
9663
+ createGuidanceText: "Use a real communication subscription definition ID. targetContact can often be '{{ enrolled_object }}' for contact workflows."
9664
+ },
9665
+ "0-46510720": {
9666
+ resourceRequirements: [
9667
+ {
9668
+ fieldName: "sequenceId",
9669
+ resourceKind: "sequence",
9670
+ resolutionMode: "not_exposed",
9671
+ sourceHint: "HubSpot sequence ID"
9672
+ },
9673
+ {
9674
+ fieldName: "userId",
9675
+ resourceKind: "user",
9676
+ resolutionMode: "queryable",
9677
+ sourceHint: "owners.user_id",
9678
+ notes: "Only needed when senderType is SPECIFIC_USER."
9679
+ }
9680
+ ],
9681
+ createGuidanceText: "Use a real sequenceId. Prefer CONTACT_OWNER plus contactOwnerProperty for generic templates, or SPECIFIC_USER plus a valid owners.user_id."
9682
+ },
9683
+ "0-63189541": {
9684
+ resourceRequirements: [
9685
+ {
9686
+ fieldName: "labelToApply",
9687
+ resourceKind: "association_label",
9688
+ resolutionMode: "partially_queryable",
9689
+ sourceHint: "Association label typeId",
9690
+ notes: "May come from existing association labels or a label created earlier in the same plan."
9691
+ }
9692
+ ],
9693
+ createGuidanceText: "For match fields, prefer bare property names over 'objectTypeId/propertyName' prefixes in create templates."
9694
+ },
9695
+ "0-73444249": {
9696
+ resourceRequirements: [
9697
+ {
9698
+ fieldName: "labelToApply",
9699
+ resourceKind: "association_label",
9700
+ resolutionMode: "partially_queryable",
9701
+ sourceHint: "Association label typeId"
9702
+ }
9703
+ ],
9704
+ createGuidanceText: "Use an existing association label typeId for the relevant object pair."
9705
+ },
9706
+ "0-61139476": {
9707
+ resourceRequirements: [
9708
+ {
9709
+ fieldName: "labelToRemove",
9710
+ resourceKind: "association_label",
9711
+ resolutionMode: "partially_queryable",
9712
+ sourceHint: "Association label typeId"
9713
+ }
9714
+ ],
9715
+ createGuidanceText: "Use an existing association label typeId for the relevant object pair."
9716
+ },
9717
+ "0-44475148": {
9718
+ resourceRequirements: [
9719
+ {
9720
+ fieldName: "Target Inbox",
9721
+ resourceKind: "inbox",
9722
+ resolutionMode: "not_exposed",
9723
+ sourceHint: "HubSpot conversation inbox ID"
9724
+ },
9725
+ {
9726
+ fieldName: "Conversation User",
9727
+ resourceKind: "user",
9728
+ resolutionMode: "queryable",
9729
+ sourceHint: "owners.user_id"
9730
+ }
9731
+ ],
9732
+ createGuidanceText: "Use a real inbox ID and a real HubSpot user ID. Conversation User should be a HubSpot user ID, not an owner ID."
9733
+ }
9734
+ };
9735
+
9461
9736
  // ../shared/pure/supported-workflow-actions.ts
9462
9737
  var SUPPORTED_WORKFLOW_ACTION_KEYS = Object.keys(
9463
9738
  WorkflowActionSchemasByDefinitionKey
@@ -9489,142 +9764,2614 @@ var SUPPORTED_WORKFLOW_ACTION_TYPES = SUPPORTED_WORKFLOW_ACTION_KEYS.map((action
9489
9764
  required: true,
9490
9765
  description: "Label for the fallback branch when no static branch value matches."
9491
9766
  }
9492
- ]
9767
+ ],
9768
+ resourceRequirements: [],
9769
+ createGuidanceText: "Use STATIC_BRANCH only when you need branching. The branch action references a prior action output via inputValue."
9493
9770
  };
9494
9771
  }
9495
9772
  const builtInActionType = BUILT_IN_ACTION_TYPES[actionTypeId];
9496
9773
  if (!builtInActionType) {
9497
9774
  throw new Error(`Missing built-in metadata for supported workflow action '${actionTypeId}'`);
9498
9775
  }
9776
+ const createMetadata = WORKFLOW_ACTION_CREATE_METADATA_BY_ID[actionTypeId];
9499
9777
  return {
9500
9778
  actionTypeId,
9501
9779
  name: builtInActionType.name,
9502
9780
  description: builtInActionType.description,
9503
9781
  category: "built_in",
9504
9782
  connectionType: builtInActionType.connectionType,
9505
- fields: builtInActionType.fields
9783
+ fields: builtInActionType.fields,
9784
+ resourceRequirements: createMetadata?.resourceRequirements ?? [],
9785
+ createGuidanceText: createMetadata?.createGuidanceText ?? ""
9506
9786
  };
9507
9787
  });
9508
9788
  var SUPPORTED_WORKFLOW_ACTION_TYPES_BY_ID = Object.fromEntries(
9509
9789
  SUPPORTED_WORKFLOW_ACTION_TYPES.map((actionType) => [actionType.actionTypeId, actionType])
9510
9790
  );
9511
9791
 
9512
- // ../shared/pure/workflow-operation-schema.ts
9513
- var WorkflowConnectionSchema2 = z62.object({
9514
- edgeType: z62.string().min(1),
9515
- nextActionId: z62.string().min(1)
9516
- }).passthrough();
9517
- var WorkflowFilterOperationSchema = z62.object({
9518
- operationType: z62.string().min(1, "operation.operationType is required for workflow property filters"),
9519
- operator: z62.string().min(1)
9520
- }).passthrough();
9521
- var WorkflowFilterSchema = z62.object({
9522
- filterType: z62.string().min(1),
9523
- property: z62.string().optional(),
9524
- operation: WorkflowFilterOperationSchema.optional()
9525
- }).passthrough().superRefine((value, ctx) => {
9526
- if (value.filterType !== "PROPERTY") return;
9527
- if (!value.property || value.property.length === 0) {
9528
- ctx.addIssue({
9529
- code: z62.ZodIssueCode.custom,
9530
- message: "property filters require property",
9531
- path: ["property"]
9532
- });
9533
- }
9534
- if (!value.operation) {
9535
- ctx.addIssue({
9536
- code: z62.ZodIssueCode.custom,
9537
- message: "property filters require operation",
9538
- path: ["operation"]
9539
- });
9540
- }
9541
- });
9542
- var WorkflowBranchSchema = z62.object({
9543
- connection: WorkflowConnectionSchema2.optional(),
9544
- nextActionId: z62.string().min(1).optional()
9545
- }).passthrough().superRefine((value, ctx) => {
9546
- if (value.connection || value.nextActionId) return;
9547
- ctx.addIssue({
9548
- code: z62.ZodIssueCode.custom,
9549
- message: "workflow branches require connection.nextActionId or nextActionId",
9550
- path: ["connection"]
9551
- });
9552
- });
9553
- var WorkflowEnrollmentBranchSchema = z62.object({
9554
- filterBranchType: z62.string().min(1),
9555
- filterBranchOperator: z62.string().optional(),
9556
- filterBranches: z62.array(z62.lazy(() => WorkflowEnrollmentBranchSchema)).default([]),
9557
- filters: z62.array(WorkflowFilterSchema).default([]),
9558
- eventTypeId: z62.string().optional(),
9559
- operator: z62.string().optional(),
9560
- objectTypeId: z62.string().optional(),
9561
- associationTypeId: z62.number().optional(),
9562
- associationCategory: z62.string().optional()
9563
- }).passthrough().superRefine((value, ctx) => {
9564
- if (value.filterBranchType !== "UNIFIED_EVENTS") return;
9565
- if (!value.eventTypeId || value.eventTypeId.length === 0) {
9566
- ctx.addIssue({
9567
- code: z62.ZodIssueCode.custom,
9568
- message: "UNIFIED_EVENTS filter branches require eventTypeId (e.g. '4-655002' for property change). Query workflow_event_types for valid IDs.",
9569
- path: ["eventTypeId"]
9570
- });
9571
- return;
9572
- }
9573
- if (/^0-\d+$/.test(value.eventTypeId)) {
9574
- ctx.addIssue({
9575
- code: z62.ZodIssueCode.custom,
9576
- message: `eventTypeId '${value.eventTypeId}' looks like a CRM object type ID, not an event type ID. Event type IDs use '4-*' or '6-*' prefix (e.g. '4-655002' for property change). Query workflow_event_types for valid IDs.`,
9577
- path: ["eventTypeId"]
9578
- });
9579
- }
9580
- });
9581
- var EventBasedEnrollmentCriteriaSchema = z62.object({
9582
- type: z62.literal("EVENT_BASED"),
9583
- shouldReEnroll: z62.boolean(),
9584
- eventFilterBranches: z62.array(WorkflowEnrollmentBranchSchema).min(1),
9585
- listMembershipFilterBranches: z62.array(WorkflowEnrollmentBranchSchema).default([])
9586
- }).passthrough();
9587
- var ListBasedEnrollmentCriteriaSchema = z62.object({
9588
- type: z62.literal("LIST_BASED"),
9589
- shouldReEnroll: z62.boolean(),
9590
- listFilterBranch: WorkflowEnrollmentBranchSchema,
9591
- reEnrollmentTriggersFilterBranches: z62.array(WorkflowEnrollmentBranchSchema).default([])
9592
- }).passthrough();
9593
- var WorkflowEnrollmentCriteriaSchema = z62.union([
9594
- EventBasedEnrollmentCriteriaSchema,
9595
- ListBasedEnrollmentCriteriaSchema
9596
- ]);
9597
- var BaseWorkflowActionSchema = z62.object({
9598
- actionId: z62.string().min(1),
9599
- type: z62.string().min(1),
9600
- actionTypeId: z62.string().optional(),
9601
- actionTypeVersion: z62.number().int().optional(),
9602
- connection: WorkflowConnectionSchema2.optional(),
9603
- fields: z62.record(z62.string(), z62.unknown()).optional(),
9604
- staticBranches: z62.array(WorkflowBranchSchema).optional(),
9605
- listBranches: z62.array(WorkflowBranchSchema).optional(),
9606
- defaultBranch: WorkflowBranchSchema.optional(),
9607
- defaultBranchName: z62.string().optional()
9608
- }).passthrough().superRefine((value, ctx) => {
9609
- if (value.type !== "BRANCH") return;
9610
- const hasStaticBranches = (value.staticBranches?.length ?? 0) > 0;
9611
- const hasListBranches = (value.listBranches?.length ?? 0) > 0;
9612
- const hasDefaultBranch = value.defaultBranch != null;
9613
- if (hasStaticBranches || hasListBranches || hasDefaultBranch) return;
9614
- ctx.addIssue({
9615
- code: z62.ZodIssueCode.custom,
9616
- message: "BRANCH actions require at least one branch target",
9617
- path: ["type"]
9618
- });
9619
- });
9620
- var TypedWorkflowActionSchema = BaseWorkflowActionSchema.superRefine((value, ctx) => {
9621
- const definitionKey = value.actionTypeId ?? value.type;
9622
- if (!(definitionKey in SUPPORTED_WORKFLOW_ACTION_TYPES_BY_ID)) {
9623
- ctx.addIssue({
9624
- code: z62.ZodIssueCode.custom,
9625
- message: definitionKey === "BRANCH" ? "Unsupported workflow action type 'BRANCH'. Use 'STATIC_BRANCH' for branching actions and query action_type_catalog for supported action shapes." : `Unsupported workflow action '${definitionKey}'. Query action_type_catalog for the supported action types exposed to the LLM.`,
9626
- path: value.actionTypeId ? ["actionTypeId"] : ["type"]
9627
- });
9792
+ // ../shared/data/workflow-enrollments/normalized-triggers.json
9793
+ var normalized_triggers_default = [
9794
+ {
9795
+ catalogId: "e_ad_interaction",
9796
+ eventTypeId: "4-1553675",
9797
+ eventTypeInnerId: 1553675,
9798
+ officialEnrollmentType: "EVENT_BASED",
9799
+ officialOperator: "HAS_COMPLETED",
9800
+ officialFilterTemplate: "simple_event_has_completed",
9801
+ officialFiltersExample: [],
9802
+ triggerCategoryId: "digitalInteraction",
9803
+ modernCategoryId: "media",
9804
+ triggerGroupLabel: "",
9805
+ requiredScopes: [],
9806
+ requiredGates: [],
9807
+ sampleWorkflowId: "3953878259",
9808
+ sampleWorkflowName: "MCP Trigger Harvest - e_ad_interaction",
9809
+ sampleStatus: "created"
9810
+ },
9811
+ {
9812
+ catalogId: "e_anon_public_quote_download",
9813
+ eventTypeId: "4-3687775",
9814
+ eventTypeInnerId: 3687775,
9815
+ officialEnrollmentType: "EVENT_BASED",
9816
+ officialOperator: "HAS_COMPLETED",
9817
+ officialFilterTemplate: "simple_event_has_completed",
9818
+ officialFiltersExample: [],
9819
+ triggerCategoryId: "data",
9820
+ modernCategoryId: "crm",
9821
+ triggerGroupLabel: "Quote events",
9822
+ requiredScopes: [
9823
+ "cpq-quote-access"
9824
+ ],
9825
+ requiredGates: [
9826
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
9827
+ ],
9828
+ sampleWorkflowId: "3955861708",
9829
+ sampleWorkflowName: "MCP Trigger Harvest - e_anon_public_quote_download",
9830
+ sampleStatus: "created"
9831
+ },
9832
+ {
9833
+ catalogId: "e_anon_quote_print",
9834
+ eventTypeId: "4-3687777",
9835
+ eventTypeInnerId: 3687777,
9836
+ officialEnrollmentType: "EVENT_BASED",
9837
+ officialOperator: "HAS_COMPLETED",
9838
+ officialFilterTemplate: "simple_event_has_completed",
9839
+ officialFiltersExample: [],
9840
+ triggerCategoryId: "data",
9841
+ modernCategoryId: "crm",
9842
+ triggerGroupLabel: "Quote events",
9843
+ requiredScopes: [
9844
+ "cpq-quote-access"
9845
+ ],
9846
+ requiredGates: [
9847
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
9848
+ ],
9849
+ sampleWorkflowId: "3955726574",
9850
+ sampleWorkflowName: "MCP Trigger Harvest - e_anon_quote_print",
9851
+ sampleStatus: "created"
9852
+ },
9853
+ {
9854
+ catalogId: "e_anon_quote_view",
9855
+ eventTypeId: "4-3687774",
9856
+ eventTypeInnerId: 3687774,
9857
+ officialEnrollmentType: "EVENT_BASED",
9858
+ officialOperator: "HAS_COMPLETED",
9859
+ officialFilterTemplate: "simple_event_has_completed",
9860
+ officialFiltersExample: [],
9861
+ triggerCategoryId: "data",
9862
+ modernCategoryId: "crm",
9863
+ triggerGroupLabel: "Quote events",
9864
+ requiredScopes: [
9865
+ "cpq-quote-access"
9866
+ ],
9867
+ requiredGates: [
9868
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
9869
+ ],
9870
+ sampleWorkflowId: "3955726575",
9871
+ sampleWorkflowName: "MCP Trigger Harvest - e_anon_quote_view",
9872
+ sampleStatus: "created"
9873
+ },
9874
+ {
9875
+ catalogId: "e_buyer_intent_company_saved_view_event",
9876
+ eventTypeId: "4-1887330",
9877
+ eventTypeInnerId: 1887330,
9878
+ officialEnrollmentType: "EVENT_BASED",
9879
+ officialOperator: "HAS_COMPLETED",
9880
+ officialFilterTemplate: "simple_event_has_completed",
9881
+ officialFiltersExample: [],
9882
+ triggerCategoryId: "data",
9883
+ modernCategoryId: "buyer_company_insights",
9884
+ triggerGroupLabel: "Buyer Intent events",
9885
+ requiredScopes: [
9886
+ "breeze-intelligence-free"
9887
+ ],
9888
+ requiredGates: [],
9889
+ sampleWorkflowId: "3955786941",
9890
+ sampleWorkflowName: "MCP Trigger Harvest - e_buyer_intent_company_saved_view_event probe 1773636540776",
9891
+ sampleStatus: "created"
9892
+ },
9893
+ {
9894
+ catalogId: "e_call_ended",
9895
+ eventTypeId: "4-1741072",
9896
+ eventTypeInnerId: 1741072,
9897
+ officialEnrollmentType: "EVENT_BASED",
9898
+ officialOperator: "HAS_COMPLETED",
9899
+ officialFilterTemplate: "simple_event_has_completed",
9900
+ officialFiltersExample: [],
9901
+ triggerCategoryId: "contactInteraction",
9902
+ modernCategoryId: "communication",
9903
+ triggerGroupLabel: "Call events",
9904
+ requiredScopes: [],
9905
+ requiredGates: [],
9906
+ sampleWorkflowId: "3953878256",
9907
+ sampleWorkflowName: "MCP Trigger Harvest - e_call_ended",
9908
+ sampleStatus: "created"
9909
+ },
9910
+ {
9911
+ catalogId: "e_call_started",
9912
+ eventTypeId: "4-1733817",
9913
+ eventTypeInnerId: 1733817,
9914
+ officialEnrollmentType: "EVENT_BASED",
9915
+ officialOperator: "HAS_COMPLETED",
9916
+ officialFilterTemplate: "simple_event_has_completed",
9917
+ officialFiltersExample: [],
9918
+ triggerCategoryId: "contactInteraction",
9919
+ modernCategoryId: "communication",
9920
+ triggerGroupLabel: "Call events",
9921
+ requiredScopes: [],
9922
+ requiredGates: [],
9923
+ sampleWorkflowId: "3953877202",
9924
+ sampleWorkflowName: "MCP Trigger Matrix - Call Started",
9925
+ sampleStatus: "created"
9926
+ },
9927
+ {
9928
+ catalogId: "e_clicked_cta",
9929
+ eventTypeId: "4-100216",
9930
+ eventTypeInnerId: 100216,
9931
+ officialEnrollmentType: "EVENT_BASED",
9932
+ officialOperator: "HAS_COMPLETED",
9933
+ officialFilterTemplate: "simple_event_has_completed",
9934
+ officialFiltersExample: [],
9935
+ triggerCategoryId: "digitalInteraction",
9936
+ modernCategoryId: "media",
9937
+ triggerGroupLabel: "Website events",
9938
+ requiredScopes: [
9939
+ "cta-access"
9940
+ ],
9941
+ requiredGates: [],
9942
+ sampleWorkflowId: "3955785953",
9943
+ sampleWorkflowName: "MCP Trigger Harvest - e_clicked_cta",
9944
+ sampleStatus: "created"
9945
+ },
9946
+ {
9947
+ catalogId: "e_clicked_link_in_email_v2",
9948
+ eventTypeId: "4-666288",
9949
+ eventTypeInnerId: 666288,
9950
+ officialEnrollmentType: "EVENT_BASED",
9951
+ officialOperator: "HAS_COMPLETED",
9952
+ officialFilterTemplate: "simple_event_has_completed",
9953
+ officialFiltersExample: [],
9954
+ triggerCategoryId: "contactInteraction",
9955
+ modernCategoryId: "email",
9956
+ triggerGroupLabel: "Email events",
9957
+ requiredScopes: [],
9958
+ requiredGates: [],
9959
+ sampleWorkflowId: "3954290915",
9960
+ sampleWorkflowName: "MCP Trigger Harvest - e_clicked_link_in_email_v2",
9961
+ sampleStatus: "created"
9962
+ },
9963
+ {
9964
+ catalogId: "e_clicked_link_in_shortmessage",
9965
+ eventTypeId: "4-1722276",
9966
+ eventTypeInnerId: 1722276,
9967
+ officialEnrollmentType: "EVENT_BASED",
9968
+ officialOperator: "HAS_COMPLETED",
9969
+ officialFilterTemplate: "simple_event_has_completed",
9970
+ officialFiltersExample: [],
9971
+ triggerCategoryId: "contactInteraction",
9972
+ modernCategoryId: "sms",
9973
+ triggerGroupLabel: "SMS events",
9974
+ requiredScopes: [
9975
+ "sms-marketing-addon"
9976
+ ],
9977
+ requiredGates: [],
9978
+ sampleWorkflowId: "3955791038",
9979
+ sampleWorkflowName: "MCP Trigger Harvest - e_clicked_link_in_shortmessage",
9980
+ sampleStatus: "created"
9981
+ },
9982
+ {
9983
+ catalogId: "e_clicked_web_interactive",
9984
+ eventTypeId: "4-1555805",
9985
+ eventTypeInnerId: 1555805,
9986
+ officialEnrollmentType: "EVENT_BASED",
9987
+ officialOperator: "HAS_COMPLETED",
9988
+ officialFilterTemplate: "simple_event_has_completed",
9989
+ officialFiltersExample: [],
9990
+ triggerCategoryId: "digitalInteraction",
9991
+ modernCategoryId: "media",
9992
+ triggerGroupLabel: "Website events",
9993
+ requiredScopes: [
9994
+ "calls-to-action-read"
9995
+ ],
9996
+ requiredGates: [],
9997
+ sampleWorkflowId: "3955791039",
9998
+ sampleWorkflowName: "MCP Trigger Harvest - e_clicked_web_interactive",
9999
+ sampleStatus: "created"
10000
+ },
10001
+ {
10002
+ catalogId: "e_clicked_whatsapp_message",
10003
+ eventTypeId: "4-6607539",
10004
+ eventTypeInnerId: 6607539,
10005
+ officialEnrollmentType: "EVENT_BASED",
10006
+ officialOperator: "HAS_COMPLETED",
10007
+ officialFilterTemplate: "simple_event_has_completed",
10008
+ officialFiltersExample: [],
10009
+ triggerCategoryId: "contactInteraction",
10010
+ modernCategoryId: "whats_app",
10011
+ triggerGroupLabel: "WhatsApp events",
10012
+ requiredScopes: [],
10013
+ requiredGates: [
10014
+ "MPG:WhatsAppV2"
10015
+ ],
10016
+ sampleWorkflowId: "3955853520",
10017
+ sampleWorkflowName: "MCP Trigger Harvest - e_clicked_whatsapp_message",
10018
+ sampleStatus: "created"
10019
+ },
10020
+ {
10021
+ catalogId: "e_closing_agent_conversation_started",
10022
+ eventTypeId: "4-6300049",
10023
+ eventTypeInnerId: 6300049,
10024
+ officialEnrollmentType: "EVENT_BASED",
10025
+ officialOperator: "HAS_COMPLETED",
10026
+ officialFilterTemplate: "simple_event_has_completed",
10027
+ officialFiltersExample: [],
10028
+ triggerCategoryId: "data",
10029
+ modernCategoryId: "crm",
10030
+ triggerGroupLabel: "Quote events",
10031
+ requiredScopes: [
10032
+ "cpq-quote-access"
10033
+ ],
10034
+ requiredGates: [
10035
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
10036
+ ],
10037
+ sampleWorkflowId: "3956004052",
10038
+ sampleWorkflowName: "MCP Trigger Harvest - e_closing_agent_conversation_started",
10039
+ sampleStatus: "created"
10040
+ },
10041
+ {
10042
+ catalogId: "e_company_attends_event",
10043
+ eventTypeId: "4-10021656",
10044
+ eventTypeInnerId: 10021656,
10045
+ officialEnrollmentType: "EVENT_BASED",
10046
+ officialOperator: "HAS_COMPLETED",
10047
+ officialFilterTemplate: "simple_event_has_completed",
10048
+ officialFiltersExample: [],
10049
+ triggerCategoryId: "data",
10050
+ modernCategoryId: "buyer_company_insights",
10051
+ triggerGroupLabel: "Company signal events",
10052
+ requiredScopes: [
10053
+ "data-agent-platform-access"
10054
+ ],
10055
+ requiredGates: [
10056
+ "VendorSignals::Q12026PredictLeadsSignalsRelease"
10057
+ ],
10058
+ sampleWorkflowId: "3955770565",
10059
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_attends_event",
10060
+ sampleStatus: "created"
10061
+ },
10062
+ {
10063
+ catalogId: "e_company_expanded_geographically",
10064
+ eventTypeId: "4-5470325",
10065
+ eventTypeInnerId: 5470325,
10066
+ officialEnrollmentType: "EVENT_BASED",
10067
+ officialOperator: "HAS_COMPLETED",
10068
+ officialFilterTemplate: "simple_event_has_completed",
10069
+ officialFiltersExample: [],
10070
+ triggerCategoryId: "data",
10071
+ modernCategoryId: "buyer_company_insights",
10072
+ triggerGroupLabel: "Company signal events",
10073
+ requiredScopes: [
10074
+ "data-enrichment-platform-access"
10075
+ ],
10076
+ requiredGates: [],
10077
+ sampleWorkflowId: "3955760352",
10078
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_expanded_geographically",
10079
+ sampleStatus: "created"
10080
+ },
10081
+ {
10082
+ catalogId: "e_company_growth_metrics",
10083
+ eventTypeId: "4-8148872",
10084
+ eventTypeInnerId: 8148872,
10085
+ officialEnrollmentType: "EVENT_BASED",
10086
+ officialOperator: "HAS_COMPLETED",
10087
+ officialFilterTemplate: "simple_event_has_completed",
10088
+ officialFiltersExample: [],
10089
+ triggerCategoryId: "data",
10090
+ modernCategoryId: "buyer_company_insights",
10091
+ triggerGroupLabel: "Company signal events",
10092
+ requiredScopes: [
10093
+ "data-enrichment-platform-access"
10094
+ ],
10095
+ requiredGates: [
10096
+ "IntentSignals:SignalsBatchQ425"
10097
+ ],
10098
+ sampleWorkflowId: "3955760354",
10099
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_growth_metrics",
10100
+ sampleStatus: "created"
10101
+ },
10102
+ {
10103
+ catalogId: "e_company_hired_executive",
10104
+ eventTypeId: "4-7727049",
10105
+ eventTypeInnerId: 7727049,
10106
+ officialEnrollmentType: "EVENT_BASED",
10107
+ officialOperator: "HAS_COMPLETED",
10108
+ officialFilterTemplate: "simple_event_has_completed",
10109
+ officialFiltersExample: [],
10110
+ triggerCategoryId: "data",
10111
+ modernCategoryId: "buyer_company_insights",
10112
+ triggerGroupLabel: "Company signal events",
10113
+ requiredScopes: [
10114
+ "data-enrichment-platform-access"
10115
+ ],
10116
+ requiredGates: [
10117
+ "IntentSignals:SignalsBatchQ425"
10118
+ ],
10119
+ sampleWorkflowId: "3955785957",
10120
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_hired_executive",
10121
+ sampleStatus: "created"
10122
+ },
10123
+ {
10124
+ catalogId: "e_company_industry_recognition",
10125
+ eventTypeId: "4-9304135",
10126
+ eventTypeInnerId: 9304135,
10127
+ officialEnrollmentType: "EVENT_BASED",
10128
+ officialOperator: "HAS_COMPLETED",
10129
+ officialFilterTemplate: "simple_event_has_completed",
10130
+ officialFiltersExample: [],
10131
+ triggerCategoryId: "data",
10132
+ modernCategoryId: "buyer_company_insights",
10133
+ triggerGroupLabel: "Company signal events",
10134
+ requiredScopes: [
10135
+ "data-agent-platform-access"
10136
+ ],
10137
+ requiredGates: [
10138
+ "IntentSignals::Q12026ExaSignalsRelease"
10139
+ ],
10140
+ sampleWorkflowId: "3955760355",
10141
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_industry_recognition",
10142
+ sampleStatus: "created"
10143
+ },
10144
+ {
10145
+ catalogId: "e_company_is_developing",
10146
+ eventTypeId: "4-10021655",
10147
+ eventTypeInnerId: 10021655,
10148
+ officialEnrollmentType: "EVENT_BASED",
10149
+ officialOperator: "HAS_COMPLETED",
10150
+ officialFilterTemplate: "simple_event_has_completed",
10151
+ officialFiltersExample: [],
10152
+ triggerCategoryId: "data",
10153
+ modernCategoryId: "buyer_company_insights",
10154
+ triggerGroupLabel: "Company signal events",
10155
+ requiredScopes: [
10156
+ "data-agent-platform-access"
10157
+ ],
10158
+ requiredGates: [
10159
+ "VendorSignals::Q12026PredictLeadsSignalsRelease"
10160
+ ],
10161
+ sampleWorkflowId: "3955872973",
10162
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_is_developing",
10163
+ sampleStatus: "created"
10164
+ },
10165
+ {
10166
+ catalogId: "e_company_launched_product",
10167
+ eventTypeId: "4-7727050",
10168
+ eventTypeInnerId: 7727050,
10169
+ officialEnrollmentType: "EVENT_BASED",
10170
+ officialOperator: "HAS_COMPLETED",
10171
+ officialFilterTemplate: "simple_event_has_completed",
10172
+ officialFiltersExample: [],
10173
+ triggerCategoryId: "data",
10174
+ modernCategoryId: "buyer_company_insights",
10175
+ triggerGroupLabel: "Company signal events",
10176
+ requiredScopes: [
10177
+ "data-enrichment-platform-access"
10178
+ ],
10179
+ requiredGates: [
10180
+ "IntentSignals:SignalsBatchQ425"
10181
+ ],
10182
+ sampleWorkflowId: "3955857623",
10183
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_launched_product",
10184
+ sampleStatus: "created"
10185
+ },
10186
+ {
10187
+ catalogId: "e_company_layoff",
10188
+ eventTypeId: "4-6099696",
10189
+ eventTypeInnerId: 6099696,
10190
+ officialEnrollmentType: "EVENT_BASED",
10191
+ officialOperator: "HAS_COMPLETED",
10192
+ officialFilterTemplate: "simple_event_has_completed",
10193
+ officialFiltersExample: [],
10194
+ triggerCategoryId: "data",
10195
+ modernCategoryId: "buyer_company_insights",
10196
+ triggerGroupLabel: "Company signal events",
10197
+ requiredScopes: [
10198
+ "data-enrichment-platform-access"
10199
+ ],
10200
+ requiredGates: [],
10201
+ sampleWorkflowId: "3955774692",
10202
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_layoff",
10203
+ sampleStatus: "created"
10204
+ },
10205
+ {
10206
+ catalogId: "e_company_merger_acquisition",
10207
+ eventTypeId: "4-8191201",
10208
+ eventTypeInnerId: 8191201,
10209
+ officialEnrollmentType: "EVENT_BASED",
10210
+ officialOperator: "HAS_COMPLETED",
10211
+ officialFilterTemplate: "simple_event_has_completed",
10212
+ officialFiltersExample: [],
10213
+ triggerCategoryId: "data",
10214
+ modernCategoryId: "buyer_company_insights",
10215
+ triggerGroupLabel: "Company signal events",
10216
+ requiredScopes: [
10217
+ "data-enrichment-platform-access"
10218
+ ],
10219
+ requiredGates: [
10220
+ "IntentSignals:SignalsBatchQ425"
10221
+ ],
10222
+ sampleWorkflowId: "3955726580",
10223
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_merger_acquisition",
10224
+ sampleStatus: "created"
10225
+ },
10226
+ {
10227
+ catalogId: "e_company_news_signal_funding",
10228
+ eventTypeId: "4-5076614",
10229
+ eventTypeInnerId: 5076614,
10230
+ officialEnrollmentType: "EVENT_BASED",
10231
+ officialOperator: "HAS_COMPLETED",
10232
+ officialFilterTemplate: "simple_event_has_completed",
10233
+ officialFiltersExample: [],
10234
+ triggerCategoryId: "data",
10235
+ modernCategoryId: "buyer_company_insights",
10236
+ triggerGroupLabel: "Company signal events",
10237
+ requiredScopes: [
10238
+ "data-enrichment-platform-access"
10239
+ ],
10240
+ requiredGates: [],
10241
+ sampleWorkflowId: "3955754227",
10242
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_news_signal_funding",
10243
+ sampleStatus: "created"
10244
+ },
10245
+ {
10246
+ catalogId: "e_company_office_closure",
10247
+ eventTypeId: "4-9304136",
10248
+ eventTypeInnerId: 9304136,
10249
+ officialEnrollmentType: "EVENT_BASED",
10250
+ officialOperator: "HAS_COMPLETED",
10251
+ officialFilterTemplate: "simple_event_has_completed",
10252
+ officialFiltersExample: [],
10253
+ triggerCategoryId: "data",
10254
+ modernCategoryId: "buyer_company_insights",
10255
+ triggerGroupLabel: "Company signal events",
10256
+ requiredScopes: [
10257
+ "data-agent-platform-access"
10258
+ ],
10259
+ requiredGates: [
10260
+ "IntentSignals::Q12026ExaSignalsRelease"
10261
+ ],
10262
+ sampleWorkflowId: "3955857627",
10263
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_office_closure",
10264
+ sampleStatus: "created"
10265
+ },
10266
+ {
10267
+ catalogId: "e_company_physical_expansion",
10268
+ eventTypeId: "4-9304138",
10269
+ eventTypeInnerId: 9304138,
10270
+ officialEnrollmentType: "EVENT_BASED",
10271
+ officialOperator: "HAS_COMPLETED",
10272
+ officialFilterTemplate: "simple_event_has_completed",
10273
+ officialFiltersExample: [],
10274
+ triggerCategoryId: "data",
10275
+ modernCategoryId: "buyer_company_insights",
10276
+ triggerGroupLabel: "Company signal events",
10277
+ requiredScopes: [
10278
+ "data-agent-platform-access"
10279
+ ],
10280
+ requiredGates: [
10281
+ "IntentSignals::Q12026ExaSignalsRelease"
10282
+ ],
10283
+ sampleWorkflowId: "3955857628",
10284
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_physical_expansion",
10285
+ sampleStatus: "created"
10286
+ },
10287
+ {
10288
+ catalogId: "e_company_published_leadership_content",
10289
+ eventTypeId: "4-6099692",
10290
+ eventTypeInnerId: 6099692,
10291
+ officialEnrollmentType: "EVENT_BASED",
10292
+ officialOperator: "HAS_COMPLETED",
10293
+ officialFilterTemplate: "simple_event_has_completed",
10294
+ officialFiltersExample: [],
10295
+ triggerCategoryId: "data",
10296
+ modernCategoryId: "buyer_company_insights",
10297
+ triggerGroupLabel: "Company signal events",
10298
+ requiredScopes: [
10299
+ "data-enrichment-platform-access"
10300
+ ],
10301
+ requiredGates: [],
10302
+ sampleWorkflowId: "3955861712",
10303
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_published_leadership_content",
10304
+ sampleStatus: "created"
10305
+ },
10306
+ {
10307
+ catalogId: "e_company_received_technology_investment",
10308
+ eventTypeId: "4-6099691",
10309
+ eventTypeInnerId: 6099691,
10310
+ officialEnrollmentType: "EVENT_BASED",
10311
+ officialOperator: "HAS_COMPLETED",
10312
+ officialFilterTemplate: "simple_event_has_completed",
10313
+ officialFiltersExample: [],
10314
+ triggerCategoryId: "data",
10315
+ modernCategoryId: "buyer_company_insights",
10316
+ triggerGroupLabel: "Company signal events",
10317
+ requiredScopes: [
10318
+ "data-enrichment-platform-access"
10319
+ ],
10320
+ requiredGates: [],
10321
+ sampleWorkflowId: "3956004057",
10322
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_received_technology_investment",
10323
+ sampleStatus: "created"
10324
+ },
10325
+ {
10326
+ catalogId: "e_company_regulatory_approval",
10327
+ eventTypeId: "4-9304137",
10328
+ eventTypeInnerId: 9304137,
10329
+ officialEnrollmentType: "EVENT_BASED",
10330
+ officialOperator: "HAS_COMPLETED",
10331
+ officialFilterTemplate: "simple_event_has_completed",
10332
+ officialFiltersExample: [],
10333
+ triggerCategoryId: "data",
10334
+ modernCategoryId: "buyer_company_insights",
10335
+ triggerGroupLabel: "Company signal events",
10336
+ requiredScopes: [
10337
+ "data-agent-platform-access"
10338
+ ],
10339
+ requiredGates: [
10340
+ "IntentSignals::Q12026ExaSignalsRelease"
10341
+ ],
10342
+ sampleWorkflowId: "3955891419",
10343
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_regulatory_approval",
10344
+ sampleStatus: "created"
10345
+ },
10346
+ {
10347
+ catalogId: "e_company_strategic_partnership",
10348
+ eventTypeId: "4-8191199",
10349
+ eventTypeInnerId: 8191199,
10350
+ officialEnrollmentType: "EVENT_BASED",
10351
+ officialOperator: "HAS_COMPLETED",
10352
+ officialFilterTemplate: "simple_event_has_completed",
10353
+ officialFiltersExample: [],
10354
+ triggerCategoryId: "data",
10355
+ modernCategoryId: "buyer_company_insights",
10356
+ triggerGroupLabel: "Company signal events",
10357
+ requiredScopes: [
10358
+ "data-enrichment-platform-access"
10359
+ ],
10360
+ requiredGates: [
10361
+ "IntentSignals:SignalsBatchQ425"
10362
+ ],
10363
+ sampleWorkflowId: "3955886325",
10364
+ sampleWorkflowName: "MCP Trigger Harvest - e_company_strategic_partnership",
10365
+ sampleStatus: "created"
10366
+ },
10367
+ {
10368
+ catalogId: "e_contact_job_ended",
10369
+ eventTypeId: "4-5470333",
10370
+ eventTypeInnerId: 5470333,
10371
+ officialEnrollmentType: "EVENT_BASED",
10372
+ officialOperator: "HAS_COMPLETED",
10373
+ officialFilterTemplate: "simple_event_has_completed",
10374
+ officialFiltersExample: [],
10375
+ triggerCategoryId: "data",
10376
+ modernCategoryId: "buyer_company_insights",
10377
+ triggerGroupLabel: "Contact signal events",
10378
+ requiredScopes: [
10379
+ "data-enrichment-platform-access"
10380
+ ],
10381
+ requiredGates: [],
10382
+ sampleWorkflowId: "3955760359",
10383
+ sampleWorkflowName: "MCP Trigger Harvest - e_contact_job_ended",
10384
+ sampleStatus: "created"
10385
+ },
10386
+ {
10387
+ catalogId: "e_contact_job_started",
10388
+ eventTypeId: "4-5470334",
10389
+ eventTypeInnerId: 5470334,
10390
+ officialEnrollmentType: "EVENT_BASED",
10391
+ officialOperator: "HAS_COMPLETED",
10392
+ officialFilterTemplate: "simple_event_has_completed",
10393
+ officialFiltersExample: [],
10394
+ triggerCategoryId: "data",
10395
+ modernCategoryId: "buyer_company_insights",
10396
+ triggerGroupLabel: "Contact signal events",
10397
+ requiredScopes: [
10398
+ "data-enrichment-platform-access"
10399
+ ],
10400
+ requiredGates: [],
10401
+ sampleWorkflowId: "3955754233",
10402
+ sampleWorkflowName: "MCP Trigger Harvest - e_contact_job_started",
10403
+ sampleStatus: "created"
10404
+ },
10405
+ {
10406
+ catalogId: "e_contact_meeting_booked",
10407
+ eventTypeId: "4-1720599",
10408
+ eventTypeInnerId: 1720599,
10409
+ officialEnrollmentType: "EVENT_BASED",
10410
+ officialOperator: "HAS_COMPLETED",
10411
+ officialFilterTemplate: "simple_event_has_completed",
10412
+ officialFiltersExample: [],
10413
+ triggerCategoryId: "contactInteraction",
10414
+ modernCategoryId: "communication",
10415
+ triggerGroupLabel: "Meeting events",
10416
+ requiredScopes: [],
10417
+ requiredGates: [],
10418
+ sampleWorkflowId: "3953877209",
10419
+ sampleWorkflowName: "MCP Trigger Harvest - e_contact_meeting_booked",
10420
+ sampleStatus: "created"
10421
+ },
10422
+ {
10423
+ catalogId: "e_contact_meeting_outcome_changed",
10424
+ eventTypeId: "4-1724222",
10425
+ eventTypeInnerId: 1724222,
10426
+ officialEnrollmentType: "EVENT_BASED",
10427
+ officialOperator: "HAS_COMPLETED",
10428
+ officialFilterTemplate: "simple_event_has_completed",
10429
+ officialFiltersExample: [],
10430
+ triggerCategoryId: "contactInteraction",
10431
+ modernCategoryId: "communication",
10432
+ triggerGroupLabel: "Meeting events",
10433
+ requiredScopes: [],
10434
+ requiredGates: [],
10435
+ sampleWorkflowId: "3954291939",
10436
+ sampleWorkflowName: "MCP Trigger Harvest - e_contact_meeting_outcome_changed",
10437
+ sampleStatus: "created"
10438
+ },
10439
+ {
10440
+ catalogId: "e_delivered_shortmessage",
10441
+ eventTypeId: "4-1721168",
10442
+ eventTypeInnerId: 1721168,
10443
+ officialEnrollmentType: "EVENT_BASED",
10444
+ officialOperator: "HAS_COMPLETED",
10445
+ officialFilterTemplate: "simple_event_has_completed",
10446
+ officialFiltersExample: [],
10447
+ triggerCategoryId: "contactInteraction",
10448
+ modernCategoryId: "sms",
10449
+ triggerGroupLabel: "SMS events",
10450
+ requiredScopes: [
10451
+ "sms-marketing-addon"
10452
+ ],
10453
+ requiredGates: [],
10454
+ sampleWorkflowId: "3955774697",
10455
+ sampleWorkflowName: "MCP Trigger Harvest - e_delivered_shortmessage",
10456
+ sampleStatus: "created"
10457
+ },
10458
+ {
10459
+ catalogId: "e_delivered_whatsapp_message",
10460
+ eventTypeId: "4-6607541",
10461
+ eventTypeInnerId: 6607541,
10462
+ officialEnrollmentType: "EVENT_BASED",
10463
+ officialOperator: "HAS_COMPLETED",
10464
+ officialFilterTemplate: "simple_event_has_completed",
10465
+ officialFiltersExample: [],
10466
+ triggerCategoryId: "contactInteraction",
10467
+ modernCategoryId: "whats_app",
10468
+ triggerGroupLabel: "WhatsApp events",
10469
+ requiredScopes: [],
10470
+ requiredGates: [
10471
+ "MPG:WhatsAppV2"
10472
+ ],
10473
+ sampleWorkflowId: "3955765492",
10474
+ sampleWorkflowName: "MCP Trigger Harvest - e_delivered_whatsapp_message",
10475
+ sampleStatus: "created"
10476
+ },
10477
+ {
10478
+ catalogId: "e_document_completed_v2",
10479
+ eventTypeId: "4-1522438",
10480
+ eventTypeInnerId: 1522438,
10481
+ officialEnrollmentType: "EVENT_BASED",
10482
+ officialOperator: "HAS_COMPLETED",
10483
+ officialFilterTemplate: "simple_event_has_completed",
10484
+ officialFiltersExample: [],
10485
+ triggerCategoryId: "contactInteraction",
10486
+ modernCategoryId: "communication",
10487
+ triggerGroupLabel: "Document events",
10488
+ requiredScopes: [
10489
+ "documents-read-access"
10490
+ ],
10491
+ requiredGates: [],
10492
+ sampleWorkflowId: "3955770570",
10493
+ sampleWorkflowName: "MCP Trigger Harvest - e_document_completed_v2",
10494
+ sampleStatus: "created"
10495
+ },
10496
+ {
10497
+ catalogId: "e_document_shared_v2",
10498
+ eventTypeId: "4-1522437",
10499
+ eventTypeInnerId: 1522437,
10500
+ officialEnrollmentType: "EVENT_BASED",
10501
+ officialOperator: "HAS_COMPLETED",
10502
+ officialFilterTemplate: "simple_event_has_completed",
10503
+ officialFiltersExample: [],
10504
+ triggerCategoryId: "contactInteraction",
10505
+ modernCategoryId: "communication",
10506
+ triggerGroupLabel: "Document events",
10507
+ requiredScopes: [
10508
+ "documents-read-access"
10509
+ ],
10510
+ requiredGates: [],
10511
+ sampleWorkflowId: "3955857631",
10512
+ sampleWorkflowName: "MCP Trigger Harvest - e_document_shared_v2",
10513
+ sampleStatus: "created"
10514
+ },
10515
+ {
10516
+ catalogId: "e_document_viewed_v2",
10517
+ eventTypeId: "4-1522436",
10518
+ eventTypeInnerId: 1522436,
10519
+ officialEnrollmentType: "EVENT_BASED",
10520
+ officialOperator: "HAS_COMPLETED",
10521
+ officialFilterTemplate: "simple_event_has_completed",
10522
+ officialFiltersExample: [],
10523
+ triggerCategoryId: "contactInteraction",
10524
+ modernCategoryId: "communication",
10525
+ triggerGroupLabel: "Document events",
10526
+ requiredScopes: [
10527
+ "documents-read-access"
10528
+ ],
10529
+ requiredGates: [],
10530
+ sampleWorkflowId: "3955857633",
10531
+ sampleWorkflowName: "MCP Trigger Harvest - e_document_viewed_v2",
10532
+ sampleStatus: "created"
10533
+ },
10534
+ {
10535
+ catalogId: "e_dropped_shortmessage",
10536
+ eventTypeId: "4-1725149",
10537
+ eventTypeInnerId: 1725149,
10538
+ officialEnrollmentType: "EVENT_BASED",
10539
+ officialOperator: "HAS_COMPLETED",
10540
+ officialFilterTemplate: "simple_event_has_completed",
10541
+ officialFiltersExample: [],
10542
+ triggerCategoryId: "contactInteraction",
10543
+ modernCategoryId: "sms",
10544
+ triggerGroupLabel: "SMS events",
10545
+ requiredScopes: [
10546
+ "sms-marketing-addon"
10547
+ ],
10548
+ requiredGates: [],
10549
+ sampleWorkflowId: "3955897563",
10550
+ sampleWorkflowName: "MCP Trigger Harvest - e_dropped_shortmessage",
10551
+ sampleStatus: "created"
10552
+ },
10553
+ {
10554
+ catalogId: "e_dropped_whatsapp_message",
10555
+ eventTypeId: "4-5076608",
10556
+ eventTypeInnerId: 5076608,
10557
+ officialEnrollmentType: "EVENT_BASED",
10558
+ officialOperator: "HAS_COMPLETED",
10559
+ officialFilterTemplate: "simple_event_has_completed",
10560
+ officialFiltersExample: [],
10561
+ triggerCategoryId: "contactInteraction",
10562
+ modernCategoryId: "whats_app",
10563
+ triggerGroupLabel: "WhatsApp events",
10564
+ requiredScopes: [],
10565
+ requiredGates: [
10566
+ "MPG:WhatsAppV2"
10567
+ ],
10568
+ sampleWorkflowId: "3955791045",
10569
+ sampleWorkflowName: "MCP Trigger Harvest - e_dropped_whatsapp_message",
10570
+ sampleStatus: "created"
10571
+ },
10572
+ {
10573
+ catalogId: "e_email_bounce_detected",
10574
+ eventTypeId: "4-5470331",
10575
+ eventTypeInnerId: 5470331,
10576
+ officialEnrollmentType: "EVENT_BASED",
10577
+ officialOperator: "HAS_COMPLETED",
10578
+ officialFilterTemplate: "simple_event_has_completed",
10579
+ officialFiltersExample: [],
10580
+ triggerCategoryId: "data",
10581
+ modernCategoryId: "buyer_company_insights",
10582
+ triggerGroupLabel: "Contact signal events",
10583
+ requiredScopes: [
10584
+ "data-enrichment-platform-access"
10585
+ ],
10586
+ requiredGates: [],
10587
+ sampleWorkflowId: "3955891425",
10588
+ sampleWorkflowName: "MCP Trigger Harvest - e_email_bounce_detected",
10589
+ sampleStatus: "created"
10590
+ },
10591
+ {
10592
+ catalogId: "e_failed_to_deliver_shortmessage",
10593
+ eventTypeId: "4-1752910",
10594
+ eventTypeInnerId: 1752910,
10595
+ officialEnrollmentType: "EVENT_BASED",
10596
+ officialOperator: "HAS_COMPLETED",
10597
+ officialFilterTemplate: "simple_event_has_completed",
10598
+ officialFiltersExample: [],
10599
+ triggerCategoryId: "contactInteraction",
10600
+ modernCategoryId: "sms",
10601
+ triggerGroupLabel: "SMS events",
10602
+ requiredScopes: [
10603
+ "sms-marketing-addon"
10604
+ ],
10605
+ requiredGates: [],
10606
+ sampleWorkflowId: "3955853524",
10607
+ sampleWorkflowName: "MCP Trigger Harvest - e_failed_to_deliver_shortmessage",
10608
+ sampleStatus: "created"
10609
+ },
10610
+ {
10611
+ catalogId: "e_failed_to_send_shortmessage",
10612
+ eventTypeId: "4-1752904",
10613
+ eventTypeInnerId: 1752904,
10614
+ officialEnrollmentType: "EVENT_BASED",
10615
+ officialOperator: "HAS_COMPLETED",
10616
+ officialFilterTemplate: "simple_event_has_completed",
10617
+ officialFiltersExample: [],
10618
+ triggerCategoryId: "contactInteraction",
10619
+ modernCategoryId: "sms",
10620
+ triggerGroupLabel: "SMS events",
10621
+ requiredScopes: [
10622
+ "sms-marketing-addon"
10623
+ ],
10624
+ requiredGates: [],
10625
+ sampleWorkflowId: "3955861718",
10626
+ sampleWorkflowName: "MCP Trigger Harvest - e_failed_to_send_shortmessage",
10627
+ sampleStatus: "created"
10628
+ },
10629
+ {
10630
+ catalogId: "e_failed_whatsapp_message",
10631
+ eventTypeId: "4-6607542",
10632
+ eventTypeInnerId: 6607542,
10633
+ officialEnrollmentType: "EVENT_BASED",
10634
+ officialOperator: "HAS_COMPLETED",
10635
+ officialFilterTemplate: "simple_event_has_completed",
10636
+ officialFiltersExample: [],
10637
+ triggerCategoryId: "contactInteraction",
10638
+ modernCategoryId: "whats_app",
10639
+ triggerGroupLabel: "WhatsApp events",
10640
+ requiredScopes: [],
10641
+ requiredGates: [
10642
+ "MPG:WhatsAppV2"
10643
+ ],
10644
+ sampleWorkflowId: "3955755197",
10645
+ sampleWorkflowName: "MCP Trigger Harvest - e_failed_whatsapp_message",
10646
+ sampleStatus: "created"
10647
+ },
10648
+ {
10649
+ catalogId: "e_feedback_mention",
10650
+ eventTypeId: "4-4481980",
10651
+ eventTypeInnerId: 4481980,
10652
+ officialEnrollmentType: "EVENT_BASED",
10653
+ officialOperator: "HAS_COMPLETED",
10654
+ officialFilterTemplate: "simple_event_has_completed",
10655
+ officialFiltersExample: [],
10656
+ triggerCategoryId: "contactInteraction",
10657
+ modernCategoryId: "communication",
10658
+ triggerGroupLabel: "Feedback insights events",
10659
+ requiredScopes: [
10660
+ "service-feedback-enterprise-access"
10661
+ ],
10662
+ requiredGates: [
10663
+ "ServiceHub:Feedback:FeedbackInsights"
10664
+ ],
10665
+ sampleWorkflowId: "3955765495",
10666
+ sampleWorkflowName: "MCP Trigger Harvest - e_feedback_mention",
10667
+ sampleStatus: "created"
10668
+ },
10669
+ {
10670
+ catalogId: "e_form_interaction_v2",
10671
+ eventTypeId: "4-1639799",
10672
+ eventTypeInnerId: 1639799,
10673
+ officialEnrollmentType: "EVENT_BASED",
10674
+ officialOperator: "HAS_COMPLETED",
10675
+ officialFilterTemplate: "simple_event_has_completed",
10676
+ officialFiltersExample: [],
10677
+ triggerCategoryId: "digitalInteraction",
10678
+ modernCategoryId: "media",
10679
+ triggerGroupLabel: "Form events",
10680
+ requiredScopes: [],
10681
+ requiredGates: [],
10682
+ sampleWorkflowId: "3954291947",
10683
+ sampleWorkflowName: "MCP Trigger Harvest - e_form_interaction_v2",
10684
+ sampleStatus: "created"
10685
+ },
10686
+ {
10687
+ catalogId: "e_form_submission_v2",
10688
+ eventTypeId: "4-1639801",
10689
+ eventTypeInnerId: 1639801,
10690
+ officialEnrollmentType: "EVENT_BASED",
10691
+ officialOperator: "HAS_COMPLETED",
10692
+ officialFilterTemplate: "simple_event_has_completed",
10693
+ officialFiltersExample: [],
10694
+ triggerCategoryId: "digitalInteraction",
10695
+ modernCategoryId: "media",
10696
+ triggerGroupLabel: "Form events",
10697
+ requiredScopes: [],
10698
+ requiredGates: [],
10699
+ sampleWorkflowId: "3953876199",
10700
+ sampleWorkflowName: "MCP Trigger Matrix - Form Submission",
10701
+ sampleStatus: "created"
10702
+ },
10703
+ {
10704
+ catalogId: "e_form_view_v2",
10705
+ eventTypeId: "4-1639797",
10706
+ eventTypeInnerId: 1639797,
10707
+ officialEnrollmentType: "EVENT_BASED",
10708
+ officialOperator: "HAS_COMPLETED",
10709
+ officialFilterTemplate: "simple_event_has_completed",
10710
+ officialFiltersExample: [],
10711
+ triggerCategoryId: "digitalInteraction",
10712
+ modernCategoryId: "media",
10713
+ triggerGroupLabel: "Form events",
10714
+ requiredScopes: [],
10715
+ requiredGates: [],
10716
+ sampleWorkflowId: "3954291950",
10717
+ sampleWorkflowName: "MCP Trigger Harvest - e_form_view_v2",
10718
+ sampleStatus: "created"
10719
+ },
10720
+ {
10721
+ catalogId: "e_handed_whatsapp_message_to_agent",
10722
+ eventTypeId: "4-5076607",
10723
+ eventTypeInnerId: 5076607,
10724
+ officialEnrollmentType: "EVENT_BASED",
10725
+ officialOperator: "HAS_COMPLETED",
10726
+ officialFilterTemplate: "simple_event_has_completed",
10727
+ officialFiltersExample: [],
10728
+ triggerCategoryId: "contactInteraction",
10729
+ modernCategoryId: "whats_app",
10730
+ triggerGroupLabel: "WhatsApp events",
10731
+ requiredScopes: [],
10732
+ requiredGates: [
10733
+ "MPG:WhatsAppV2"
10734
+ ],
10735
+ sampleWorkflowId: "3955770574",
10736
+ sampleWorkflowName: "MCP Trigger Harvest - e_handed_whatsapp_message_to_agent",
10737
+ sampleStatus: "created"
10738
+ },
10739
+ {
10740
+ catalogId: "e_hs_scheduled_email_v2",
10741
+ eventTypeId: "4-667638",
10742
+ eventTypeInnerId: 667638,
10743
+ officialEnrollmentType: "EVENT_BASED",
10744
+ officialOperator: "HAS_COMPLETED",
10745
+ officialFilterTemplate: "simple_event_has_completed",
10746
+ officialFiltersExample: [],
10747
+ triggerCategoryId: "contactInteraction",
10748
+ modernCategoryId: "email",
10749
+ triggerGroupLabel: "Email events",
10750
+ requiredScopes: [],
10751
+ requiredGates: [],
10752
+ sampleWorkflowId: "3954290916",
10753
+ sampleWorkflowName: "MCP Trigger Harvest - e_hs_scheduled_email_v2",
10754
+ sampleStatus: "created"
10755
+ },
10756
+ {
10757
+ catalogId: "e_mb_attention_span",
10758
+ eventTypeId: "4-675784",
10759
+ eventTypeInnerId: 675784,
10760
+ officialEnrollmentType: "EVENT_BASED",
10761
+ officialOperator: "HAS_COMPLETED",
10762
+ officialFilterTemplate: "simple_event_has_completed",
10763
+ officialFiltersExample: [],
10764
+ triggerCategoryId: "digitalInteraction",
10765
+ modernCategoryId: "media",
10766
+ triggerGroupLabel: "Video events",
10767
+ requiredScopes: [
10768
+ "marketing-video"
10769
+ ],
10770
+ requiredGates: [
10771
+ "MediaContent::AttentionSpanWorkflowTrigger"
10772
+ ],
10773
+ sampleWorkflowId: "3955774698",
10774
+ sampleWorkflowName: "MCP Trigger Harvest - e_mb_attention_span",
10775
+ sampleStatus: "created"
10776
+ },
10777
+ {
10778
+ catalogId: "e_mb_media_played",
10779
+ eventTypeId: "4-675783",
10780
+ eventTypeInnerId: 675783,
10781
+ officialEnrollmentType: "EVENT_BASED",
10782
+ officialOperator: "HAS_COMPLETED",
10783
+ officialFilterTemplate: "simple_event_has_completed",
10784
+ officialFiltersExample: [],
10785
+ triggerCategoryId: "digitalInteraction",
10786
+ modernCategoryId: "media",
10787
+ triggerGroupLabel: "Video events",
10788
+ requiredScopes: [],
10789
+ requiredGates: [],
10790
+ sampleWorkflowId: "3954290914",
10791
+ sampleWorkflowName: "MCP Trigger Harvest - e_mb_media_played",
10792
+ sampleStatus: "created"
10793
+ },
10794
+ {
10795
+ catalogId: "e_mta_bounced_email_v2",
10796
+ eventTypeId: "4-666439",
10797
+ eventTypeInnerId: 666439,
10798
+ officialEnrollmentType: "EVENT_BASED",
10799
+ officialOperator: "HAS_COMPLETED",
10800
+ officialFilterTemplate: "simple_event_has_completed",
10801
+ officialFiltersExample: [],
10802
+ triggerCategoryId: "contactInteraction",
10803
+ modernCategoryId: "email",
10804
+ triggerGroupLabel: "Email events",
10805
+ requiredScopes: [],
10806
+ requiredGates: [],
10807
+ sampleWorkflowId: "3954291942",
10808
+ sampleWorkflowName: "MCP Trigger Harvest - e_mta_bounced_email_v2",
10809
+ sampleStatus: "created"
10810
+ },
10811
+ {
10812
+ catalogId: "e_mta_delivered_email_v2",
10813
+ eventTypeId: "4-665536",
10814
+ eventTypeInnerId: 665536,
10815
+ officialEnrollmentType: "EVENT_BASED",
10816
+ officialOperator: "HAS_COMPLETED",
10817
+ officialFilterTemplate: "simple_event_has_completed",
10818
+ officialFiltersExample: [],
10819
+ triggerCategoryId: "contactInteraction",
10820
+ modernCategoryId: "email",
10821
+ triggerGroupLabel: "Email events",
10822
+ requiredScopes: [],
10823
+ requiredGates: [],
10824
+ sampleWorkflowId: "3954291941",
10825
+ sampleWorkflowName: "MCP Trigger Harvest - e_mta_delivered_email_v2",
10826
+ sampleStatus: "created"
10827
+ },
10828
+ {
10829
+ catalogId: "e_object_created_v2",
10830
+ eventTypeId: "4-1463224",
10831
+ eventTypeInnerId: 1463224,
10832
+ officialEnrollmentType: "EVENT_BASED",
10833
+ officialOperator: "HAS_COMPLETED",
10834
+ officialFilterTemplate: "simple_event_has_completed",
10835
+ officialFiltersExample: [],
10836
+ triggerCategoryId: "data",
10837
+ modernCategoryId: "crm",
10838
+ triggerGroupLabel: "",
10839
+ requiredScopes: [],
10840
+ requiredGates: [],
10841
+ sampleWorkflowId: "3953877192",
10842
+ sampleWorkflowName: "MCP Trigger Matrix - Record Created",
10843
+ sampleStatus: "created"
10844
+ },
10845
+ {
10846
+ catalogId: "e_object_influenced_marketing_campaign_v4",
10847
+ eventTypeId: "4-1563645",
10848
+ eventTypeInnerId: 1563645,
10849
+ officialEnrollmentType: "EVENT_BASED",
10850
+ officialOperator: "HAS_COMPLETED",
10851
+ officialFilterTemplate: "simple_event_has_completed",
10852
+ officialFiltersExample: [],
10853
+ triggerCategoryId: "digitalInteraction",
10854
+ modernCategoryId: "media",
10855
+ triggerGroupLabel: "CRM",
10856
+ requiredScopes: [
10857
+ "campaigns-access"
10858
+ ],
10859
+ requiredGates: [
10860
+ "MO:Automation:WorkflowsCampaign"
10861
+ ],
10862
+ sampleWorkflowId: "3955897564",
10863
+ sampleWorkflowName: "MCP Trigger Harvest - e_object_influenced_marketing_campaign_v4",
10864
+ sampleStatus: "created"
10865
+ },
10866
+ {
10867
+ catalogId: "e_opened_email_v2",
10868
+ eventTypeId: "4-666440",
10869
+ eventTypeInnerId: 666440,
10870
+ officialEnrollmentType: "EVENT_BASED",
10871
+ officialOperator: "HAS_COMPLETED",
10872
+ officialFilterTemplate: "simple_event_has_completed",
10873
+ officialFiltersExample: [],
10874
+ triggerCategoryId: "contactInteraction",
10875
+ modernCategoryId: "email",
10876
+ triggerGroupLabel: "Email events",
10877
+ requiredScopes: [],
10878
+ requiredGates: [],
10879
+ sampleWorkflowId: "3954291936",
10880
+ sampleWorkflowName: "MCP Trigger Harvest - e_opened_email_v2",
10881
+ sampleStatus: "created"
10882
+ },
10883
+ {
10884
+ catalogId: "e_opted_out_of_whatsapp_subscription",
10885
+ eventTypeId: "4-6911595",
10886
+ eventTypeInnerId: 6911595,
10887
+ officialEnrollmentType: "EVENT_BASED",
10888
+ officialOperator: "HAS_COMPLETED",
10889
+ officialFilterTemplate: "simple_event_has_completed",
10890
+ officialFiltersExample: [],
10891
+ triggerCategoryId: "contactInteraction",
10892
+ modernCategoryId: "whats_app",
10893
+ triggerGroupLabel: "WhatsApp events",
10894
+ requiredScopes: [],
10895
+ requiredGates: [],
10896
+ sampleWorkflowId: "3954292926",
10897
+ sampleWorkflowName: "MCP Trigger Harvest - e_opted_out_of_whatsapp_subscription",
10898
+ sampleStatus: "created"
10899
+ },
10900
+ {
10901
+ catalogId: "e_playbook_log_on_record",
10902
+ eventTypeId: "4-1814177",
10903
+ eventTypeInnerId: 1814177,
10904
+ officialEnrollmentType: "EVENT_BASED",
10905
+ officialOperator: "HAS_COMPLETED",
10906
+ officialFilterTemplate: "simple_event_has_completed",
10907
+ officialFiltersExample: [],
10908
+ triggerCategoryId: "data",
10909
+ modernCategoryId: "crm",
10910
+ triggerGroupLabel: "",
10911
+ requiredScopes: [
10912
+ "playbooks-write"
10913
+ ],
10914
+ requiredGates: [],
10915
+ sampleWorkflowId: "3955760363",
10916
+ sampleWorkflowName: "MCP Trigger Harvest - e_playbook_log_on_record",
10917
+ sampleStatus: "created"
10918
+ },
10919
+ {
10920
+ catalogId: "e_process_submission_completed_on_object",
10921
+ eventTypeId: "4-3499849",
10922
+ eventTypeInnerId: 3499849,
10923
+ officialEnrollmentType: "EVENT_BASED",
10924
+ officialOperator: "HAS_COMPLETED",
10925
+ officialFilterTemplate: "simple_event_has_completed",
10926
+ officialFiltersExample: [],
10927
+ triggerCategoryId: "data",
10928
+ modernCategoryId: "crm",
10929
+ triggerGroupLabel: "",
10930
+ requiredScopes: [
10931
+ "crm-processes-write"
10932
+ ],
10933
+ requiredGates: [
10934
+ "CRM:Processes:ProcessGuideListCard"
10935
+ ],
10936
+ sampleWorkflowId: "3955853526",
10937
+ sampleWorkflowName: "MCP Trigger Harvest - e_process_submission_completed_on_object",
10938
+ sampleStatus: "created"
10939
+ },
10940
+ {
10941
+ catalogId: "e_property_value_changed",
10942
+ eventTypeId: "4-655002",
10943
+ eventTypeInnerId: 655002,
10944
+ officialEnrollmentType: "EVENT_BASED",
10945
+ officialOperator: "HAS_COMPLETED",
10946
+ officialFilterTemplate: "property_value_changed_named_property",
10947
+ officialFiltersExample: [
10948
+ {
10949
+ property: "hs_name",
10950
+ operation: {
10951
+ operator: "IS_EQUAL_TO",
10952
+ includeObjectsWithNoValueSet: false,
10953
+ value: "firstname",
10954
+ operationType: "STRING"
10955
+ },
10956
+ filterType: "PROPERTY"
10957
+ },
10958
+ {
10959
+ property: "hs_value",
10960
+ operation: {
10961
+ operator: "IS_KNOWN",
10962
+ includeObjectsWithNoValueSet: false,
10963
+ operationType: "ALL_PROPERTY"
10964
+ },
10965
+ filterType: "PROPERTY"
10966
+ }
10967
+ ],
10968
+ triggerCategoryId: "data",
10969
+ modernCategoryId: "crm",
10970
+ triggerGroupLabel: "",
10971
+ requiredScopes: [],
10972
+ requiredGates: [],
10973
+ sampleWorkflowId: "3953876196",
10974
+ sampleWorkflowName: "MCP Trigger Matrix - Property Changed - First Name Known",
10975
+ sampleStatus: "created"
10976
+ },
10977
+ {
10978
+ catalogId: "e_public_quote_download",
10979
+ eventTypeId: "4-3395636",
10980
+ eventTypeInnerId: 3395636,
10981
+ officialEnrollmentType: "EVENT_BASED",
10982
+ officialOperator: "HAS_COMPLETED",
10983
+ officialFilterTemplate: "simple_event_has_completed",
10984
+ officialFiltersExample: [],
10985
+ triggerCategoryId: "data",
10986
+ modernCategoryId: "crm",
10987
+ triggerGroupLabel: "Quote events",
10988
+ requiredScopes: [
10989
+ "cpq-quote-access"
10990
+ ],
10991
+ requiredGates: [
10992
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
10993
+ ],
10994
+ sampleWorkflowId: "3955770575",
10995
+ sampleWorkflowName: "MCP Trigger Harvest - e_public_quote_download",
10996
+ sampleStatus: "created"
10997
+ },
10998
+ {
10999
+ catalogId: "e_quote_accepted",
11000
+ eventTypeId: "4-4035552",
11001
+ eventTypeInnerId: 4035552,
11002
+ officialEnrollmentType: "EVENT_BASED",
11003
+ officialOperator: "HAS_COMPLETED",
11004
+ officialFilterTemplate: "simple_event_has_completed",
11005
+ officialFiltersExample: [],
11006
+ triggerCategoryId: "data",
11007
+ modernCategoryId: "crm",
11008
+ triggerGroupLabel: "Quote events",
11009
+ requiredScopes: [
11010
+ "cpq-quote-access"
11011
+ ],
11012
+ requiredGates: [
11013
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11014
+ ],
11015
+ sampleWorkflowId: "3955897565",
11016
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_accepted",
11017
+ sampleStatus: "created"
11018
+ },
11019
+ {
11020
+ catalogId: "e_quote_approval_approved",
11021
+ eventTypeId: "4-4940920",
11022
+ eventTypeInnerId: 4940920,
11023
+ officialEnrollmentType: "EVENT_BASED",
11024
+ officialOperator: "HAS_COMPLETED",
11025
+ officialFilterTemplate: "simple_event_has_completed",
11026
+ officialFiltersExample: [],
11027
+ triggerCategoryId: "data",
11028
+ modernCategoryId: "crm",
11029
+ triggerGroupLabel: "Quote events",
11030
+ requiredScopes: [
11031
+ "cpq-quote-access"
11032
+ ],
11033
+ requiredGates: [
11034
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11035
+ ],
11036
+ sampleWorkflowId: "3955785963",
11037
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_approval_approved",
11038
+ sampleStatus: "created"
11039
+ },
11040
+ {
11041
+ catalogId: "e_quote_approval_recalled",
11042
+ eventTypeId: "4-6300050",
11043
+ eventTypeInnerId: 6300050,
11044
+ officialEnrollmentType: "EVENT_BASED",
11045
+ officialOperator: "HAS_COMPLETED",
11046
+ officialFilterTemplate: "simple_event_has_completed",
11047
+ officialFiltersExample: [],
11048
+ triggerCategoryId: "data",
11049
+ modernCategoryId: "crm",
11050
+ triggerGroupLabel: "Quote events",
11051
+ requiredScopes: [
11052
+ "cpq-quote-access"
11053
+ ],
11054
+ requiredGates: [
11055
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11056
+ ],
11057
+ sampleWorkflowId: "3955770577",
11058
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_approval_recalled",
11059
+ sampleStatus: "created"
11060
+ },
11061
+ {
11062
+ catalogId: "e_quote_approval_rejected",
11063
+ eventTypeId: "4-4940921",
11064
+ eventTypeInnerId: 4940921,
11065
+ officialEnrollmentType: "EVENT_BASED",
11066
+ officialOperator: "HAS_COMPLETED",
11067
+ officialFilterTemplate: "simple_event_has_completed",
11068
+ officialFiltersExample: [],
11069
+ triggerCategoryId: "data",
11070
+ modernCategoryId: "crm",
11071
+ triggerGroupLabel: "Quote events",
11072
+ requiredScopes: [
11073
+ "cpq-quote-access"
11074
+ ],
11075
+ requiredGates: [
11076
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11077
+ ],
11078
+ sampleWorkflowId: "3955886327",
11079
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_approval_rejected",
11080
+ sampleStatus: "created"
11081
+ },
11082
+ {
11083
+ catalogId: "e_quote_approval_requested",
11084
+ eventTypeId: "4-4967160",
11085
+ eventTypeInnerId: 4967160,
11086
+ officialEnrollmentType: "EVENT_BASED",
11087
+ officialOperator: "HAS_COMPLETED",
11088
+ officialFilterTemplate: "simple_event_has_completed",
11089
+ officialFiltersExample: [],
11090
+ triggerCategoryId: "data",
11091
+ modernCategoryId: "crm",
11092
+ triggerGroupLabel: "Quote events",
11093
+ requiredScopes: [
11094
+ "cpq-quote-access"
11095
+ ],
11096
+ requiredGates: [
11097
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11098
+ ],
11099
+ sampleWorkflowId: "3956004061",
11100
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_approval_requested",
11101
+ sampleStatus: "created"
11102
+ },
11103
+ {
11104
+ catalogId: "e_quote_buyer_signed",
11105
+ eventTypeId: "4-6300056",
11106
+ eventTypeInnerId: 6300056,
11107
+ officialEnrollmentType: "EVENT_BASED",
11108
+ officialOperator: "HAS_COMPLETED",
11109
+ officialFilterTemplate: "simple_event_has_completed",
11110
+ officialFiltersExample: [],
11111
+ triggerCategoryId: "data",
11112
+ modernCategoryId: "crm",
11113
+ triggerGroupLabel: "Quote events",
11114
+ requiredScopes: [
11115
+ "cpq-quote-access"
11116
+ ],
11117
+ requiredGates: [
11118
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11119
+ ],
11120
+ sampleWorkflowId: "3956004062",
11121
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_buyer_signed",
11122
+ sampleStatus: "created"
11123
+ },
11124
+ {
11125
+ catalogId: "e_quote_countersigned",
11126
+ eventTypeId: "4-5076606",
11127
+ eventTypeInnerId: 5076606,
11128
+ officialEnrollmentType: "EVENT_BASED",
11129
+ officialOperator: "HAS_COMPLETED",
11130
+ officialFilterTemplate: "simple_event_has_completed",
11131
+ officialFiltersExample: [],
11132
+ triggerCategoryId: "data",
11133
+ modernCategoryId: "crm",
11134
+ triggerGroupLabel: "Quote events",
11135
+ requiredScopes: [
11136
+ "cpq-quote-access"
11137
+ ],
11138
+ requiredGates: [
11139
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11140
+ ],
11141
+ sampleWorkflowId: "3955760364",
11142
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_countersigned",
11143
+ sampleStatus: "created"
11144
+ },
11145
+ {
11146
+ catalogId: "e_quote_email_sent",
11147
+ eventTypeId: "4-2006192",
11148
+ eventTypeInnerId: 2006192,
11149
+ officialEnrollmentType: "EVENT_BASED",
11150
+ officialOperator: "HAS_COMPLETED",
11151
+ officialFilterTemplate: "simple_event_has_completed",
11152
+ officialFiltersExample: [],
11153
+ triggerCategoryId: "data",
11154
+ modernCategoryId: "crm",
11155
+ triggerGroupLabel: "Quote events",
11156
+ requiredScopes: [
11157
+ "cpq-quote-access"
11158
+ ],
11159
+ requiredGates: [
11160
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11161
+ ],
11162
+ sampleWorkflowId: "3955872987",
11163
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_email_sent",
11164
+ sampleStatus: "created"
11165
+ },
11166
+ {
11167
+ catalogId: "e_quote_expiration_reminder_email",
11168
+ eventTypeId: "4-5470322",
11169
+ eventTypeInnerId: 5470322,
11170
+ officialEnrollmentType: "EVENT_BASED",
11171
+ officialOperator: "HAS_COMPLETED",
11172
+ officialFilterTemplate: "simple_event_has_completed",
11173
+ officialFiltersExample: [],
11174
+ triggerCategoryId: "data",
11175
+ modernCategoryId: "crm",
11176
+ triggerGroupLabel: "Quote events",
11177
+ requiredScopes: [
11178
+ "cpq-quote-access"
11179
+ ],
11180
+ requiredGates: [
11181
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11182
+ ],
11183
+ sampleWorkflowId: "3955897567",
11184
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_expiration_reminder_email",
11185
+ sampleStatus: "created"
11186
+ },
11187
+ {
11188
+ catalogId: "e_quote_expired",
11189
+ eventTypeId: "4-6300054",
11190
+ eventTypeInnerId: 6300054,
11191
+ officialEnrollmentType: "EVENT_BASED",
11192
+ officialOperator: "HAS_COMPLETED",
11193
+ officialFilterTemplate: "simple_event_has_completed",
11194
+ officialFiltersExample: [],
11195
+ triggerCategoryId: "data",
11196
+ modernCategoryId: "crm",
11197
+ triggerGroupLabel: "Quote events",
11198
+ requiredScopes: [
11199
+ "cpq-quote-access"
11200
+ ],
11201
+ requiredGates: [
11202
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11203
+ ],
11204
+ sampleWorkflowId: "3956004064",
11205
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_expired",
11206
+ sampleStatus: "created"
11207
+ },
11208
+ {
11209
+ catalogId: "e_quote_followup_reminder_email",
11210
+ eventTypeId: "4-5470323",
11211
+ eventTypeInnerId: 5470323,
11212
+ officialEnrollmentType: "EVENT_BASED",
11213
+ officialOperator: "HAS_COMPLETED",
11214
+ officialFilterTemplate: "simple_event_has_completed",
11215
+ officialFiltersExample: [],
11216
+ triggerCategoryId: "data",
11217
+ modernCategoryId: "crm",
11218
+ triggerGroupLabel: "Quote events",
11219
+ requiredScopes: [
11220
+ "cpq-quote-access"
11221
+ ],
11222
+ requiredGates: [
11223
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11224
+ ],
11225
+ sampleWorkflowId: "3955770579",
11226
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_followup_reminder_email",
11227
+ sampleStatus: "created"
11228
+ },
11229
+ {
11230
+ catalogId: "e_quote_manually_signed",
11231
+ eventTypeId: "4-6300053",
11232
+ eventTypeInnerId: 6300053,
11233
+ officialEnrollmentType: "EVENT_BASED",
11234
+ officialOperator: "HAS_COMPLETED",
11235
+ officialFilterTemplate: "simple_event_has_completed",
11236
+ officialFiltersExample: [],
11237
+ triggerCategoryId: "data",
11238
+ modernCategoryId: "crm",
11239
+ triggerGroupLabel: "Quote events",
11240
+ requiredScopes: [
11241
+ "cpq-quote-access"
11242
+ ],
11243
+ requiredGates: [
11244
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11245
+ ],
11246
+ sampleWorkflowId: "3955887290",
11247
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_manually_signed",
11248
+ sampleStatus: "created"
11249
+ },
11250
+ {
11251
+ catalogId: "e_quote_published",
11252
+ eventTypeId: "4-5470320",
11253
+ eventTypeInnerId: 5470320,
11254
+ officialEnrollmentType: "EVENT_BASED",
11255
+ officialOperator: "HAS_COMPLETED",
11256
+ officialFilterTemplate: "simple_event_has_completed",
11257
+ officialFiltersExample: [],
11258
+ triggerCategoryId: "data",
11259
+ modernCategoryId: "crm",
11260
+ triggerGroupLabel: "Quote events",
11261
+ requiredScopes: [
11262
+ "cpq-quote-access"
11263
+ ],
11264
+ requiredGates: [
11265
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11266
+ ],
11267
+ sampleWorkflowId: "3955861720",
11268
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_published",
11269
+ sampleStatus: "created"
11270
+ },
11271
+ {
11272
+ catalogId: "e_quote_recalled",
11273
+ eventTypeId: "4-4810356",
11274
+ eventTypeInnerId: 4810356,
11275
+ officialEnrollmentType: "EVENT_BASED",
11276
+ officialOperator: "HAS_COMPLETED",
11277
+ officialFilterTemplate: "simple_event_has_completed",
11278
+ officialFiltersExample: [],
11279
+ triggerCategoryId: "data",
11280
+ modernCategoryId: "crm",
11281
+ triggerGroupLabel: "Quote events",
11282
+ requiredScopes: [
11283
+ "cpq-quote-access"
11284
+ ],
11285
+ requiredGates: [
11286
+ "commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"
11287
+ ],
11288
+ sampleWorkflowId: "3955861721",
11289
+ sampleWorkflowName: "MCP Trigger Harvest - e_quote_recalled",
11290
+ sampleStatus: "created"
11291
+ },
11292
+ {
11293
+ catalogId: "e_read_whatsapp_message",
11294
+ eventTypeId: "4-6607540",
11295
+ eventTypeInnerId: 6607540,
11296
+ officialEnrollmentType: "EVENT_BASED",
11297
+ officialOperator: "HAS_COMPLETED",
11298
+ officialFilterTemplate: "simple_event_has_completed",
11299
+ officialFiltersExample: [],
11300
+ triggerCategoryId: "contactInteraction",
11301
+ modernCategoryId: "whats_app",
11302
+ triggerGroupLabel: "WhatsApp events",
11303
+ requiredScopes: [],
11304
+ requiredGates: [
11305
+ "MPG:WhatsAppV2"
11306
+ ],
11307
+ sampleWorkflowId: "3955861723",
11308
+ sampleWorkflowName: "MCP Trigger Harvest - e_read_whatsapp_message",
11309
+ sampleStatus: "created"
11310
+ },
11311
+ {
11312
+ catalogId: "e_replied_email_v2",
11313
+ eventTypeId: "4-665538",
11314
+ eventTypeInnerId: 665538,
11315
+ officialEnrollmentType: "EVENT_BASED",
11316
+ officialOperator: "HAS_COMPLETED",
11317
+ officialFilterTemplate: "simple_event_has_completed",
11318
+ officialFiltersExample: [],
11319
+ triggerCategoryId: "contactInteraction",
11320
+ modernCategoryId: "email",
11321
+ triggerGroupLabel: "Email events",
11322
+ requiredScopes: [],
11323
+ requiredGates: [],
11324
+ sampleWorkflowId: "3954290918",
11325
+ sampleWorkflowName: "MCP Trigger Harvest - e_replied_email_v2",
11326
+ sampleStatus: "created"
11327
+ },
11328
+ {
11329
+ catalogId: "e_replied_whatsapp_message",
11330
+ eventTypeId: "4-6911594",
11331
+ eventTypeInnerId: 6911594,
11332
+ officialEnrollmentType: "EVENT_BASED",
11333
+ officialOperator: "HAS_COMPLETED",
11334
+ officialFilterTemplate: "simple_event_has_completed",
11335
+ officialFiltersExample: [],
11336
+ triggerCategoryId: "contactInteraction",
11337
+ modernCategoryId: "whats_app",
11338
+ triggerGroupLabel: "WhatsApp events",
11339
+ requiredScopes: [],
11340
+ requiredGates: [],
11341
+ sampleWorkflowId: "3954292927",
11342
+ sampleWorkflowName: "MCP Trigger Harvest - e_replied_whatsapp_message",
11343
+ sampleStatus: "created"
11344
+ },
11345
+ {
11346
+ catalogId: "e_research_intent_level_change",
11347
+ eventTypeId: "4-5470332",
11348
+ eventTypeInnerId: 5470332,
11349
+ officialEnrollmentType: "EVENT_BASED",
11350
+ officialOperator: "HAS_COMPLETED",
11351
+ officialFilterTemplate: "simple_event_has_completed",
11352
+ officialFiltersExample: [],
11353
+ triggerCategoryId: "data",
11354
+ modernCategoryId: "buyer_company_insights",
11355
+ triggerGroupLabel: "Company signal events",
11356
+ requiredScopes: [
11357
+ "data-enrichment-platform-access"
11358
+ ],
11359
+ requiredGates: [],
11360
+ sampleWorkflowId: "3955861724",
11361
+ sampleWorkflowName: "MCP Trigger Harvest - e_research_intent_level_change",
11362
+ sampleStatus: "created"
11363
+ },
11364
+ {
11365
+ catalogId: "e_sent_shortmessage",
11366
+ eventTypeId: "4-1719453",
11367
+ eventTypeInnerId: 1719453,
11368
+ officialEnrollmentType: "EVENT_BASED",
11369
+ officialOperator: "HAS_COMPLETED",
11370
+ officialFilterTemplate: "simple_event_has_completed",
11371
+ officialFiltersExample: [],
11372
+ triggerCategoryId: "contactInteraction",
11373
+ modernCategoryId: "sms",
11374
+ triggerGroupLabel: "SMS events",
11375
+ requiredScopes: [
11376
+ "sms-marketing-addon"
11377
+ ],
11378
+ requiredGates: [],
11379
+ sampleWorkflowId: "3956009160",
11380
+ sampleWorkflowName: "MCP Trigger Harvest - e_sent_shortmessage",
11381
+ sampleStatus: "created"
11382
+ },
11383
+ {
11384
+ catalogId: "e_sent_tracked_inbox_email_v8",
11385
+ eventTypeId: "4-1367006",
11386
+ eventTypeInnerId: 1367006,
11387
+ officialEnrollmentType: "EVENT_BASED",
11388
+ officialOperator: "HAS_COMPLETED",
11389
+ officialFilterTemplate: "simple_event_has_completed",
11390
+ officialFiltersExample: [],
11391
+ triggerCategoryId: "contactInteraction",
11392
+ modernCategoryId: "email",
11393
+ triggerGroupLabel: "Email events",
11394
+ requiredScopes: [],
11395
+ requiredGates: [],
11396
+ sampleWorkflowId: "3954291956",
11397
+ sampleWorkflowName: "MCP Trigger Harvest - e_sent_tracked_inbox_email_v8",
11398
+ sampleStatus: "created"
11399
+ },
11400
+ {
11401
+ catalogId: "e_updated_email_subscription_status_v2",
11402
+ eventTypeId: "4-666289",
11403
+ eventTypeInnerId: 666289,
11404
+ officialEnrollmentType: "EVENT_BASED",
11405
+ officialOperator: "HAS_COMPLETED",
11406
+ officialFilterTemplate: "simple_event_has_completed",
11407
+ officialFiltersExample: [],
11408
+ triggerCategoryId: "contactInteraction",
11409
+ modernCategoryId: "email",
11410
+ triggerGroupLabel: "Email events",
11411
+ requiredScopes: [],
11412
+ requiredGates: [],
11413
+ sampleWorkflowId: "3954291959",
11414
+ sampleWorkflowName: "MCP Trigger Harvest - e_updated_email_subscription_status_v2",
11415
+ sampleStatus: "created"
11416
+ },
11417
+ {
11418
+ catalogId: "e_v2_contact_booked_meeting_through_sequence",
11419
+ eventTypeId: "4-675773",
11420
+ eventTypeInnerId: 675773,
11421
+ officialEnrollmentType: "EVENT_BASED",
11422
+ officialOperator: "HAS_COMPLETED",
11423
+ officialFilterTemplate: "simple_event_has_completed",
11424
+ officialFiltersExample: [],
11425
+ triggerCategoryId: "automation",
11426
+ modernCategoryId: "automation",
11427
+ triggerGroupLabel: "Sequence events",
11428
+ requiredScopes: [],
11429
+ requiredGates: [],
11430
+ sampleWorkflowId: "3954290930",
11431
+ sampleWorkflowName: "MCP Trigger Harvest - e_v2_contact_booked_meeting_through_sequence",
11432
+ sampleStatus: "created"
11433
+ },
11434
+ {
11435
+ catalogId: "e_v2_contact_enrolled_in_sequence",
11436
+ eventTypeId: "4-675777",
11437
+ eventTypeInnerId: 675777,
11438
+ officialEnrollmentType: "EVENT_BASED",
11439
+ officialOperator: "HAS_COMPLETED",
11440
+ officialFilterTemplate: "simple_event_has_completed",
11441
+ officialFiltersExample: [],
11442
+ triggerCategoryId: "automation",
11443
+ modernCategoryId: "automation",
11444
+ triggerGroupLabel: "Sequence events",
11445
+ requiredScopes: [],
11446
+ requiredGates: [],
11447
+ sampleWorkflowId: "3954290927",
11448
+ sampleWorkflowName: "MCP Trigger Harvest - e_v2_contact_enrolled_in_sequence",
11449
+ sampleStatus: "created"
11450
+ },
11451
+ {
11452
+ catalogId: "e_v2_contact_finished_sequence",
11453
+ eventTypeId: "4-675778",
11454
+ eventTypeInnerId: 675778,
11455
+ officialEnrollmentType: "EVENT_BASED",
11456
+ officialOperator: "HAS_COMPLETED",
11457
+ officialFilterTemplate: "simple_event_has_completed",
11458
+ officialFiltersExample: [],
11459
+ triggerCategoryId: "automation",
11460
+ modernCategoryId: "automation",
11461
+ triggerGroupLabel: "Sequence events",
11462
+ requiredScopes: [],
11463
+ requiredGates: [],
11464
+ sampleWorkflowId: "3954292922",
11465
+ sampleWorkflowName: "MCP Trigger Harvest - e_v2_contact_finished_sequence",
11466
+ sampleStatus: "created"
11467
+ },
11468
+ {
11469
+ catalogId: "e_v2_contact_unenrolled_from_sequence",
11470
+ eventTypeId: "4-675776",
11471
+ eventTypeInnerId: 675776,
11472
+ officialEnrollmentType: "EVENT_BASED",
11473
+ officialOperator: "HAS_COMPLETED",
11474
+ officialFilterTemplate: "simple_event_has_completed",
11475
+ officialFiltersExample: [],
11476
+ triggerCategoryId: "automation",
11477
+ modernCategoryId: "automation",
11478
+ triggerGroupLabel: "Sequence events",
11479
+ requiredScopes: [],
11480
+ requiredGates: [],
11481
+ sampleWorkflowId: "3954290929",
11482
+ sampleWorkflowName: "MCP Trigger Harvest - e_v2_contact_unenrolled_from_sequence",
11483
+ sampleStatus: "created"
11484
+ },
11485
+ {
11486
+ catalogId: "e_v2_contact_unenrolled_from_sequence_via_workflow",
11487
+ eventTypeId: "4-1497402",
11488
+ eventTypeInnerId: 1497402,
11489
+ officialEnrollmentType: "EVENT_BASED",
11490
+ officialOperator: "HAS_COMPLETED",
11491
+ officialFilterTemplate: "simple_event_has_completed",
11492
+ officialFiltersExample: [],
11493
+ triggerCategoryId: "automation",
11494
+ modernCategoryId: "automation",
11495
+ triggerGroupLabel: "Sequence events",
11496
+ requiredScopes: [],
11497
+ requiredGates: [],
11498
+ sampleWorkflowId: "3954292923",
11499
+ sampleWorkflowName: "MCP Trigger Harvest - e_v2_contact_unenrolled_from_sequence_via_workflow",
11500
+ sampleStatus: "created"
11501
+ },
11502
+ {
11503
+ catalogId: "e_v2_contact_unenrolled_manually_from_sequence",
11504
+ eventTypeId: "4-675775",
11505
+ eventTypeInnerId: 675775,
11506
+ officialEnrollmentType: "EVENT_BASED",
11507
+ officialOperator: "HAS_COMPLETED",
11508
+ officialFilterTemplate: "simple_event_has_completed",
11509
+ officialFiltersExample: [],
11510
+ triggerCategoryId: "automation",
11511
+ modernCategoryId: "automation",
11512
+ triggerGroupLabel: "Sequence events",
11513
+ requiredScopes: [],
11514
+ requiredGates: [],
11515
+ sampleWorkflowId: "3954290933",
11516
+ sampleWorkflowName: "MCP Trigger Harvest - e_v2_contact_unenrolled_manually_from_sequence",
11517
+ sampleStatus: "created"
11518
+ },
11519
+ {
11520
+ catalogId: "e_viewed_cta",
11521
+ eventTypeId: "4-100215",
11522
+ eventTypeInnerId: 100215,
11523
+ officialEnrollmentType: "EVENT_BASED",
11524
+ officialOperator: "HAS_COMPLETED",
11525
+ officialFilterTemplate: "simple_event_has_completed",
11526
+ officialFiltersExample: [],
11527
+ triggerCategoryId: "digitalInteraction",
11528
+ modernCategoryId: "media",
11529
+ triggerGroupLabel: "Website events",
11530
+ requiredScopes: [
11531
+ "cta-access"
11532
+ ],
11533
+ requiredGates: [],
11534
+ sampleWorkflowId: "3955774699",
11535
+ sampleWorkflowName: "MCP Trigger Harvest - e_viewed_cta",
11536
+ sampleStatus: "created"
11537
+ },
11538
+ {
11539
+ catalogId: "e_viewed_web_interactive",
11540
+ eventTypeId: "4-1555804",
11541
+ eventTypeInnerId: 1555804,
11542
+ officialEnrollmentType: "EVENT_BASED",
11543
+ officialOperator: "HAS_COMPLETED",
11544
+ officialFilterTemplate: "simple_event_has_completed",
11545
+ officialFiltersExample: [],
11546
+ triggerCategoryId: "digitalInteraction",
11547
+ modernCategoryId: "media",
11548
+ triggerGroupLabel: "Website events",
11549
+ requiredScopes: [
11550
+ "calls-to-action-read"
11551
+ ],
11552
+ requiredGates: [],
11553
+ sampleWorkflowId: "3955857639",
11554
+ sampleWorkflowName: "MCP Trigger Harvest - e_viewed_web_interactive",
11555
+ sampleStatus: "created"
11556
+ },
11557
+ {
11558
+ catalogId: "e_visited_page",
11559
+ eventTypeId: "4-96000",
11560
+ eventTypeInnerId: 96e3,
11561
+ officialEnrollmentType: "EVENT_BASED",
11562
+ officialOperator: "HAS_COMPLETED",
11563
+ officialFilterTemplate: "simple_event_has_completed",
11564
+ officialFiltersExample: [],
11565
+ triggerCategoryId: "digitalInteraction",
11566
+ modernCategoryId: "media",
11567
+ triggerGroupLabel: "Website events",
11568
+ requiredScopes: [
11569
+ "web-analytics-api-access"
11570
+ ],
11571
+ requiredGates: [],
11572
+ sampleWorkflowId: "3953876201",
11573
+ sampleWorkflowName: "MCP Trigger Matrix - Page Visited",
11574
+ sampleStatus: "created"
11575
+ },
11576
+ {
11577
+ catalogId: "e_visitor_intent_status_change",
11578
+ eventTypeId: "4-5470329",
11579
+ eventTypeInnerId: 5470329,
11580
+ officialEnrollmentType: "EVENT_BASED",
11581
+ officialOperator: "HAS_COMPLETED",
11582
+ officialFilterTemplate: "simple_event_has_completed",
11583
+ officialFiltersExample: [],
11584
+ triggerCategoryId: "data",
11585
+ modernCategoryId: "buyer_company_insights",
11586
+ triggerGroupLabel: "Company signal events",
11587
+ requiredScopes: [
11588
+ "data-enrichment-platform-access"
11589
+ ],
11590
+ requiredGates: [],
11591
+ sampleWorkflowId: "3955760369",
11592
+ sampleWorkflowName: "MCP Trigger Harvest - e_visitor_intent_status_change",
11593
+ sampleStatus: "created"
11594
+ },
11595
+ {
11596
+ catalogId: "e_workflow_enrolled_v2",
11597
+ eventTypeId: "4-1466013",
11598
+ eventTypeInnerId: 1466013,
11599
+ officialEnrollmentType: "EVENT_BASED",
11600
+ officialOperator: "HAS_COMPLETED",
11601
+ officialFilterTemplate: "workflow_reference_filter",
11602
+ officialFiltersExample: [
11603
+ {
11604
+ property: "hs_flow_id",
11605
+ operation: {
11606
+ operator: "IS_ANY_OF",
11607
+ includeObjectsWithNoValueSet: false,
11608
+ values: [
11609
+ "3953877192"
11610
+ ],
11611
+ operationType: "ENUMERATION"
11612
+ },
11613
+ filterType: "PROPERTY"
11614
+ }
11615
+ ],
11616
+ triggerCategoryId: "automation",
11617
+ modernCategoryId: "automation",
11618
+ triggerGroupLabel: "Workflow events",
11619
+ requiredScopes: [],
11620
+ requiredGates: [],
11621
+ sampleWorkflowId: "3953876203",
11622
+ sampleWorkflowName: "MCP Trigger Matrix - Workflow Enrolled",
11623
+ sampleStatus: "created"
11624
+ },
11625
+ {
11626
+ catalogId: "e_workflow_goal_v2",
11627
+ eventTypeId: "4-1753168",
11628
+ eventTypeInnerId: 1753168,
11629
+ officialEnrollmentType: "EVENT_BASED",
11630
+ officialOperator: "HAS_COMPLETED",
11631
+ officialFilterTemplate: "workflow_reference_filter",
11632
+ officialFiltersExample: [
11633
+ {
11634
+ property: "hs_flow_id",
11635
+ operation: {
11636
+ operator: "IS_ANY_OF",
11637
+ includeObjectsWithNoValueSet: false,
11638
+ values: [
11639
+ "3953877209"
11640
+ ],
11641
+ operationType: "ENUMERATION"
11642
+ },
11643
+ filterType: "PROPERTY"
11644
+ }
11645
+ ],
11646
+ triggerCategoryId: "automation",
11647
+ modernCategoryId: "automation",
11648
+ triggerGroupLabel: "Workflow events",
11649
+ requiredScopes: [],
11650
+ requiredGates: [],
11651
+ sampleWorkflowId: "3954291952",
11652
+ sampleWorkflowName: "MCP Trigger Harvest - e_workflow_goal_v2",
11653
+ sampleStatus: "created"
11654
+ },
11655
+ {
11656
+ catalogId: "e_workflow_unenrolled_v2",
11657
+ eventTypeId: "4-1466014",
11658
+ eventTypeInnerId: 1466014,
11659
+ officialEnrollmentType: "EVENT_BASED",
11660
+ officialOperator: "HAS_COMPLETED",
11661
+ officialFilterTemplate: "workflow_reference_filter",
11662
+ officialFiltersExample: [
11663
+ {
11664
+ property: "hs_flow_id",
11665
+ operation: {
11666
+ operator: "IS_ANY_OF",
11667
+ includeObjectsWithNoValueSet: false,
11668
+ values: [
11669
+ "3953877209"
11670
+ ],
11671
+ operationType: "ENUMERATION"
11672
+ },
11673
+ filterType: "PROPERTY"
11674
+ }
11675
+ ],
11676
+ triggerCategoryId: "automation",
11677
+ modernCategoryId: "automation",
11678
+ triggerGroupLabel: "Workflow events",
11679
+ requiredScopes: [],
11680
+ requiredGates: [],
11681
+ sampleWorkflowId: "3954291951",
11682
+ sampleWorkflowName: "MCP Trigger Harvest - e_workflow_unenrolled_v2",
11683
+ sampleStatus: "created"
11684
+ }
11685
+ ];
11686
+
11687
+ // ../shared/data/workflow-enrollments/trigger-catalog.json
11688
+ var trigger_catalog_default = {
11689
+ extractedAt: "2026-03-15T14:25:45.414Z",
11690
+ sourceUrl: "https://app-eu1.hubspot.com/workflows/147957883/create",
11691
+ portalId: 147957883,
11692
+ totalTriggers: 96,
11693
+ chunkSize: 12,
11694
+ summary: {
11695
+ byCategory: {
11696
+ data: 45,
11697
+ contactInteraction: 30,
11698
+ digitalInteraction: 12,
11699
+ automation: 9
11700
+ },
11701
+ byModernCategory: {
11702
+ crm: 23,
11703
+ buyer_company_insights: 22,
11704
+ media: 12,
11705
+ automation: 9,
11706
+ whats_app: 8,
11707
+ email: 8,
11708
+ communication: 8,
11709
+ sms: 6
11710
+ },
11711
+ byGroup: {
11712
+ "Quote events": 19,
11713
+ "Company signal events": 18,
11714
+ "WhatsApp events": 8,
11715
+ "Email events": 8,
11716
+ "SMS events": 6,
11717
+ "Sequence events": 6,
11718
+ unknown: 5,
11719
+ "Website events": 5,
11720
+ "Workflow events": 3,
11721
+ "Contact signal events": 3,
11722
+ "Form events": 3,
11723
+ "Document events": 3,
11724
+ "Video events": 2,
11725
+ "Meeting events": 2,
11726
+ "Call events": 2,
11727
+ "Feedback insights events": 1,
11728
+ "Buyer Intent events": 1,
11729
+ CRM: 1
11730
+ }
11731
+ },
11732
+ relatedRequests: [
11733
+ "/api/framework-builder/v1/read/metadata/types/automationEventTriggers",
11734
+ "/api/framework-builder/v1/read/metadata/types/filtersFrontEnd",
11735
+ "/api/framework-builder/v1/read/metadata/types/crmSegmentsUI",
11736
+ "/api/framework-builder/v1/read/metadata/types/filters_associatedObjects_ils_",
11737
+ "/api/behavioral-events/v3/event-definitions",
11738
+ "/api/portal-event-ingest/v1/webhook-definitions",
11739
+ "/api/events/internal/v0/app/event-types?metaType=PORTAL_SPECIFIC_EVENT",
11740
+ "/api/events/internal/v0/app/event-types?metaType=INTEGRATION_EVENT"
11741
+ ],
11742
+ notes: [
11743
+ "This file is a flattened capture of the create-workflow page's automationEventTriggers metadata response.",
11744
+ "Fields are flattened from the original metadata.<field>.value shape into top-level properties per trigger.",
11745
+ "The create page also loads additional trigger-adjacent metadata from the relatedRequests endpoints above."
11746
+ ],
11747
+ entryChunks: [
11748
+ [{ id: "e_ad_interaction", pluralForm: "Ad interactions", hasOwners: false, objectTypeId: "4-1553675", triggerGroupId: "", janusGroup: "hs-ads-backend", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact interacts with an ad", description: "Ad was interacted with", enabled: true, singularForm: "Ad interaction", triggerGroupLabel: "", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction" }, { id: "e_anon_public_quote_download", pluralForm: "Anonymous Public Quote Downloads", hasOwners: false, objectTypeId: "4-3687775", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", triggerDescription: "Triggers when an anonymous user downloads public quote", requiredObjectTypeIds: ["0-14", "0-3"], enabled: true, singularForm: "Anonymous Public Quote Download ", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredScopes: ["cpq-quote-access"], requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_anon_quote_print", pluralForm: "Anonymous Quote Prints", hasOwners: false, objectTypeId: "4-3687777", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", triggerDescription: "Triggers when an anonymous visitor prints out quote", requiredObjectTypeIds: ["0-14", "0-3"], enabled: true, singularForm: "Anonymous Quote Print", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_anon_quote_view", pluralForm: "Anonymous Quote Views", hasOwners: false, objectTypeId: "4-3687774", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", triggerDescription: "Triggers when quote gets a view that cannot be tied back to a contact", requiredObjectTypeIds: ["0-14", "0-3"], enabled: true, singularForm: "Anonymous Quote View", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_buyer_intent_company_saved_view_event", pluralForm: "Buyer Intent Saved View Events", hasOwners: false, objectTypeId: "4-1887330", triggerGroupId: "buyer-intent", janusGroup: "hs-reveal", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company enters or exits an auto-add-configured saved view", description: "Describes configuration of Buyer Intent Saved View Event as a workflow trigger", enabled: true, singularForm: "Buyer Intent Saved View Event", triggerGroupLabel: "Buyer Intent events", hasPipelines: false, hasExternalObjectIds: false, requiredScopes: ["breeze-intelligence-free"], requiredGates: [], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data" }, { id: "e_call_ended", pluralForm: "Calls ended", hasOwners: false, objectTypeId: "4-1741072", triggerGroupId: "calls", janusGroup: "hs-voice-sms-config-be", triggerDescription: "When a call is ended with a contact", requiredObjectTypeIds: ["0-1"], description: "Triggers when a call initiated through HubSpot comes to an end", enabled: true, singularForm: "Call ended", triggerGroupLabel: "Call events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "communication", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_call_started", pluralForm: "Calls started", hasOwners: false, objectTypeId: "4-1733817", triggerGroupId: "calls", janusGroup: "hs-voice-sms-config-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a call is started with a contact", description: "Triggers when a call is initiated through HubSpot", enabled: true, singularForm: "Call started", triggerGroupLabel: "Call events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "communication", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_clicked_cta", pluralForm: "CTA (Legacy) clicks", hasOwners: false, objectTypeId: "4-100216", triggerGroupId: "website", janusGroup: "hs-lead-capture-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact clicks a legacy CTA", description: "CTA was clicked", enabled: true, singularForm: "CTA (Legacy) click", triggerGroupLabel: "Website events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["cta-access"], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction" }, { id: "e_clicked_link_in_email_v2", pluralForm: "Clicked links in marketing email", hasOwners: false, objectTypeId: "4-666288", triggerGroupId: "email", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact clicks a link in a marketing email", description: "A contact clicked a link in a marketing email", enabled: true, singularForm: "Clicked link in marketing email", triggerGroupLabel: "Email events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "email", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_clicked_link_in_shortmessage", pluralForm: "Link in SMS clicked", hasOwners: false, objectTypeId: "4-1722276", triggerGroupId: "sms", janusGroup: "hs-messaging-analytics", triggerDescription: "When a contact clicks a link in an SMS", requiredObjectTypeIds: ["0-1"], enabled: true, singularForm: "Link in SMS clicked", triggerGroupLabel: "SMS events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["sms-marketing-addon"], modernCategoryId: "sms", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_clicked_web_interactive", pluralForm: "CTA clicks", hasOwners: false, objectTypeId: "4-1555805", triggerGroupId: "website", janusGroup: "hs-lead-capture-be", triggerDescription: "When a contact clicks a CTA", requiredObjectTypeIds: ["0-1"], enabled: true, singularForm: "CTA click", triggerGroupLabel: "Website events", hasPipelines: false, hasExternalObjectIds: false, requiredScopes: ["calls-to-action-read"], requiredGates: [], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction" }, { id: "e_clicked_whatsapp_message", pluralForm: "Clicked link in WhatsApp messages", hasOwners: false, objectTypeId: "4-6607539", triggerGroupId: "WhatsApp", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When the contact clicks a link in a WhatsApp message", description: "WhatsApp message link clicked", enabled: true, singularForm: "Clicked link in WhatsApp message", triggerGroupLabel: "WhatsApp events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["MPG:WhatsAppV2"], requiredScopes: [], modernCategoryId: "whats_app", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction", omitted: false }],
11749
+ [{ id: "e_closing_agent_conversation_started", pluralForm: "Closing Agent Conversations Started", hasOwners: false, objectTypeId: "4-6300049", triggerGroupId: "quote", janusGroup: "hs-commerce-ai", requiredObjectTypeIds: ["0-14", "0-3"], triggerDescription: "Triggers when buyer starts a conversation with closing agent", enabled: true, singularForm: "Closing Agent Conversation Started", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_attends_event", pluralForm: "Event attendance", hasOwners: false, objectTypeId: "4-10021656", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company is developing a new offering", description: "When a company attends or may attend an event", enabled: true, singularForm: "Event attendance", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["VendorSignals::Q12026PredictLeadsSignalsRelease"], requiredScopes: ["data-agent-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_expanded_geographically", pluralForm: "Geographic expansion", hasOwners: false, objectTypeId: "4-5470325", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company expands geographically", description: "Triggers when a company expands geographically", enabled: true, singularForm: "Geographic expansion", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_growth_metrics", pluralForm: "Growth metrics", hasOwners: false, objectTypeId: "4-8148872", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company makes a statement about revenue growth or customer acquisition", description: "When a company makes a statement about revenue growth or customer acquisition", enabled: true, singularForm: "Growth metrics", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredScopes: ["data-enrichment-platform-access"], requiredGates: ["IntentSignals:SignalsBatchQ425"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_hired_executive", pluralForm: "Executive hiring", hasOwners: false, objectTypeId: "4-7727049", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company hires a C-suite executive", description: "When a company hires a C-suite executive", enabled: true, singularForm: "Executive hiring", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredScopes: ["data-enrichment-platform-access"], requiredGates: ["IntentSignals:SignalsBatchQ425"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_industry_recognition", pluralForm: "Industry recognition", hasOwners: false, objectTypeId: "4-9304135", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company wins awards or is recognized in analyst reports\n", description: "When a company wins awards or is recognized in analyst reports", enabled: true, singularForm: "Industry recognition", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["IntentSignals::Q12026ExaSignalsRelease"], requiredScopes: ["data-agent-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_is_developing", pluralForm: "Product development", hasOwners: false, objectTypeId: "4-10021655", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company is developing a new offering", description: "When a company is developing a new offering", enabled: true, singularForm: "Product development", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["VendorSignals::Q12026PredictLeadsSignalsRelease"], requiredScopes: ["data-agent-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_launched_product", pluralForm: "Product launches", hasOwners: false, objectTypeId: "4-7727050", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company launches a new product or service", description: "When a company launches a new product or service", enabled: true, singularForm: "Product launch", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredScopes: ["data-enrichment-platform-access"], requiredGates: ["IntentSignals:SignalsBatchQ425"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_layoff", pluralForm: "Layoffs", hasOwners: false, objectTypeId: "4-6099696", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company announced a reduction in workforce", description: "When a company announced a reduction in workforce", enabled: true, singularForm: "Layoff", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_merger_acquisition", pluralForm: "Mergers and acquisitions", hasOwners: false, objectTypeId: "4-8191201", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company enters a merger agreement, makes an acquisition, or is being acquired", description: "When a company enters a merger agreement, makes an acquisition, or is being acquired", enabled: true, singularForm: "Mergers and acquisitions", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["IntentSignals:SignalsBatchQ425"], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_news_signal_funding", pluralForm: "Funding", hasOwners: false, objectTypeId: "4-5076614", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company secures funding", enabled: true, singularForm: "Funding", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_office_closure", pluralForm: "Office closures", hasOwners: false, objectTypeId: "4-9304136", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company shuts down facilities or reduces physical presence", description: "When a company shuts down facilities or reduces physical presence", enabled: true, singularForm: "Office closure", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["IntentSignals::Q12026ExaSignalsRelease"], requiredScopes: ["data-agent-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }],
11750
+ [{ id: "e_company_physical_expansion", pluralForm: "Physical expansion", hasOwners: false, objectTypeId: "4-9304138", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company opens new facilities or increases office space", description: "When a company opens new facilities or increases office space", enabled: true, singularForm: "Physical expansion", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["IntentSignals::Q12026ExaSignalsRelease"], requiredScopes: ["data-agent-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_published_leadership_content", pluralForm: "Leadership content", hasOwners: false, objectTypeId: "4-6099692", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company executive publishes a leadership article", enabled: true, singularForm: "Leadership content", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_received_technology_investment", pluralForm: "Technology investment", hasOwners: false, objectTypeId: "4-6099691", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company receives technology investments", enabled: true, singularForm: "Technology investment", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_regulatory_approval", pluralForm: "Regulatory approvals", hasOwners: false, objectTypeId: "4-9304137", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company receives permits or certifications for expansion", description: "When a company receives permits or certifications for expansion", enabled: true, singularForm: "Regulatory approval", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["IntentSignals::Q12026ExaSignalsRelease"], requiredScopes: ["data-agent-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_company_strategic_partnership", pluralForm: "Strategic partnerships", hasOwners: false, objectTypeId: "4-8191199", triggerGroupId: "company_signal", janusGroup: "hs-company-discovery", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company enters a strategic partnership agreement", description: "When a company enters a strategic partnership agreement", enabled: true, singularForm: "Strategic partnership", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["IntentSignals:SignalsBatchQ425"], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_contact_job_ended", pluralForm: "Jobs ended", hasOwners: false, objectTypeId: "4-5470333", triggerGroupId: "contact_signal", janusGroup: "hs-person-dataset", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact associated with a tracked company leaves their job", description: "This event triggers when a contact is detected to have left a job.", enabled: true, singularForm: "Job ended", triggerGroupLabel: "Contact signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data" }, { id: "e_contact_job_started", pluralForm: "Jobs started", hasOwners: false, objectTypeId: "4-5470334", triggerGroupId: "contact_signal", janusGroup: "hs-person-dataset", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact associated with a tracked company starts a new job", description: "This event triggers when a contact is detected to have started a job.", enabled: true, singularForm: "Job started", triggerGroupLabel: "Contact signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data" }, { id: "e_contact_meeting_booked", pluralForm: "Meetings booked", hasOwners: false, objectTypeId: "4-1720599", triggerGroupId: "meetings", janusGroup: "hs-meeting-execution-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact books a meeting", description: "A contact booked a meeting", enabled: true, singularForm: "Meeting booked", triggerGroupLabel: "Meeting events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "communication", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_contact_meeting_outcome_changed", pluralForm: "Meeting outcome changes", hasOwners: false, objectTypeId: "4-1724222", triggerGroupId: "meetings", janusGroup: "hs-meeting-execution-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When the outcome of a meeting with a contact is changed", description: "A contact changed a meeting outcome", enabled: true, singularForm: "Meeting outcome change", triggerGroupLabel: "Meeting events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "communication", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_delivered_shortmessage", pluralForm: "SMS delivered", hasOwners: false, objectTypeId: "4-1721168", triggerGroupId: "sms", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When an SMS is delivered to a contact", enabled: true, singularForm: "SMS delivered", triggerGroupLabel: "SMS events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["sms-marketing-addon"], modernCategoryId: "sms", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_delivered_whatsapp_message", pluralForm: "WhatsApp messages delivered", hasOwners: false, objectTypeId: "4-6607541", triggerGroupId: "WhatsApp", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a WhatsApp message was delivered to the contact", description: "WhatsApp message delivered", enabled: true, singularForm: "WhatsApp message delivered", triggerGroupLabel: "WhatsApp events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["MPG:WhatsAppV2"], requiredScopes: [], modernCategoryId: "whats_app", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction", omitted: false }, { id: "e_document_completed_v2", pluralForm: "Contacts finished viewing documents (Intermittent)", hasOwners: false, objectTypeId: "4-1522438", triggerGroupId: "sales-documents", janusGroup: "hs-sales-coaching-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact finishes viewing a document", description: "Triggers when a sales document is completed", enabled: true, singularForm: "Contact finished viewing a document (Intermittent)", triggerGroupLabel: "Document events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["documents-read-access"], modernCategoryId: "communication", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }],
11751
+ [{ id: "e_document_shared_v2", pluralForm: "Documents shared with contacts", hasOwners: false, objectTypeId: "4-1522437", triggerGroupId: "sales-documents", janusGroup: "hs-sales-coaching-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a document is shared with a contact", description: "Triggers when a sales document is shared", enabled: true, singularForm: "Document shared with contact", triggerGroupLabel: "Document events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["documents-read-access"], modernCategoryId: "communication", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_document_viewed_v2", pluralForm: "Contacts viewed documents", hasOwners: false, objectTypeId: "4-1522436", triggerGroupId: "sales-documents", janusGroup: "hs-sales-coaching-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a document is viewed by a contact", description: "Triggers when a sales document is viewed", enabled: true, singularForm: "Contact viewed a document", triggerGroupLabel: "Document events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["documents-read-access"], modernCategoryId: "communication", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_dropped_shortmessage", pluralForm: "SMS dropped", hasOwners: false, objectTypeId: "4-1725149", triggerGroupId: "sms", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When an SMS intended for a contact is dropped", enabled: true, singularForm: "SMS dropped", triggerGroupLabel: "SMS events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["sms-marketing-addon"], modernCategoryId: "sms", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_dropped_whatsapp_message", pluralForm: "Dropped Whatsapp messages", hasOwners: false, objectTypeId: "4-5076608", triggerGroupId: "WhatsApp", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a WhatsApp message sent to a contact is dropped", description: "WhatsApp message dropped", enabled: true, singularForm: "Dropped Whatsapp message", triggerGroupLabel: "WhatsApp events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["MPG:WhatsAppV2"], requiredScopes: [], modernCategoryId: "whats_app", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction", omitted: false }, { id: "e_email_bounce_detected", pluralForm: "Email bounce", hasOwners: false, objectTypeId: "4-5470331", triggerGroupId: "contact_signal", janusGroup: "hs-person-dataset", requiredObjectTypeIds: ["0-1"], triggerDescription: "When an email bounce risk is detected for a contact associated with a tracked company", enabled: true, singularForm: "Email bounce", triggerGroupLabel: "Contact signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_failed_to_deliver_shortmessage", pluralForm: "Delivering SMS failed", hasOwners: false, objectTypeId: "4-1752910", triggerGroupId: "sms", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When an SMS intended for a contact fails to deliver", enabled: true, singularForm: "Delivering SMS failed", triggerGroupLabel: "SMS events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["sms-marketing-addon"], modernCategoryId: "sms", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_failed_to_send_shortmessage", pluralForm: "Sending SMS failed", hasOwners: false, objectTypeId: "4-1752904", triggerGroupId: "sms", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When an SMS intended for a contact fails to send", enabled: true, singularForm: "Sending SMS failed", triggerGroupLabel: "SMS events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["sms-marketing-addon"], modernCategoryId: "sms", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_failed_whatsapp_message", pluralForm: "Sending WhatsApp messages failed", hasOwners: false, objectTypeId: "4-6607542", triggerGroupId: "WhatsApp", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a WhatsApp message delivery to a contact failed", description: "Failed to deliver WhatsApp message", enabled: true, singularForm: "Sending WhatsApp message failed", triggerGroupLabel: "WhatsApp events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["MPG:WhatsAppV2"], requiredScopes: [], modernCategoryId: "whats_app", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction", omitted: false, blockedObjectTypeIds: [] }, { id: "e_feedback_mention", pluralForm: "Feedback mentions", hasOwners: false, objectTypeId: "4-4481980", triggerGroupId: "feedback-insights", janusGroup: "hs-feedback-backend", requiredObjectTypeIds: ["0-1", "0-2"], triggerDescription: "When a participant mentions a feedback topic", enabled: true, singularForm: "Feedback mention", triggerGroupLabel: "Feedback insights events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["ServiceHub:Feedback:FeedbackInsights"], requiredScopes: ["service-feedback-enterprise-access"], modernCategoryId: "communication", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_form_interaction_v2", pluralForm: "Form interactions", hasOwners: false, objectTypeId: "4-1639799", triggerGroupId: "form", janusGroup: "hs-submissions-infrastructure", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact interacts with a form", description: "Contact interacted with a form", enabled: true, singularForm: "Form interaction", triggerGroupLabel: "Form events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction" }, { id: "e_form_submission_v2", pluralForm: "Form submissions", hasOwners: false, objectTypeId: "4-1639801", triggerGroupId: "form", janusGroup: "hs-submissions-infrastructure", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact submits a form", enabled: true, singularForm: "Form submission", triggerGroupLabel: "Form events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction" }, { id: "e_form_view_v2", pluralForm: "Form views", hasOwners: false, objectTypeId: "4-1639797", triggerGroupId: "form", janusGroup: "hs-submissions-infrastructure", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact views a form", description: "Form view", enabled: true, singularForm: "Form view", triggerGroupLabel: "Form events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction" }],
11752
+ [{ id: "e_handed_whatsapp_message_to_agent", pluralForm: "Sent Whatsapp messages", hasOwners: false, objectTypeId: "4-5076607", triggerGroupId: "WhatsApp", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a WhatsApp message is sent to the contact", description: "WhatsApp message sent", enabled: true, singularForm: "Sent Whatsapp message", triggerGroupLabel: "WhatsApp events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["MPG:WhatsAppV2"], requiredScopes: [], modernCategoryId: "whats_app", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction", omitted: false }, { id: "e_hs_scheduled_email_v2", pluralForm: "Marketing or sales emails sent", hasOwners: false, objectTypeId: "4-667638", triggerGroupId: "email", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact is sent a marketing email or a sales email sent from a connected inbox", description: "Email sent", enabled: true, singularForm: "Marketing or sales email sent", triggerGroupLabel: "Email events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "email", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_mb_attention_span", pluralForm: "Attention Span", hasOwners: false, objectTypeId: "4-675784", triggerGroupId: "Video events", janusGroup: "hs-media-content-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "Triggers after a user is finished watching a video", description: "Video watch events with attention span data like percent played.", enabled: true, singularForm: "Attention Span", triggerGroupLabel: "Video events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["MediaContent::AttentionSpanWorkflowTrigger"], requiredScopes: ["marketing-video"], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction", omitted: false }, { id: "e_mb_media_played", pluralForm: "Media Plays", hasOwners: false, objectTypeId: "4-675783", triggerGroupId: "Video events", janusGroup: "hs-media-content-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact plays media", description: "Timestamp of when a contact played a media file stored in your hubspot account.", enabled: true, singularForm: "Media Play", triggerGroupLabel: "Video events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction", omitted: false }, { id: "e_mta_bounced_email_v2", pluralForm: "Marketing or sales emails bounced", hasOwners: false, objectTypeId: "4-666439", triggerGroupId: "email", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact's inbox bounces a marketing or sales email", description: "A contact's email bounced", enabled: true, singularForm: "Marketing or sales email bounced", triggerGroupLabel: "Email events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "email", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_mta_delivered_email_v2", pluralForm: "Marketing or sales emails delivered", hasOwners: false, objectTypeId: "4-665536", triggerGroupId: "email", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact's inbox receives a marketing or sales email", description: "Marketing or sales email was delivered", enabled: true, singularForm: "Marketing or sales email delivered", triggerGroupLabel: "Email events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "email", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_object_created_v2", pluralForm: "Records created", hasOwners: false, objectTypeId: "4-1463224", triggerGroupId: "", janusGroup: "hs-objects-platform", requiredObjectTypeIds: [], triggerDescription: "When a new record is created in the CRM", description: "Object is created in the CRM", enabled: true, singularForm: "Record created", triggerGroupLabel: "", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data" }, { id: "e_object_influenced_marketing_campaign_v4", pluralForm: "Campaign Influences", hasOwners: false, objectTypeId: "4-1563645", triggerGroupId: "crm", janusGroup: "hs-studio-measure-be", triggerDescription: "Triggers when a contact interacts with a campaign asset", requiredObjectTypeIds: ["0-1"], description: "Adding trigger for influenced contacts", enabled: true, singularForm: "Campaign Influence", triggerGroupLabel: "CRM", hasPipelines: false, hasExternalObjectIds: false, requiredScopes: ["campaigns-access"], requiredGates: ["MO:Automation:WorkflowsCampaign"], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction", omitted: false, tag: "beta" }, { id: "e_opened_email_v2", pluralForm: "Opened marketing emails", hasOwners: false, objectTypeId: "4-666440", triggerGroupId: "email", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact opens a marketing email", description: "User opened email", enabled: true, singularForm: "Opened marketing email", triggerGroupLabel: "Email events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "email", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_opted_out_of_whatsapp_subscription", pluralForm: "Opted out of WhatsApp subscriptions", hasOwners: false, objectTypeId: "4-6911595", triggerGroupId: "WhatsApp", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact opts out of receiving WhatsApp messages", description: "Opted out of WhatsApp subscription", enabled: true, singularForm: "Opted out of WhatsApp subscription", triggerGroupLabel: "WhatsApp events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "whats_app", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction", omitted: false }, { id: "e_playbook_log_on_record", pluralForm: "Playbook Logs", hasOwners: false, objectTypeId: "4-1814177", triggerGroupId: "", janusGroup: "hs-crm-card-platform-be", requiredObjectTypeIds: [], triggerDescription: "When a note is recorded within a HubSpot playbook", description: "Triggers when a user logs a playbook", enabled: true, singularForm: "Playbook Log", triggerGroupLabel: "", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["playbooks-write"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", blockedObjectTypeIds: ["0-136"] }, { id: "e_process_submission_completed_on_object", pluralForm: "Process Guide Submission Completions", hasOwners: false, objectTypeId: "4-3499849", janusGroup: "hs-crm-card-platform-be", triggerDescription: "When a Process Guide is submitted on a record", requiredObjectTypeIds: [], description: "Triggers when a user submits a process guide on a record ", enabled: true, singularForm: "Process Guide Submission Completion", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["CRM:Processes:ProcessGuideListCard"], requiredScopes: ["crm-processes-write"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data" }],
11753
+ [{ id: "e_property_value_changed", pluralForm: "Property values changed", hasOwners: false, objectTypeId: "4-655002", triggerGroupId: "", janusGroup: "hs-automation-engine-be", requiredObjectTypeIds: [], triggerDescription: "When a record\u2019s property value is added, edited, or removed", description: "Property value changed on an object", enabled: true, singularForm: "Property value changed", triggerGroupLabel: "", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data" }, { id: "e_public_quote_download", pluralForm: "Public Quote Downloads", hasOwners: false, objectTypeId: "4-3395636", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14"], triggerDescription: "Triggers when a user downloads public quote", enabled: true, singularForm: "Public Quote Download", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_accepted", pluralForm: "Quote Accepted Events", hasOwners: false, objectTypeId: "4-4035552", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14", "0-3"], triggerDescription: "Triggers when a quote enters an accepted state", enabled: true, singularForm: "Quote Accepted Event", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_approval_approved", pluralForm: "Quote Approved Events", hasOwners: false, objectTypeId: "4-4940920", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14"], triggerDescription: "Triggers when quote approval is approved", enabled: true, singularForm: "Quote Approved Event", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_approval_recalled", pluralForm: "Quote Approval Recalled Events", hasOwners: false, objectTypeId: "4-6300050", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14"], triggerDescription: "Triggers when quote approval is recalled", enabled: true, singularForm: "Quote Approval Recalled Event", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_approval_rejected", pluralForm: "Quote Rejected Events", hasOwners: false, objectTypeId: "4-4940921", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14"], triggerDescription: "Triggers when quote approval is rejected", enabled: true, singularForm: "Quote Rejected Event", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_approval_requested", pluralForm: "Quote Approval Requested Events", hasOwners: false, objectTypeId: "4-4967160", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14"], triggerDescription: "Triggers when quote approval is requested", enabled: true, singularForm: "Quote Approval Requested Event", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_buyer_signed", pluralForm: "Quote Buyer Signed Events", hasOwners: false, objectTypeId: "4-6300056", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14"], triggerDescription: "Triggers when buyer signs quote", enabled: true, singularForm: "Quote Buyer Signed Event", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_countersigned", pluralForm: "Quote Countersigned Events", hasOwners: false, objectTypeId: "4-5076606", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14"], triggerDescription: "Triggers when countersigner signs quote", enabled: true, singularForm: "Quote Countersigned Event", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_email_sent", pluralForm: "Quote Emails Sent", hasOwners: false, objectTypeId: "4-2006192", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14", "0-3", "0-2", "0-1"], triggerDescription: "Triggers when quote email is sent", enabled: true, singularForm: "Quote Email Sent", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_expiration_reminder_email", pluralForm: "Quote Expiration Reminder Emails Sent", hasOwners: false, objectTypeId: "4-5470322", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14", "0-3", "0-2", "0-1"], triggerDescription: "Triggers when the quote expiration reminder emails were sent", enabled: true, singularForm: "Quote Expiration Reminder Email Sent", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_expired", pluralForm: "Quote Expired Events", hasOwners: false, objectTypeId: "4-6300054", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14"], triggerDescription: "Triggers when a quote enters an expired state", enabled: true, singularForm: "Quote Expired Event", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }],
11754
+ [{ id: "e_quote_followup_reminder_email", pluralForm: "Quote Followup Reminder Emails Sent", hasOwners: false, objectTypeId: "4-5470323", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14", "0-3", "0-2", "0-1"], triggerDescription: "Triggers when the quote followup reminder emails were sent", enabled: true, singularForm: "Quote Followup Reminder Email Sent", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_manually_signed", pluralForm: "Quote Manually Signed Events", hasOwners: false, objectTypeId: "4-6300053", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14"], triggerDescription: "Triggers when quote is manually signed", enabled: true, singularForm: "Quote Manually Signed Event", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_published", pluralForm: "Quote Published Events", hasOwners: false, objectTypeId: "4-5470320", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14"], triggerDescription: "Triggers when a quote enters a published state", enabled: true, singularForm: "Quote Published Event", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_quote_recalled", pluralForm: "Quote Recalled Events", hasOwners: false, objectTypeId: "4-4810356", triggerGroupId: "quote", janusGroup: "hs-commerce-quotes-management-be", requiredObjectTypeIds: ["0-14"], triggerDescription: "Triggers when a quote enters a recalled state", enabled: true, singularForm: "Quote Recalled Event", triggerGroupLabel: "Quote events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["commerce:qmgmt:ExposeQuoteEventsAsWorkflowTriggers"], requiredScopes: ["cpq-quote-access"], modernCategoryId: "crm", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_read_whatsapp_message", pluralForm: "WhatsApp messages read", hasOwners: false, objectTypeId: "4-6607540", triggerGroupId: "WhatsApp", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact reads a WhatsApp message", description: "WhatsApp message read", enabled: true, singularForm: "WhatsApp message read", triggerGroupLabel: "WhatsApp events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: ["MPG:WhatsAppV2"], requiredScopes: [], modernCategoryId: "whats_app", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction", omitted: false }, { id: "e_replied_email_v2", pluralForm: "Replied to marketing emails", hasOwners: false, objectTypeId: "4-665538", triggerGroupId: "email", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact replies to a marketing email", description: "A contact replied to an email", enabled: true, singularForm: "Replied to marketing email", triggerGroupLabel: "Email events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "email", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_replied_whatsapp_message", pluralForm: "Replied to WhatsApp messages", hasOwners: false, objectTypeId: "4-6911594", triggerGroupId: "WhatsApp", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When the contact replies to a WhatsApp message", description: "WhatsApp message replied", enabled: true, singularForm: "Replied to a WhatsApp message", triggerGroupLabel: "WhatsApp events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "whats_app", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction", omitted: false }, { id: "e_research_intent_level_change", pluralForm: "Research level changes", hasOwners: false, objectTypeId: "4-5470332", triggerGroupId: "company_signal", janusGroup: "hs-reveal", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company starts researching one of your topics or changes research level", description: "When a company starts researching one of your topics or changes research level", enabled: true, singularForm: "Research level change", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_sent_shortmessage", pluralForm: "SMS sent", hasOwners: false, objectTypeId: "4-1719453", triggerGroupId: "sms", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When an SMS is sent to a contact", enabled: true, singularForm: "SMS sent", triggerGroupLabel: "SMS events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["sms-marketing-addon"], modernCategoryId: "sms", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_sent_tracked_inbox_email_v8", pluralForm: "Sales email sends", hasOwners: false, objectTypeId: "4-1367006", triggerGroupId: "email", janusGroup: "hs-con-email-platform", requiredObjectTypeIds: ["0-1"], triggerDescription: "A user sent a sales/service email", enabled: true, singularForm: "Sales email send", triggerGroupLabel: "Email events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "email", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_updated_email_subscription_status_v2", pluralForm: "Updated marketing email subscription statuses", hasOwners: false, objectTypeId: "4-666289", triggerGroupId: "email", janusGroup: "hs-messaging-analytics", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact's subscription to marketing emails is updated", description: "Contact updated their email subscription status", enabled: true, singularForm: "Updated marketing email subscription status", triggerGroupLabel: "Email events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "email", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "contactInteraction" }, { id: "e_v2_contact_booked_meeting_through_sequence", pluralForm: "Contacts booked meeting through a sequence", hasOwners: false, objectTypeId: "4-675773", triggerGroupId: "sequences", janusGroup: "hs-sequences-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact books a meeting through a sequence", description: "Triggers when a contact books a meeting via a sequence", enabled: true, singularForm: "Contact booked meeting through a sequence", triggerGroupLabel: "Sequence events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "automation", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "automation" }],
11755
+ [{ id: "e_v2_contact_enrolled_in_sequence", pluralForm: "Contacts enrolled in a sequence", hasOwners: false, objectTypeId: "4-675777", triggerGroupId: "sequences", janusGroup: "hs-sequences-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact is enrolled in a sequence", description: "Triggers when a contact is enrolled in a sequence", enabled: true, singularForm: "Contact enrolled in a sequence", triggerGroupLabel: "Sequence events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "automation", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "automation" }, { id: "e_v2_contact_finished_sequence", pluralForm: "Sequences finished", hasOwners: false, objectTypeId: "4-675778", triggerGroupId: "sequences", janusGroup: "hs-sequences-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact finishes a sequence", description: "Triggers when a contact finishes a sequence", enabled: true, singularForm: "Sequence finished", triggerGroupLabel: "Sequence events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "automation", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "automation" }, { id: "e_v2_contact_unenrolled_from_sequence", pluralForm: "Contacts unenrolled from sequence", hasOwners: false, objectTypeId: "4-675776", triggerGroupId: "sequences", janusGroup: "hs-sequences-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact is unenrolled from a sequence", description: "Triggers when a contact unenrolls from a sequence", enabled: true, singularForm: "Contact unenrolled from sequence", triggerGroupLabel: "Sequence events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "automation", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "automation" }, { id: "e_v2_contact_unenrolled_from_sequence_via_workflow", pluralForm: "Contacts unenrolled from sequence via workflow", hasOwners: false, objectTypeId: "4-1497402", triggerGroupId: "sequences", janusGroup: "hs-sequences-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact is unenrolled from a sequence through a workflow", description: "Triggers when a contact is unenrolled in a sequence by a workflow", enabled: true, singularForm: "Contact unenrolled from sequence via workflow", triggerGroupLabel: "Sequence events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "automation", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "automation" }, { id: "e_v2_contact_unenrolled_manually_from_sequence", pluralForm: "Contacts unenrolled manually from sequence", hasOwners: false, objectTypeId: "4-675775", triggerGroupId: "sequences", janusGroup: "hs-sequences-be", triggerDescription: "When a contact is unenrolled from a sequence manually", requiredObjectTypeIds: ["0-1"], description: "Triggers when a contact is manually unenrolled from a sequence", enabled: true, singularForm: "Contact unenrolled manually from sequence", triggerGroupLabel: "Sequence events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: [], modernCategoryId: "automation", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "automation" }, { id: "e_viewed_cta", pluralForm: "CTA (Legacy) views", hasOwners: false, objectTypeId: "4-100215", triggerGroupId: "website", janusGroup: "hs-lead-capture-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact views a legacy CTA", description: "CTA was viewed", enabled: true, singularForm: "CTA (Legacy) view", triggerGroupLabel: "Website events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["cta-access"], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction" }, { id: "e_viewed_web_interactive", pluralForm: "CTA views", hasOwners: false, objectTypeId: "4-1555804", triggerGroupId: "website", janusGroup: "hs-lead-capture-be", triggerDescription: "When a contact views a CTA", requiredObjectTypeIds: ["0-1"], enabled: true, singularForm: "CTA view", triggerGroupLabel: "Website events", hasPipelines: false, hasExternalObjectIds: false, requiredScopes: ["calls-to-action-read"], requiredGates: [], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction" }, { id: "e_visited_page", pluralForm: "Pages visited", hasOwners: false, objectTypeId: "4-96000", triggerGroupId: "website", janusGroup: "hs-web-analytics-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a contact visits a website page", description: "Page view", enabled: true, singularForm: "Page visited", triggerGroupLabel: "Website events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["web-analytics-api-access"], modernCategoryId: "media", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "digitalInteraction" }, { id: "e_visitor_intent_status_change", pluralForm: "Visitor intent updates", hasOwners: false, objectTypeId: "4-5470329", triggerGroupId: "company_signal", janusGroup: "hs-reveal", requiredObjectTypeIds: ["0-2"], triggerDescription: "When a company domain enters or exits an intent criteria", description: "Shows when a company domain has entered or exited a visitor intent.", enabled: true, singularForm: "Visitor intent update", triggerGroupLabel: "Company signal events", hasPipelines: false, hasExternalObjectIds: false, requiredGates: [], requiredScopes: ["data-enrichment-platform-access"], modernCategoryId: "buyer_company_insights", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "data", omitted: false }, { id: "e_workflow_enrolled_v2", pluralForm: "Enrolled in workflows", hasOwners: false, objectTypeId: "4-1466013", triggerGroupId: "workflows", janusGroup: "hs-automation-observability-be", requiredObjectTypeIds: [], triggerDescription: "When a record enrolls in a workflow", description: "An object is enrolled in a workflow", enabled: true, singularForm: "Enrolled in workflow", triggerGroupLabel: "Workflow events", hasPipelines: false, hasExternalObjectIds: false, requiredScopes: [], requiredGates: [], modernCategoryId: "automation", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "automation" }, { id: "e_workflow_goal_v2", pluralForm: "Achieved workflow goals", hasOwners: false, objectTypeId: "4-1753168", triggerGroupId: "workflows", janusGroup: "hs-automation-observability-be", requiredObjectTypeIds: ["0-1"], triggerDescription: "When a record achieves a workflow goal", description: "Triggers when a workflow goal is met", enabled: true, singularForm: "Achieved workflow goal", triggerGroupLabel: "Workflow events", hasPipelines: false, hasExternalObjectIds: false, requiredScopes: [], requiredGates: [], modernCategoryId: "automation", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "automation" }, { id: "e_workflow_unenrolled_v2", pluralForm: "Unenrolled from workflows", hasOwners: false, objectTypeId: "4-1466014", triggerGroupId: "workflows", janusGroup: "hs-automation-observability-be", requiredObjectTypeIds: [], triggerDescription: "When a record unenrolls from a workflow", description: "An object is unenrolled from a workflow", enabled: true, singularForm: "Unenrolled from workflow", triggerGroupLabel: "Workflow events", hasPipelines: false, hasExternalObjectIds: false, requiredScopes: [], requiredGates: [], modernCategoryId: "automation", hasCustomProperties: false, hasDefaultProperties: true, triggerCategoryId: "automation" }]
11756
+ ]
11757
+ };
11758
+
11759
+ // ../shared/pure/workflow-enrollment-triggers.ts
11760
+ var EMPTY_PARAMETER_SCHEMA = [];
11761
+ var PROPERTY_VALUE_OPERATORS = [
11762
+ "IS_KNOWN",
11763
+ "IS_UNKNOWN",
11764
+ "IS_EQUAL_TO",
11765
+ "IS_NOT_EQUAL_TO"
11766
+ ];
11767
+ var PROPERTY_VALUE_OPERATOR_SET = new Set(PROPERTY_VALUE_OPERATORS);
11768
+ var PROPERTY_VALUE_CHANGED_PARAMETER_SCHEMA = [
11769
+ {
11770
+ name: "property_name",
11771
+ required: true,
11772
+ description: "Internal CRM property name to watch, for example 'firstname' or 'dealstage'."
11773
+ },
11774
+ {
11775
+ name: "property_value_operator",
11776
+ required: false,
11777
+ description: "Defaults to IS_KNOWN. Supported values: IS_KNOWN, IS_UNKNOWN, IS_EQUAL_TO, IS_NOT_EQUAL_TO."
11778
+ },
11779
+ {
11780
+ name: "property_value",
11781
+ required: false,
11782
+ description: "Required when property_value_operator is IS_EQUAL_TO or IS_NOT_EQUAL_TO."
11783
+ }
11784
+ ];
11785
+ var WORKFLOW_REFERENCE_PARAMETER_SCHEMA = [
11786
+ {
11787
+ name: "target_workflow_id",
11788
+ required: true,
11789
+ description: "Workflow ID to match in the trigger filter."
11790
+ }
11791
+ ];
11792
+ var PARAMETER_SCHEMA_BY_TEMPLATE = {
11793
+ simple_event_has_completed: EMPTY_PARAMETER_SCHEMA,
11794
+ property_value_changed_named_property: PROPERTY_VALUE_CHANGED_PARAMETER_SCHEMA,
11795
+ workflow_reference_filter: WORKFLOW_REFERENCE_PARAMETER_SCHEMA
11796
+ };
11797
+ var EVENT_TYPE_METADATA_BY_EVENT_TYPE_ID = {
11798
+ "4-655002": {
11799
+ requiresRefinementFilters: true,
11800
+ refinementNote: "Requires event-specific refinement filters (e.g. hs_property_name, hs_property_value) embedded in the event filter branch to specify which property and value to trigger on. Standard PROPERTY filters are NOT sufficient. Prefer LIST_BASED enrollment with re-enrollment triggers for 'property changed to X' scenarios."
11801
+ }
11802
+ };
11803
+ var normalizedRows = normalized_triggers_default;
11804
+ var rawCatalog = trigger_catalog_default;
11805
+ var rawCatalogById = new Map(
11806
+ (rawCatalog.entryChunks ?? []).flat().map((entry) => [entry.id, entry])
11807
+ );
11808
+ var SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGERS = normalizedRows.map((row) => {
11809
+ const catalogEntry = rawCatalogById.get(row.catalogId);
11810
+ const fallbackDescription = catalogEntry?.triggerDescription ?? row.sampleWorkflowName ?? "";
11811
+ const eventMetadata = EVENT_TYPE_METADATA_BY_EVENT_TYPE_ID[row.eventTypeId];
11812
+ const officialCriteriaExample = buildBaseEventCriteria(row.eventTypeId, false, row.officialFiltersExample);
11813
+ return {
11814
+ catalogId: row.catalogId,
11815
+ criteriaType: "EVENT_BASED",
11816
+ shortcutKind: "EVENT_TRIGGER_SHORTCUT",
11817
+ eventTypeId: row.eventTypeId,
11818
+ name: catalogEntry?.singularForm?.trim() || row.catalogId,
11819
+ description: catalogEntry?.description?.trim() || fallbackDescription.trim(),
11820
+ requiresRefinementFilters: eventMetadata?.requiresRefinementFilters ?? false,
11821
+ refinementNote: eventMetadata?.refinementNote,
11822
+ template: row.officialFilterTemplate,
11823
+ officialFiltersExample: row.officialFiltersExample,
11824
+ officialCriteriaExample,
11825
+ criteriaShape: officialCriteriaExample,
11826
+ triggerCategoryId: row.triggerCategoryId,
11827
+ modernCategoryId: row.modernCategoryId,
11828
+ triggerGroupLabel: row.triggerGroupLabel,
11829
+ requiredScopes: row.requiredScopes,
11830
+ requiredGates: row.requiredGates,
11831
+ requiredObjectTypeIds: catalogEntry?.requiredObjectTypeIds ?? [],
11832
+ parameterSchema: PARAMETER_SCHEMA_BY_TEMPLATE[row.officialFilterTemplate],
11833
+ sampleWorkflowId: row.sampleWorkflowId,
11834
+ sampleWorkflowName: row.sampleWorkflowName,
11835
+ usageGuidance: eventMetadata?.refinementNote ?? "Use this row for enrollment_trigger shortcuts or raw EVENT_BASED event branches. event_type_id is an event catalog ID, not a CRM object type ID.",
11836
+ preferredFor: [
11837
+ "Single-trigger EVENT_BASED workflows",
11838
+ "Cases where a confirmed eventTypeId is needed for a UNIFIED_EVENTS branch"
11839
+ ],
11840
+ avoidFor: eventMetadata?.requiresRefinementFilters ? ["Prefer LIST_BASED when the intent is 'property changed to X' with simple property-based re-enrollment."] : []
11841
+ };
11842
+ });
11843
+ var LIST_BASED_EXAMPLE_FILTERS = [
11844
+ {
11845
+ filterType: "PROPERTY",
11846
+ property: "lifecyclestage",
11847
+ operation: {
11848
+ operationType: "ENUMERATION",
11849
+ operator: "IS_ANY_OF",
11850
+ values: ["customer"],
11851
+ includeObjectsWithNoValueSet: false
11852
+ }
11853
+ }
11854
+ ];
11855
+ var LIST_BASED_REENROLLMENT_BRANCHES = [
11856
+ {
11857
+ filterBranchType: "OR",
11858
+ filterBranchOperator: "OR",
11859
+ filters: [],
11860
+ filterBranches: [
11861
+ {
11862
+ filterBranchType: "AND",
11863
+ filterBranchOperator: "AND",
11864
+ filters: [...LIST_BASED_EXAMPLE_FILTERS],
11865
+ filterBranches: []
11866
+ }
11867
+ ]
11868
+ }
11869
+ ];
11870
+ var WORKFLOW_ENROLLMENT_REFERENCE_EXAMPLES = [
11871
+ {
11872
+ catalogId: "list_based_filter_criteria",
11873
+ criteriaType: "LIST_BASED",
11874
+ shortcutKind: "CRITERIA_EXAMPLE",
11875
+ eventTypeId: "",
11876
+ name: "List-based filter criteria",
11877
+ description: "Enroll records when they currently match a list-style filter definition.",
11878
+ requiresRefinementFilters: false,
11879
+ refinementNote: "Root listFilterBranch should be OR with one or more nested AND branches, matching HubSpot list filter structure.",
11880
+ template: "list_filter_branch",
11881
+ officialFiltersExample: [],
11882
+ officialCriteriaExample: buildBaseListCriteria(LIST_BASED_EXAMPLE_FILTERS, false),
11883
+ criteriaShape: buildBaseListCriteria([
11884
+ {
11885
+ filterType: "PROPERTY",
11886
+ property: "<internal_property_name>",
11887
+ operation: {
11888
+ operationType: "<operation_type>",
11889
+ operator: "<operator>"
11890
+ }
11891
+ }
11892
+ ], false),
11893
+ triggerCategoryId: "synthetic",
11894
+ modernCategoryId: "list_based",
11895
+ triggerGroupLabel: "List-based enrollment",
11896
+ requiredScopes: [],
11897
+ requiredGates: [],
11898
+ requiredObjectTypeIds: [],
11899
+ parameterSchema: [],
11900
+ sampleWorkflowId: "",
11901
+ sampleWorkflowName: "",
11902
+ usageGuidance: "Use this when enrollment should be based on the record currently matching filter criteria. Hand-author enrollment_criteria with type LIST_BASED; do not use enrollment_trigger for this row.",
11903
+ preferredFor: [
11904
+ "Property/state-based enrollment rules",
11905
+ "Criteria that should match the current record state rather than a single event occurrence"
11906
+ ],
11907
+ avoidFor: [
11908
+ "Single-event triggers that already have an EVENT_BASED catalog row"
11909
+ ]
11910
+ },
11911
+ {
11912
+ catalogId: "list_based_property_change_reenrollment",
11913
+ criteriaType: "LIST_BASED",
11914
+ shortcutKind: "CRITERIA_EXAMPLE",
11915
+ eventTypeId: "",
11916
+ name: "List-based property change re-enrollment",
11917
+ description: "Use list-based criteria plus re-enrollment trigger branches when a property change should re-check the filter.",
11918
+ requiresRefinementFilters: false,
11919
+ refinementNote: "Prefer this pattern over raw property-change EVENT_BASED criteria when the business intent is 'enroll whenever property X becomes Y'.",
11920
+ template: "list_filter_branch",
11921
+ officialFiltersExample: [],
11922
+ officialCriteriaExample: buildBaseListCriteria(
11923
+ LIST_BASED_EXAMPLE_FILTERS,
11924
+ true,
11925
+ LIST_BASED_REENROLLMENT_BRANCHES
11926
+ ),
11927
+ criteriaShape: buildBaseListCriteria([
11928
+ {
11929
+ filterType: "PROPERTY",
11930
+ property: "<internal_property_name>",
11931
+ operation: {
11932
+ operationType: "<operation_type>",
11933
+ operator: "<operator>"
11934
+ }
11935
+ }
11936
+ ], true, [
11937
+ {
11938
+ filterBranchType: "OR",
11939
+ filterBranchOperator: "OR",
11940
+ filters: [],
11941
+ filterBranches: [
11942
+ {
11943
+ filterBranchType: "AND",
11944
+ filterBranchOperator: "AND",
11945
+ filters: [
11946
+ {
11947
+ filterType: "PROPERTY",
11948
+ property: "<reenrollment_property_name>",
11949
+ operation: {
11950
+ operationType: "<operation_type>",
11951
+ operator: "<operator>"
11952
+ }
11953
+ }
11954
+ ],
11955
+ filterBranches: []
11956
+ }
11957
+ ]
11958
+ }
11959
+ ]),
11960
+ triggerCategoryId: "synthetic",
11961
+ modernCategoryId: "list_based",
11962
+ triggerGroupLabel: "List-based enrollment",
11963
+ requiredScopes: [],
11964
+ requiredGates: [],
11965
+ requiredObjectTypeIds: [],
11966
+ parameterSchema: [],
11967
+ sampleWorkflowId: "",
11968
+ sampleWorkflowName: "",
11969
+ usageGuidance: "Use LIST_BASED when the desired behavior is 'enroll when property X is or becomes Y'. Put the matching logic in listFilterBranch and the property to watch for re-checks in reEnrollmentTriggersFilterBranches.",
11970
+ preferredFor: [
11971
+ "Property-change scenarios that should re-enroll when a record returns to the matching state",
11972
+ "Simple 'becomes known' or 'equals value' workflows"
11973
+ ],
11974
+ avoidFor: [
11975
+ "Cases where a simpler event shortcut is sufficient and current-state matching is not needed"
11976
+ ]
11977
+ },
11978
+ {
11979
+ catalogId: "manual_only",
11980
+ criteriaType: "MANUAL",
11981
+ shortcutKind: "CRITERIA_EXAMPLE",
11982
+ eventTypeId: "",
11983
+ name: "Manual enrollment only",
11984
+ description: "Use manual enrollment when records should only enter the workflow explicitly.",
11985
+ requiresRefinementFilters: false,
11986
+ refinementNote: "Manual workflows do not define automatic event or list criteria.",
11987
+ template: "manual_only",
11988
+ officialFiltersExample: [],
11989
+ officialCriteriaExample: buildManualCriteria(true),
11990
+ criteriaShape: buildManualCriteria(true),
11991
+ triggerCategoryId: "synthetic",
11992
+ modernCategoryId: "manual",
11993
+ triggerGroupLabel: "Manual enrollment",
11994
+ requiredScopes: [],
11995
+ requiredGates: [],
11996
+ requiredObjectTypeIds: [],
11997
+ parameterSchema: [],
11998
+ sampleWorkflowId: "",
11999
+ sampleWorkflowName: "",
12000
+ usageGuidance: "Use enrollment_criteria.type = MANUAL when enrollment should only happen through explicit user or automation enrollment paths. Do not attach eventTypeId or listFilterBranch.",
12001
+ preferredFor: [
12002
+ "Workflows that should never auto-enroll from data changes",
12003
+ "Operational workflows started manually or from another automation"
12004
+ ],
12005
+ avoidFor: [
12006
+ "Any workflow that needs automatic enrollment from events or matching criteria"
12007
+ ]
12008
+ }
12009
+ ];
12010
+ var WORKFLOW_ENROLLMENT_CATALOG = [
12011
+ ...SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGERS,
12012
+ ...WORKFLOW_ENROLLMENT_REFERENCE_EXAMPLES
12013
+ ];
12014
+ var SIMPLE_EVENT_WORKFLOW_TRIGGER_CATALOG_IDS = SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGERS.filter((trigger) => trigger.template === "simple_event_has_completed").map((trigger) => trigger.catalogId);
12015
+ var WORKFLOW_ENROLLMENT_TRIGGER_CATALOG_IDS = SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGERS.map((trigger) => trigger.catalogId);
12016
+ var SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGER_MAP = new Map(
12017
+ SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGERS.map((trigger) => [trigger.catalogId, trigger])
12018
+ );
12019
+ var SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGERS_BY_EVENT_TYPE_ID = new Map(
12020
+ SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGERS.map((trigger) => [trigger.eventTypeId, trigger])
12021
+ );
12022
+ var KNOWN_WORKFLOW_ENROLLMENT_EVENT_TYPE_IDS = new Set(
12023
+ SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGERS.map((trigger) => trigger.eventTypeId)
12024
+ );
12025
+ var WORKFLOW_EVENT_TYPES_REQUIRING_REFINEMENT = new Set(
12026
+ SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGERS.filter((trigger) => trigger.requiresRefinementFilters).map((trigger) => trigger.eventTypeId)
12027
+ );
12028
+ var buildAllowedFieldNames = (trigger) => [
12029
+ "catalog_id",
12030
+ "should_re_enroll",
12031
+ ...trigger.parameterSchema.map((parameter) => parameter.name)
12032
+ ];
12033
+ function buildBaseEventCriteria(eventTypeId, shouldReEnroll, filters = []) {
12034
+ return {
12035
+ type: "EVENT_BASED",
12036
+ shouldReEnroll,
12037
+ eventFilterBranches: [
12038
+ {
12039
+ filterBranchType: "UNIFIED_EVENTS",
12040
+ filterBranchOperator: "AND",
12041
+ eventTypeId,
12042
+ operator: "HAS_COMPLETED",
12043
+ filters,
12044
+ filterBranches: []
12045
+ }
12046
+ ],
12047
+ listMembershipFilterBranches: []
12048
+ };
12049
+ }
12050
+ function buildBaseListCriteria(filters, shouldReEnroll, reEnrollmentTriggersFilterBranches = []) {
12051
+ return {
12052
+ type: "LIST_BASED",
12053
+ shouldReEnroll,
12054
+ listFilterBranch: {
12055
+ filterBranchType: "OR",
12056
+ filterBranchOperator: "OR",
12057
+ filters: [],
12058
+ filterBranches: [
12059
+ {
12060
+ filterBranchType: "AND",
12061
+ filterBranchOperator: "AND",
12062
+ filters,
12063
+ filterBranches: []
12064
+ }
12065
+ ]
12066
+ },
12067
+ reEnrollmentTriggersFilterBranches,
12068
+ unEnrollObjectsNotMeetingCriteria: true
12069
+ };
12070
+ }
12071
+ function buildManualCriteria(shouldReEnroll) {
12072
+ return {
12073
+ type: "MANUAL",
12074
+ shouldReEnroll
12075
+ };
12076
+ }
12077
+ var buildPropertyValueOperation = (input) => {
12078
+ const operator = input.property_value_operator ?? "IS_KNOWN";
12079
+ if (operator === "IS_KNOWN" || operator === "IS_UNKNOWN") {
12080
+ return {
12081
+ operationType: "ALL_PROPERTY",
12082
+ operator,
12083
+ includeObjectsWithNoValueSet: false
12084
+ };
12085
+ }
12086
+ return {
12087
+ operationType: "STRING",
12088
+ operator,
12089
+ value: input.property_value,
12090
+ includeObjectsWithNoValueSet: false
12091
+ };
12092
+ };
12093
+ var validatePropertyValueChangedTriggerInput = (trigger) => {
12094
+ const issues = [];
12095
+ if (typeof trigger.property_name !== "string" || trigger.property_name.length === 0) {
12096
+ issues.push({
12097
+ path: ["property_name"],
12098
+ message: "property_name is required for this enrollment trigger"
12099
+ });
12100
+ }
12101
+ if (trigger.property_value_operator !== void 0 && !PROPERTY_VALUE_OPERATOR_SET.has(String(trigger.property_value_operator))) {
12102
+ issues.push({
12103
+ path: ["property_value_operator"],
12104
+ message: `property_value_operator must be one of: ${PROPERTY_VALUE_OPERATORS.join(", ")}`
12105
+ });
12106
+ }
12107
+ const operator = trigger.property_value_operator ?? "IS_KNOWN";
12108
+ if ((operator === "IS_EQUAL_TO" || operator === "IS_NOT_EQUAL_TO") && typeof trigger.property_value !== "string") {
12109
+ issues.push({
12110
+ path: ["property_value"],
12111
+ message: "property_value is required when property_value_operator compares against a specific value"
12112
+ });
12113
+ }
12114
+ return issues;
12115
+ };
12116
+ var validateWorkflowReferenceTriggerInput = (trigger) => typeof trigger.target_workflow_id === "string" && trigger.target_workflow_id.length > 0 ? [] : [{
12117
+ path: ["target_workflow_id"],
12118
+ message: "target_workflow_id is required for this enrollment trigger"
12119
+ }];
12120
+ var isSupportedWorkflowEnrollmentTrigger = (catalogId) => SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGER_MAP.has(catalogId);
12121
+ var getSupportedWorkflowEnrollmentTrigger = (catalogId) => {
12122
+ const trigger = SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGER_MAP.get(catalogId);
12123
+ if (!trigger) {
12124
+ throw new Error(`Unsupported workflow enrollment trigger '${catalogId}'`);
12125
+ }
12126
+ return trigger;
12127
+ };
12128
+ var getSupportedWorkflowEnrollmentTriggerByEventTypeId = (eventTypeId) => SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGERS_BY_EVENT_TYPE_ID.get(eventTypeId);
12129
+ var validateWorkflowEnrollmentTriggerInput = (trigger) => {
12130
+ const issues = [];
12131
+ if (typeof trigger.catalog_id !== "string" || trigger.catalog_id.length === 0) {
12132
+ issues.push({
12133
+ path: ["catalog_id"],
12134
+ message: "catalog_id is required"
12135
+ });
12136
+ return issues;
12137
+ }
12138
+ const definition = SUPPORTED_WORKFLOW_ENROLLMENT_TRIGGER_MAP.get(trigger.catalog_id);
12139
+ if (!definition) {
12140
+ issues.push({
12141
+ path: ["catalog_id"],
12142
+ message: `Unsupported workflow enrollment trigger '${trigger.catalog_id}'. Query workflow_enrollment_triggers for valid catalog_id values.`
12143
+ });
12144
+ return issues;
12145
+ }
12146
+ if (trigger.should_re_enroll !== void 0 && typeof trigger.should_re_enroll !== "boolean") {
12147
+ issues.push({
12148
+ path: ["should_re_enroll"],
12149
+ message: "should_re_enroll must be a boolean"
12150
+ });
12151
+ }
12152
+ const allowedFieldNames = new Set(buildAllowedFieldNames(definition));
12153
+ for (const key of Object.keys(trigger)) {
12154
+ if (allowedFieldNames.has(key)) continue;
12155
+ issues.push({
12156
+ path: [key],
12157
+ message: `Field '${key}' is not supported for enrollment trigger '${trigger.catalog_id}'`
12158
+ });
12159
+ }
12160
+ if (definition.template === "property_value_changed_named_property") {
12161
+ issues.push(...validatePropertyValueChangedTriggerInput(trigger));
12162
+ }
12163
+ if (definition.template === "workflow_reference_filter") {
12164
+ issues.push(...validateWorkflowReferenceTriggerInput(trigger));
12165
+ }
12166
+ return issues;
12167
+ };
12168
+ var validateWorkflowEnrollmentTriggerObjectType = (trigger, objectTypeId, operationIndex) => {
12169
+ if (!isSupportedWorkflowEnrollmentTrigger(trigger.catalog_id)) return [];
12170
+ const definition = getSupportedWorkflowEnrollmentTrigger(trigger.catalog_id);
12171
+ if (definition.requiredObjectTypeIds.length === 0) return [];
12172
+ if (definition.requiredObjectTypeIds.includes(objectTypeId)) return [];
12173
+ return [{
12174
+ severity: "error",
12175
+ operation_index: operationIndex,
12176
+ code: "WORKFLOW_ENROLLMENT_TRIGGER_OBJECT_TYPE_MISMATCH",
12177
+ message: `Enrollment trigger '${trigger.catalog_id}' only supports object types ${definition.requiredObjectTypeIds.join(", ")}, but workflow object_type_id is '${objectTypeId}'`
12178
+ }];
12179
+ };
12180
+ var WORKFLOW_EVENT_REFINEMENT_FILTERS = {
12181
+ "4-655002": [
12182
+ { property: "hs_name", allowedOperationTypes: ["STRING"] },
12183
+ { property: "hs_value", allowedOperationTypes: ["ALL_PROPERTY", "STRING"] }
12184
+ ],
12185
+ "4-1466013": [
12186
+ { property: "hs_flow_id", allowedOperationTypes: ["ENUMERATION"] }
12187
+ ],
12188
+ "4-1466014": [
12189
+ { property: "hs_flow_id", allowedOperationTypes: ["ENUMERATION"] }
12190
+ ],
12191
+ "4-1753168": [
12192
+ { property: "hs_flow_id", allowedOperationTypes: ["ENUMERATION"] }
12193
+ ]
12194
+ };
12195
+ var buildEnrollmentCriteriaFromTrigger = (trigger) => {
12196
+ const definition = getSupportedWorkflowEnrollmentTrigger(trigger.catalog_id);
12197
+ const shouldReEnroll = trigger.should_re_enroll ?? false;
12198
+ if (definition.template === "simple_event_has_completed") {
12199
+ return buildBaseEventCriteria(definition.eventTypeId, shouldReEnroll);
12200
+ }
12201
+ if (definition.template === "property_value_changed_named_property") {
12202
+ return buildBaseEventCriteria(definition.eventTypeId, shouldReEnroll, [
12203
+ {
12204
+ filterType: "PROPERTY",
12205
+ property: "hs_name",
12206
+ operation: {
12207
+ operationType: "STRING",
12208
+ operator: "IS_EQUAL_TO",
12209
+ value: trigger.property_name,
12210
+ includeObjectsWithNoValueSet: false
12211
+ }
12212
+ },
12213
+ {
12214
+ filterType: "PROPERTY",
12215
+ property: "hs_value",
12216
+ operation: buildPropertyValueOperation(trigger)
12217
+ }
12218
+ ]);
12219
+ }
12220
+ if (definition.template === "workflow_reference_filter") {
12221
+ return buildBaseEventCriteria(definition.eventTypeId, shouldReEnroll, [
12222
+ {
12223
+ filterType: "PROPERTY",
12224
+ property: "hs_flow_id",
12225
+ operation: {
12226
+ operationType: "ENUMERATION",
12227
+ operator: "IS_ANY_OF",
12228
+ values: [trigger.target_workflow_id],
12229
+ includeObjectsWithNoValueSet: false
12230
+ }
12231
+ }
12232
+ ]);
12233
+ }
12234
+ throw new Error(`Unsupported workflow enrollment trigger template '${definition.template}'`);
12235
+ };
12236
+
12237
+ // ../shared/pure/workflow-operation-schema.ts
12238
+ var WorkflowConnectionSchema2 = z62.object({
12239
+ edgeType: z62.string().min(1),
12240
+ nextActionId: z62.string().min(1)
12241
+ }).passthrough();
12242
+ var WorkflowFilterOperationSchema = z62.object({
12243
+ operationType: z62.string().min(1, "operation.operationType is required for workflow property filters"),
12244
+ operator: z62.string().min(1)
12245
+ }).passthrough();
12246
+ var WorkflowFilterSchema = z62.object({
12247
+ filterType: z62.string().min(1),
12248
+ property: z62.string().optional(),
12249
+ operation: WorkflowFilterOperationSchema.optional()
12250
+ }).passthrough().superRefine((value, ctx) => {
12251
+ if (value.filterType !== "PROPERTY") return;
12252
+ if (!value.property || value.property.length === 0) {
12253
+ ctx.addIssue({
12254
+ code: z62.ZodIssueCode.custom,
12255
+ message: "property filters require property",
12256
+ path: ["property"]
12257
+ });
12258
+ }
12259
+ if (!value.operation) {
12260
+ ctx.addIssue({
12261
+ code: z62.ZodIssueCode.custom,
12262
+ message: "property filters require operation",
12263
+ path: ["operation"]
12264
+ });
12265
+ }
12266
+ });
12267
+ var WorkflowBranchSchema = z62.object({
12268
+ connection: WorkflowConnectionSchema2.optional(),
12269
+ nextActionId: z62.string().min(1).optional()
12270
+ }).passthrough().superRefine((value, ctx) => {
12271
+ if (value.connection || value.nextActionId) return;
12272
+ ctx.addIssue({
12273
+ code: z62.ZodIssueCode.custom,
12274
+ message: "workflow branches require connection.nextActionId or nextActionId",
12275
+ path: ["connection"]
12276
+ });
12277
+ });
12278
+ var WorkflowEnrollmentBranchSchema = z62.object({
12279
+ filterBranchType: z62.string().min(1),
12280
+ filterBranchOperator: z62.string().optional(),
12281
+ filterBranches: z62.array(z62.lazy(() => WorkflowEnrollmentBranchSchema)).default([]),
12282
+ filters: z62.array(WorkflowFilterSchema).default([]),
12283
+ eventTypeId: z62.string().optional(),
12284
+ operator: z62.string().optional(),
12285
+ objectTypeId: z62.string().optional(),
12286
+ associationTypeId: z62.number().optional(),
12287
+ associationCategory: z62.string().optional()
12288
+ }).passthrough().superRefine((value, ctx) => {
12289
+ if (value.filterBranchType !== "UNIFIED_EVENTS") return;
12290
+ if (!value.eventTypeId || value.eventTypeId.length === 0) {
12291
+ ctx.addIssue({
12292
+ code: z62.ZodIssueCode.custom,
12293
+ message: "UNIFIED_EVENTS filter branches require eventTypeId (e.g. '4-655002' for property change). Query workflow_enrollment_triggers for valid event_type_id values.",
12294
+ path: ["eventTypeId"]
12295
+ });
12296
+ return;
12297
+ }
12298
+ if (/^0-\d+$/.test(value.eventTypeId)) {
12299
+ ctx.addIssue({
12300
+ code: z62.ZodIssueCode.custom,
12301
+ message: `eventTypeId '${value.eventTypeId}' looks like a CRM object type ID, not an event type ID. Event type IDs use '4-*' or '6-*' prefix (e.g. '4-655002' for property change). Query workflow_enrollment_triggers for valid event_type_id values.`,
12302
+ path: ["eventTypeId"]
12303
+ });
12304
+ }
12305
+ });
12306
+ var EventBasedEnrollmentCriteriaSchema = z62.object({
12307
+ type: z62.literal("EVENT_BASED"),
12308
+ shouldReEnroll: z62.boolean(),
12309
+ eventFilterBranches: z62.array(WorkflowEnrollmentBranchSchema).min(1),
12310
+ listMembershipFilterBranches: z62.array(WorkflowEnrollmentBranchSchema).default([])
12311
+ }).passthrough();
12312
+ var ListBasedEnrollmentCriteriaSchema = z62.object({
12313
+ type: z62.literal("LIST_BASED"),
12314
+ shouldReEnroll: z62.boolean(),
12315
+ listFilterBranch: WorkflowEnrollmentBranchSchema,
12316
+ reEnrollmentTriggersFilterBranches: z62.array(WorkflowEnrollmentBranchSchema).default([])
12317
+ }).passthrough();
12318
+ var ManualEnrollmentCriteriaSchema = z62.object({
12319
+ type: z62.literal("MANUAL"),
12320
+ shouldReEnroll: z62.boolean()
12321
+ }).passthrough();
12322
+ var WorkflowEnrollmentCriteriaSchema = z62.union([
12323
+ EventBasedEnrollmentCriteriaSchema,
12324
+ ListBasedEnrollmentCriteriaSchema,
12325
+ ManualEnrollmentCriteriaSchema
12326
+ ]);
12327
+ var WorkflowEnrollmentTriggerSchema = z62.object({
12328
+ catalog_id: z62.string().min(1),
12329
+ should_re_enroll: z62.boolean().optional()
12330
+ }).catchall(z62.unknown()).superRefine((value, ctx) => {
12331
+ const issues = validateWorkflowEnrollmentTriggerInput(value);
12332
+ for (const issue of issues) {
12333
+ ctx.addIssue({
12334
+ code: z62.ZodIssueCode.custom,
12335
+ message: issue.message,
12336
+ path: [...issue.path]
12337
+ });
12338
+ }
12339
+ });
12340
+ var WorkflowEnrollmentTriggerCatalogIdSchema = z62.string().refine(
12341
+ (catalogId) => isSupportedWorkflowEnrollmentTrigger(catalogId),
12342
+ "Unsupported workflow enrollment trigger catalog_id"
12343
+ );
12344
+ var BaseWorkflowActionSchema = z62.object({
12345
+ actionId: z62.string().min(1),
12346
+ type: z62.string().min(1),
12347
+ actionTypeId: z62.string().optional(),
12348
+ actionTypeVersion: z62.number().int().optional(),
12349
+ connection: WorkflowConnectionSchema2.optional(),
12350
+ fields: z62.record(z62.string(), z62.unknown()).optional(),
12351
+ staticBranches: z62.array(WorkflowBranchSchema).optional(),
12352
+ listBranches: z62.array(WorkflowBranchSchema).optional(),
12353
+ defaultBranch: WorkflowBranchSchema.optional(),
12354
+ defaultBranchName: z62.string().optional()
12355
+ }).passthrough().superRefine((value, ctx) => {
12356
+ if (value.type !== "BRANCH") return;
12357
+ const hasStaticBranches = (value.staticBranches?.length ?? 0) > 0;
12358
+ const hasListBranches = (value.listBranches?.length ?? 0) > 0;
12359
+ const hasDefaultBranch = value.defaultBranch != null;
12360
+ if (hasStaticBranches || hasListBranches || hasDefaultBranch) return;
12361
+ ctx.addIssue({
12362
+ code: z62.ZodIssueCode.custom,
12363
+ message: "BRANCH actions require at least one branch target",
12364
+ path: ["type"]
12365
+ });
12366
+ });
12367
+ var TypedWorkflowActionSchema = BaseWorkflowActionSchema.superRefine((value, ctx) => {
12368
+ const definitionKey = value.actionTypeId ?? value.type;
12369
+ if (!(definitionKey in SUPPORTED_WORKFLOW_ACTION_TYPES_BY_ID)) {
12370
+ ctx.addIssue({
12371
+ code: z62.ZodIssueCode.custom,
12372
+ message: definitionKey === "BRANCH" ? "Unsupported workflow action type 'BRANCH'. Use 'STATIC_BRANCH' for branching actions and query action_type_catalog for supported action shapes." : `Unsupported workflow action '${definitionKey}'. Query action_type_catalog for the supported action types exposed to the LLM.`,
12373
+ path: value.actionTypeId ? ["actionTypeId"] : ["type"]
12374
+ });
9628
12375
  return;
9629
12376
  }
9630
12377
  const typedSchema = WorkflowActionSchemasByDefinitionKey[definitionKey];
@@ -9657,6 +12404,7 @@ var CreateWorkflowOperationSchema = z63.object({
9657
12404
  is_enabled: z63.boolean().optional().default(false),
9658
12405
  actions: z63.array(WorkflowActionSchema).min(1),
9659
12406
  enrollment_criteria: WorkflowEnrollmentCriteriaSchema.optional(),
12407
+ enrollment_trigger: WorkflowEnrollmentTriggerSchema.optional(),
9660
12408
  suppression_list_ids: z63.array(z63.number()).optional(),
9661
12409
  time_windows: z63.array(z63.record(z63.string(), z63.unknown())).optional(),
9662
12410
  blocked_dates: z63.array(z63.record(z63.string(), z63.unknown())).optional()
@@ -9670,15 +12418,22 @@ var fields44 = [
9670
12418
  name: "actions",
9671
12419
  type: "array",
9672
12420
  required: true,
9673
- description: "Action graph array matching the HubSpot V4 API shape. Query action_type_catalog for supported actionTypeId values, expected fields, and example_actions_json. Use type 'SINGLE_CONNECTION' for linear steps or 'STATIC_BRANCH' for branching steps.",
12421
+ description: "Action graph array matching the HubSpot V4 API shape. Query action_type_catalog first and use field_schema_json plus recommended_create_examples_json to shape actions. Check resource_requirements_json before using resource-dependent fields like listId, flow_id, sequenceId, subscriptionId, inbox IDs, user IDs, or association label IDs. Read create_guidance_text for action-specific caveats. Use type 'SINGLE_CONNECTION' for linear steps or 'STATIC_BRANCH' for branching steps.",
9674
12422
  itemShape: "{ actionId: string, actionTypeId?: string, actionTypeVersion?: number, type: 'SINGLE_CONNECTION'|'STATIC_BRANCH', connection?: { edgeType: string, nextActionId: string }, fields?: { [fieldName]: value }, inputValue?: object, staticBranches?: object[], listBranches?: object[], defaultBranch?: object, defaultBranchName?: string }"
9675
12423
  },
12424
+ {
12425
+ name: "enrollment_trigger",
12426
+ type: "object",
12427
+ required: false,
12428
+ description: "Shortcut for supported single-trigger EVENT_BASED enrollments. Query workflow_enrollment_triggers first and only use rows where shortcut_kind = 'EVENT_TRIGGER_SHORTCUT'. Use catalog_id plus parameter_schema_json, official_filter_template, official_filters_example_json, and required_object_type_ids_json to shape the input. Use this instead of hand-authoring enrollment_criteria when a catalog shortcut row exists.",
12429
+ shape: "{ catalog_id: string, should_re_enroll?: boolean, ...template-specific parameters from parameter_schema_json such as property_name/property_value_operator/property_value or target_workflow_id }"
12430
+ },
9676
12431
  {
9677
12432
  name: "enrollment_criteria",
9678
12433
  type: "object",
9679
12434
  required: false,
9680
- description: "Enrollment trigger config. Set type to 'EVENT_BASED' or 'LIST_BASED'. For EVENT_BASED, each eventFilterBranch needs a valid eventTypeId from the workflow_event_types table (e.g. '4-655002' for property change, '4-1639801' for form submission). Do NOT use object type IDs like '0-3' as eventTypeId \u2014 those are CRM object types, not events. IMPORTANT: Some event types (notably '4-655002' property value changed) require event-specific refinement filters (e.g. hs_property_name, hs_property_value) embedded in the event filter branch \u2014 standard PROPERTY filters are NOT sufficient. For 'when property X changes to Y' scenarios, prefer LIST_BASED enrollment with re-enrollment triggers on that property instead. PROPERTY filters must include operation.operationType. For enum properties use 'ENUMERATION' not 'MULTISTRING'. Query synced workflows for structural examples.",
9681
- shape: "EVENT_BASED: { shouldReEnroll: boolean, eventFilterBranches: [{ filterBranchType: 'UNIFIED_EVENTS', filterBranchOperator?, eventTypeId: string (REQUIRED, from workflow_event_types), operator?, filters: [{ filterType: 'PROPERTY', property: string, operation: { operationType: string, operator: string } }], filterBranches: [...] }], listMembershipFilterBranches?: [...] } | LIST_BASED: { shouldReEnroll: boolean, listFilterBranch: { filterBranchType, filters: [...], filterBranches: [...] }, reEnrollmentTriggersFilterBranches?: [...] }"
12435
+ description: "Enrollment trigger config. Set type to 'EVENT_BASED', 'LIST_BASED', or 'MANUAL'. Prefer enrollment_trigger for supported single-trigger EVENT_BASED shortcuts. For EVENT_BASED, each eventFilterBranch needs a valid eventTypeId from the workflow_enrollment_triggers table (e.g. '4-655002' for property change, '4-1639801' for form submission). Do NOT use object type IDs like '0-3' as eventTypeId \u2014 those are CRM object types, not events. For LIST_BASED and MANUAL, query workflow_enrollment_triggers rows where shortcut_kind = 'CRITERIA_EXAMPLE' and reuse official_criteria_example_json, criteria_shape_json, usage_guidance, preferred_for_json, and avoid_for_json. IMPORTANT: Some event types (notably '4-655002' property value changed) require event-specific refinement filters (e.g. hs_property_name, hs_property_value) embedded in the event filter branch \u2014 standard PROPERTY filters are NOT sufficient. For 'when property X changes to Y' scenarios, prefer LIST_BASED enrollment with re-enrollment triggers on that property instead. PROPERTY filters must include operation.operationType. For enum properties use 'ENUMERATION' not 'MULTISTRING'. Query synced workflows for structural examples.",
12436
+ shape: "EVENT_BASED: { shouldReEnroll: boolean, eventFilterBranches: [{ filterBranchType: 'UNIFIED_EVENTS', filterBranchOperator?, eventTypeId: string (REQUIRED, from workflow_enrollment_triggers.event_type_id), operator?, filters: [{ filterType: 'PROPERTY', property: string, operation: { operationType: string, operator: string } }], filterBranches: [...] }], listMembershipFilterBranches?: [...] } | LIST_BASED: { shouldReEnroll: boolean, listFilterBranch: { filterBranchType, filters: [...], filterBranches: [...] }, reEnrollmentTriggersFilterBranches?: [...], unEnrollObjectsNotMeetingCriteria?: boolean } | MANUAL: { shouldReEnroll: boolean }"
9682
12437
  },
9683
12438
  { name: "suppression_list_ids", type: "array", required: false, description: "Array of list IDs to suppress from enrollment" },
9684
12439
  { name: "time_windows", type: "array", required: false, description: "Execution time windows" },
@@ -9689,7 +12444,7 @@ var createWorkflowMeta = {
9689
12444
  category: "create",
9690
12445
  executionMode: "hubspot",
9691
12446
  summary: "Create a HubSpot workflow with actions and enrollment criteria",
9692
- description: "Create a new workflow using the HubSpot Automation V4 API. Use CONTACT_FLOW for contact-based workflows, PLATFORM_FLOW for all other types (deals, tickets, custom objects). Actions should match the HubSpot API shape \u2014 query action_type_catalog to discover supported action types, their required fields, and example_actions_json. Query existing workflows for enrollment_criteria examples. NOTE: EVENT_BASED enrollment with event types like '4-655002' (property changed) requires undocumented refinement filters \u2014 prefer LIST_BASED enrollment with re-enrollment triggers for property-change scenarios.",
12447
+ description: "Create a new workflow using the HubSpot Automation V4 API. Use CONTACT_FLOW for contact-based workflows, PLATFORM_FLOW for all other types (deals, tickets, custom objects). Query action_type_catalog before constructing actions: field_schema_json documents required fields, recommended_create_examples_json provides create-safe templates, resource_requirements_json shows which IDs must be resolved first, and create_guidance_text captures empirical action-specific caveats. Query workflow_enrollment_triggers before constructing enrollment logic: shortcut_kind = 'EVENT_TRIGGER_SHORTCUT' rows support enrollment_trigger, while shortcut_kind = 'CRITERIA_EXAMPLE' rows provide LIST_BASED and MANUAL enrollment_criteria examples via official_criteria_example_json, criteria_shape_json, and usage_guidance.",
9693
12448
  fields: fields44,
9694
12449
  example: {
9695
12450
  fields: {
@@ -9711,45 +12466,27 @@ var createWorkflowMeta = {
9711
12466
  actionTypeVersion: 0,
9712
12467
  actionTypeId: "0-3",
9713
12468
  type: "SINGLE_CONNECTION",
9714
- fields: { task_type: "TODO", subject: "Welcome follow-up task" }
9715
- }
9716
- ],
9717
- enrollment_criteria: {
9718
- shouldReEnroll: true,
9719
- type: "LIST_BASED",
9720
- listFilterBranch: {
9721
- filterBranchType: "OR",
9722
- filterBranchOperator: "OR",
9723
- filters: [],
9724
- filterBranches: [
9725
- {
9726
- filterBranchType: "AND",
9727
- filterBranchOperator: "AND",
9728
- filters: [
9729
- {
9730
- filterType: "PROPERTY",
9731
- property: "lifecyclestage",
9732
- operation: {
9733
- operationType: "ENUMERATION",
9734
- operator: "IS_ANY_OF",
9735
- values: ["customer"]
9736
- }
12469
+ fields: {
12470
+ task_type: "TODO",
12471
+ subject: "Welcome follow-up task",
12472
+ body: "<p>Follow up with {{ enrolled_object.email }}</p>",
12473
+ associations: [
12474
+ {
12475
+ target: {
12476
+ associationCategory: "HUBSPOT_DEFINED",
12477
+ associationTypeId: 204
12478
+ },
12479
+ value: {
12480
+ type: "ENROLLED_OBJECT"
9737
12481
  }
9738
- ],
9739
- filterBranches: []
9740
- }
9741
- ]
9742
- },
9743
- reEnrollmentTriggersFilterBranches: [
9744
- {
9745
- filterBranchType: "UNIFIED_EVENTS",
9746
- filterBranchOperator: "AND",
9747
- eventTypeId: "4-655002",
9748
- operator: "HAS_COMPLETED",
9749
- filters: [],
9750
- filterBranches: []
12482
+ }
12483
+ ],
12484
+ use_explicit_associations: "true"
9751
12485
  }
9752
- ]
12486
+ }
12487
+ ],
12488
+ enrollment_trigger: {
12489
+ catalog_id: "e_form_submission_v2"
9753
12490
  }
9754
12491
  }
9755
12492
  },
@@ -9772,6 +12509,7 @@ var createWorkflowMeta = {
9772
12509
  { label: "Actions", value: String(op.actions.length) },
9773
12510
  { label: "Enabled", value: String(op.is_enabled ?? false) }
9774
12511
  ];
12512
+ if (op.enrollment_trigger) rows.push({ label: "Enrollment Trigger", value: op.enrollment_trigger.catalog_id });
9775
12513
  return { rows };
9776
12514
  }
9777
12515
  };
@@ -9785,6 +12523,7 @@ var UpdateWorkflowOperationSchema = z64.object({
9785
12523
  name: z64.string().optional(),
9786
12524
  actions: z64.array(WorkflowActionSchema).optional(),
9787
12525
  enrollment_criteria: WorkflowEnrollmentCriteriaSchema.optional(),
12526
+ enrollment_trigger: WorkflowEnrollmentTriggerSchema.optional(),
9788
12527
  suppression_list_ids: z64.array(z64.number()).optional(),
9789
12528
  time_windows: z64.array(z64.record(z64.string(), z64.unknown())).optional(),
9790
12529
  blocked_dates: z64.array(z64.record(z64.string(), z64.unknown())).optional()
@@ -9793,7 +12532,14 @@ var fields45 = [
9793
12532
  { name: "workflow_id", type: "string", required: true, description: "ID of the workflow to update (query workflows table)" },
9794
12533
  { name: "name", type: "string", required: false, description: "New workflow name" },
9795
12534
  { name: "actions", type: "array", required: false, description: "Replacement action graph (replaces ALL existing actions). Use HubSpot V4 API shape. Query action_type_catalog for supported types, required fields, and example_actions_json." },
9796
- { name: "enrollment_criteria", type: "object", required: false, description: "Replacement enrollment criteria (replaces existing). For EVENT_BASED, each UNIFIED_EVENTS branch requires a valid eventTypeId from workflow_event_types (e.g. '4-655002' for property change). Do NOT use object type IDs like '0-3' as eventTypeId. IMPORTANT: Event types like '4-655002' (property changed) require event-specific refinement filters (e.g. hs_property_name) \u2014 standard PROPERTY filters are NOT sufficient. Prefer LIST_BASED enrollment with re-enrollment triggers for property-change scenarios." },
12535
+ {
12536
+ name: "enrollment_trigger",
12537
+ type: "object",
12538
+ required: false,
12539
+ description: "Replacement single-trigger shortcut. Query workflow_enrollment_triggers first and only use rows where shortcut_kind = 'EVENT_TRIGGER_SHORTCUT'. Then use catalog_id plus parameter_schema_json, official_filter_template, official_filters_example_json, and required_object_type_ids_json.",
12540
+ shape: "{ catalog_id: string, should_re_enroll?: boolean, ...template-specific parameters from parameter_schema_json such as property_name/property_value_operator/property_value or target_workflow_id }"
12541
+ },
12542
+ { name: "enrollment_criteria", type: "object", required: false, description: "Replacement enrollment criteria (replaces existing). Set type to EVENT_BASED, LIST_BASED, or MANUAL. Prefer enrollment_trigger for supported single-trigger EVENT_BASED shortcuts. For EVENT_BASED, each UNIFIED_EVENTS branch requires a valid eventTypeId from workflow_enrollment_triggers.event_type_id (e.g. '4-655002' for property change). Do NOT use object type IDs like '0-3' as eventTypeId. For LIST_BASED and MANUAL, query workflow_enrollment_triggers rows where shortcut_kind = 'CRITERIA_EXAMPLE' and reuse official_criteria_example_json, criteria_shape_json, and usage_guidance. IMPORTANT: Event types like '4-655002' (property changed) require event-specific refinement filters (e.g. hs_property_name) \u2014 standard PROPERTY filters are NOT sufficient. Prefer LIST_BASED enrollment with re-enrollment triggers for property-change scenarios." },
9797
12543
  { name: "suppression_list_ids", type: "array", required: false, description: "Replacement suppression list IDs" },
9798
12544
  { name: "time_windows", type: "array", required: false, description: "Replacement execution time windows" },
9799
12545
  { name: "blocked_dates", type: "array", required: false, description: "Replacement blocked date ranges" }
@@ -9825,6 +12571,7 @@ var updateWorkflowMeta = {
9825
12571
  ];
9826
12572
  if (op.name) rows.push({ label: "New Name", value: op.name });
9827
12573
  if (op.actions) rows.push({ label: "Actions", value: `${op.actions.length} (full replacement)` });
12574
+ if (op.enrollment_trigger) rows.push({ label: "Enrollment Trigger", value: op.enrollment_trigger.catalog_id });
9828
12575
  if (op.enrollment_criteria) rows.push({ label: "Enrollment Criteria", value: "Updated" });
9829
12576
  return { rows };
9830
12577
  }
@@ -14203,9 +16950,10 @@ var OPERATION_TYPE_FOR_PROPERTY_TYPE2 = {
14203
16950
  datetime: "TIME_POINT"
14204
16951
  };
14205
16952
  var isCompatibleEnrollmentOperationType = (operationType, expectedOperationType, propertyType) => operationType === expectedOperationType || operationType === "ALL_PROPERTY" || operationType === "TIME_RANGED" && (propertyType === "date" || propertyType === "datetime");
14206
- var collectPropertyFiltersFromBranches = (branches, parentObjectTypeId) => {
16953
+ var collectPropertyFiltersFromBranches = (branches, parentObjectTypeId, parentEventTypeId) => {
14207
16954
  const refs = [];
14208
16955
  for (const branch of branches) {
16956
+ const branchEventTypeId = typeof branch.eventTypeId === "string" ? branch.eventTypeId : parentEventTypeId;
14209
16957
  const contextObjectTypeId = branch.filterBranchType === "ASSOCIATION" && typeof branch.objectTypeId === "string" ? branch.objectTypeId : parentObjectTypeId;
14210
16958
  const filters = asBranchArray(branch.filters);
14211
16959
  for (const filter of filters) {
@@ -14215,12 +16963,13 @@ var collectPropertyFiltersFromBranches = (branches, parentObjectTypeId) => {
14215
16963
  refs.push({
14216
16964
  property: filter.property,
14217
16965
  operationType: operation.operationType,
14218
- objectTypeId: contextObjectTypeId
16966
+ objectTypeId: contextObjectTypeId,
16967
+ eventTypeId: branchEventTypeId
14219
16968
  });
14220
16969
  }
14221
16970
  const nestedBranches = asBranchArray(branch.filterBranches);
14222
16971
  if (nestedBranches.length > 0) {
14223
- refs.push(...collectPropertyFiltersFromBranches(nestedBranches, contextObjectTypeId));
16972
+ refs.push(...collectPropertyFiltersFromBranches(nestedBranches, contextObjectTypeId, branchEventTypeId));
14224
16973
  }
14225
16974
  }
14226
16975
  return refs;
@@ -14266,6 +17015,20 @@ var validateWorkflowEnrollmentMetadata = (params) => {
14266
17015
  });
14267
17016
  }
14268
17017
  for (const filterRef of filterRefs) {
17018
+ const refinementSpecs = filterRef.eventTypeId ? WORKFLOW_EVENT_REFINEMENT_FILTERS[filterRef.eventTypeId] : void 0;
17019
+ const refinementSpec = refinementSpecs?.find((entry) => entry.property === filterRef.property);
17020
+ if (refinementSpec) {
17021
+ if (refinementSpec.allowedOperationTypes.includes(filterRef.operationType)) {
17022
+ continue;
17023
+ }
17024
+ add({
17025
+ severity: "error",
17026
+ operation_index: operationIndex,
17027
+ code: "INVALID_ENROLLMENT_FILTER_OPERATION_TYPE",
17028
+ message: `Workflow enrollment refinement filter '${filterRef.property}' for eventTypeId '${filterRef.eventTypeId}' uses operationType '${filterRef.operationType}'. Use one of: ${refinementSpec.allowedOperationTypes.join(", ")}.`
17029
+ });
17030
+ continue;
17031
+ }
14269
17032
  if (!enabledObjectTypeIds.has(filterRef.objectTypeId)) continue;
14270
17033
  const propertyDefinitions = propertyDefinitionsByObjectType.get(filterRef.objectTypeId);
14271
17034
  const propertyDefinition = propertyDefinitions?.get(filterRef.property);
@@ -14429,10 +17192,36 @@ var validateRotateToOwnerAction = (params) => {
14429
17192
  }
14430
17193
  return issues;
14431
17194
  };
17195
+ var validateCreateTaskAssociations = (params) => {
17196
+ const { action, actionId, operationIndex, context } = params;
17197
+ if (action.actionTypeId !== "0-3") return [];
17198
+ if (context?.workflowType !== "CONTACT_FLOW") return [];
17199
+ const fields48 = action.fields;
17200
+ if (!fields48) return [];
17201
+ const issues = [];
17202
+ const useExplicitAssociations = fields48.use_explicit_associations;
17203
+ const associations = fields48.associations;
17204
+ const hasValidEnrolledContactAssociation = Array.isArray(associations) && associations.some((entry) => {
17205
+ if (!isRecord(entry)) return false;
17206
+ const target = isRecord(entry.target) ? entry.target : void 0;
17207
+ const value = isRecord(entry.value) ? entry.value : void 0;
17208
+ return target?.associationCategory === "HUBSPOT_DEFINED" && target?.associationTypeId === 204 && value?.type === "ENROLLED_OBJECT";
17209
+ });
17210
+ if (useExplicitAssociations !== "true" || !hasValidEnrolledContactAssociation) {
17211
+ issues.push({
17212
+ severity: "error",
17213
+ operation_index: operationIndex,
17214
+ code: "WORKFLOW_TASK_CONTACT_ASSOCIATION_REQUIRED",
17215
+ message: `Action '${actionId || "<missing>"}' (0-3 create task) in CONTACT_FLOW must include use_explicit_associations: 'true' and an associations entry targeting the enrolled contact via associationTypeId 204 with value.type 'ENROLLED_OBJECT'. HubSpot otherwise returns HTTP 500.`
17216
+ });
17217
+ }
17218
+ return issues;
17219
+ };
14432
17220
  var validateWorkflowActions = (params) => {
14433
- const { actions, operationIndex } = params;
17221
+ const { actions, operationIndex, workflowType, objectTypeId } = params;
14434
17222
  const issues = [];
14435
17223
  const actionIds = /* @__PURE__ */ new Set();
17224
+ const context = { workflowType, objectTypeId };
14436
17225
  for (const action of actions) {
14437
17226
  const actionId = action.actionId?.trim() ?? "";
14438
17227
  if (actionId.length === 0) {
@@ -14521,6 +17310,7 @@ var validateWorkflowActions = (params) => {
14521
17310
  issues.push(...validateStaticValueType({ action, actionId, operationIndex }));
14522
17311
  issues.push(...validateDelayUntilDateAction({ action, actionId, operationIndex }));
14523
17312
  issues.push(...validateRotateToOwnerAction({ action, actionId, operationIndex }));
17313
+ issues.push(...validateCreateTaskAssociations({ action, actionId, operationIndex, context }));
14524
17314
  }
14525
17315
  for (const action of actions) {
14526
17316
  for (const nextActionId of collectActionNextActionIds(action)) {
@@ -14646,59 +17436,8 @@ var validateWorkflowAssociatedPropertyActionMetadata = (params) => {
14646
17436
  return issues;
14647
17437
  };
14648
17438
 
14649
- // ../shared/pure/workflow-event-types.ts
14650
- var WORKFLOW_EVENT_TYPES = {
14651
- "4-655002": { eventTypeId: "4-655002", name: "Property value changed", description: "Triggers when a property value is updated on a CRM record", requiresRefinementFilters: true, refinementNote: "Requires event-specific refinement filters (e.g. hs_property_name, hs_property_value) embedded in the event filter branch to specify which property and value to trigger on. Standard PROPERTY filters are NOT sufficient. Prefer LIST_BASED enrollment with re-enrollment triggers for 'property changed to X' scenarios." },
14652
- "4-1463224": { eventTypeId: "4-1463224", name: "CRM Object created", description: "Triggers when a new object is created in the CRM" },
14653
- "4-1553675": { eventTypeId: "4-1553675", name: "Ad interaction", description: "Triggers when an ad is interacted with" },
14654
- "4-1741072": { eventTypeId: "4-1741072", name: "Call ended", description: "Triggers when a call has ended" },
14655
- "4-1733817": { eventTypeId: "4-1733817", name: "Call started", description: "Triggers when a call is initiated" },
14656
- "4-1814177": { eventTypeId: "4-1814177", name: "Playbook log", description: "Triggers when a playbook is logged on a record" },
14657
- "6-2117363": { eventTypeId: "6-2117363", name: "Custom event occurs", description: "Triggers when a custom event occurs with an existing contact record" },
14658
- "4-666288": { eventTypeId: "4-666288", name: "Clicked link in email", description: "Triggers when a contact clicks a link in a marketing email" },
14659
- "4-5470331": { eventTypeId: "4-5470331", name: "Email bounced", description: "Triggers when an email bounces" },
14660
- "4-665536": { eventTypeId: "4-665536", name: "Email delivered", description: "Triggers when an email is delivered to a contact" },
14661
- "4-667638": { eventTypeId: "4-667638", name: "Email sent", description: "Triggers when an email is sent to a contact" },
14662
- "4-666440": { eventTypeId: "4-666440", name: "Opened email", description: "Triggers when a contact opens a marketing email" },
14663
- "4-665538": { eventTypeId: "4-665538", name: "Replied to email", description: "Triggers when a contact replies to a marketing email" },
14664
- "4-666289": { eventTypeId: "4-666289", name: "Updated email subscription status", description: "Triggers when a contact updates their email subscription status" },
14665
- "4-1639799": { eventTypeId: "4-1639799", name: "Form interaction", description: "Triggers when a contact interacts with a form field" },
14666
- "4-1639801": { eventTypeId: "4-1639801", name: "Form submission", description: "Triggers when a form is submitted" },
14667
- "4-1639797": { eventTypeId: "4-1639797", name: "Form view", description: "Triggers when a contact views a form" },
14668
- "4-1720599": { eventTypeId: "4-1720599", name: "Meeting booked", description: "Triggers when a contact books a meeting" },
14669
- "4-1724222": { eventTypeId: "4-1724222", name: "Meeting outcome change", description: "Triggers when a meeting outcome is changed" },
14670
- "4-1522438": { eventTypeId: "4-1522438", name: "Contact finished viewing a document", description: "Triggers when a contact finishes viewing a sales document" },
14671
- "4-1522436": { eventTypeId: "4-1522436", name: "Contact viewed a document", description: "Triggers when a contact views a sales document" },
14672
- "4-1522437": { eventTypeId: "4-1522437", name: "Document shared with contact", description: "Triggers when a sales document is shared with a contact" },
14673
- "4-675773": { eventTypeId: "4-675773", name: "Contact booked a meeting through a sequence", description: "Triggers when a contact books a meeting through a sequence" },
14674
- "4-675777": { eventTypeId: "4-675777", name: "Contact enrolled in a sequence", description: "Triggers when a contact is enrolled in a sequence" },
14675
- "4-675778": { eventTypeId: "4-675778", name: "Contact finished sequence", description: "Triggers when a contact finishes a sequence" },
14676
- "4-675776": { eventTypeId: "4-675776", name: "Contact unenrolled from sequence", description: "Triggers when a contact is unenrolled from a sequence" },
14677
- "4-1497402": { eventTypeId: "4-1497402", name: "Contact unenrolled from sequence via workflow", description: "Triggers when a contact is unenrolled from a sequence via a workflow" },
14678
- "4-675775": { eventTypeId: "4-675775", name: "Contact unenrolled from sequence manually", description: "Triggers when a contact is manually unenrolled from a sequence" },
14679
- "4-1752910": { eventTypeId: "4-1752910", name: "Delivering SMS failed", description: "Triggers when an SMS message was not delivered" },
14680
- "4-1722276": { eventTypeId: "4-1722276", name: "Link in SMS clicked", description: "Triggers when a contact clicks a link in an SMS" },
14681
- "4-1752904": { eventTypeId: "4-1752904", name: "Sending SMS failed", description: "Triggers when an SMS message was not sent" },
14682
- "4-1721168": { eventTypeId: "4-1721168", name: "SMS delivered", description: "Triggers when an SMS message is delivered" },
14683
- "4-1725149": { eventTypeId: "4-1725149", name: "SMS dropped", description: "Triggers when an SMS message is dropped" },
14684
- "4-1719453": { eventTypeId: "4-1719453", name: "SMS sent", description: "Triggers when an SMS message is sent" },
14685
- "4-1555805": { eventTypeId: "4-1555805", name: "CTA click", description: "Triggers when a contact clicks a CTA or Web interactive" },
14686
- "4-1555804": { eventTypeId: "4-1555804", name: "CTA viewed", description: "Triggers when a contact views a CTA or Web interactive" },
14687
- "4-100216": { eventTypeId: "4-100216", name: "CTA click (legacy)", description: "Triggers when a contact clicks a CTA (legacy)" },
14688
- "4-100215": { eventTypeId: "4-100215", name: "CTA view (legacy)", description: "Triggers when a contact views a CTA (legacy)" },
14689
- "4-96000": { eventTypeId: "4-96000", name: "Page visited", description: "Triggers when a contact views a landing page or website page" },
14690
- "4-675783": { eventTypeId: "4-675783", name: "Website or Email Media Play", description: "Triggers when a contact plays embedded media" },
14691
- "4-1753168": { eventTypeId: "4-1753168", name: "Achieved workflow goal", description: "Triggers when a contact meets a workflow goal" },
14692
- "4-1466013": { eventTypeId: "4-1466013", name: "Enrolled in workflow", description: "Triggers when an object is enrolled in a workflow" },
14693
- "4-1466014": { eventTypeId: "4-1466014", name: "Unenrolled from workflow", description: "Triggers when an object is unenrolled from a workflow" }
14694
- };
14695
- var KNOWN_EVENT_TYPE_IDS = new Set(Object.keys(WORKFLOW_EVENT_TYPES));
14696
- var isValidEventTypeIdFormat = (id) => /^[46]-\d+$/.test(id);
14697
- var EVENT_TYPES_REQUIRING_REFINEMENT = new Set(
14698
- Object.values(WORKFLOW_EVENT_TYPES).filter((et) => et.requiresRefinementFilters).map((et) => et.eventTypeId)
14699
- );
14700
-
14701
17439
  // ../shared/pure/workflow-validation/event-types.ts
17440
+ var isValidEventTypeIdFormat = (id) => /^[46]-\d+$/.test(id);
14702
17441
  var collectUnifiedEventBranches = (enrollmentCriteria) => {
14703
17442
  if (!enrollmentCriteria) return [];
14704
17443
  const branches = [];
@@ -14728,7 +17467,7 @@ var validateWorkflowEventTypeIds = (params) => {
14728
17467
  severity: "error",
14729
17468
  operation_index: operationIndex,
14730
17469
  code: "INVALID_EVENT_TYPE_ID",
14731
- message: `eventTypeId '${eventTypeId}' is a CRM object type ID, not an event type ID. Use '4-655002' for property change, '4-1639801' for form submission, etc. Query workflow_event_types for valid IDs.`
17470
+ message: `eventTypeId '${eventTypeId}' is a CRM object type ID, not an event type ID. Use '4-655002' for property change, '4-1639801' for form submission, etc. Query workflow_enrollment_triggers for valid event_type_id values.`
14732
17471
  });
14733
17472
  continue;
14734
17473
  }
@@ -14737,16 +17476,16 @@ var validateWorkflowEventTypeIds = (params) => {
14737
17476
  severity: "error",
14738
17477
  operation_index: operationIndex,
14739
17478
  code: "INVALID_EVENT_TYPE_ID",
14740
- message: `eventTypeId '${eventTypeId}' has invalid format. Event type IDs use '4-*' (built-in) or '6-*' (custom) prefix. Query workflow_event_types for valid IDs.`
17479
+ message: `eventTypeId '${eventTypeId}' has invalid format. Event type IDs use '4-*' (built-in) or '6-*' (custom) prefix. Query workflow_enrollment_triggers for valid event_type_id values.`
14741
17480
  });
14742
17481
  continue;
14743
17482
  }
14744
- if (!KNOWN_EVENT_TYPE_IDS.has(eventTypeId)) {
17483
+ if (!KNOWN_WORKFLOW_ENROLLMENT_EVENT_TYPE_IDS.has(eventTypeId)) {
14745
17484
  issues.push({
14746
17485
  severity: "warning",
14747
17486
  operation_index: operationIndex,
14748
17487
  code: "UNKNOWN_EVENT_TYPE_ID",
14749
- message: `eventTypeId '${eventTypeId}' is not in the known event type catalog. Verify it is correct by checking the workflow_event_types table.`
17488
+ message: `eventTypeId '${eventTypeId}' is not in the known enrollment trigger catalog. Verify it is correct by checking workflow_enrollment_triggers.event_type_id.`
14750
17489
  });
14751
17490
  }
14752
17491
  }
@@ -14758,8 +17497,8 @@ var validateWorkflowRefinementFilters = (params) => {
14758
17497
  const unifiedBranches = collectUnifiedEventBranches(enrollmentCriteria);
14759
17498
  for (const branch of unifiedBranches) {
14760
17499
  const eventTypeId = typeof branch.eventTypeId === "string" ? branch.eventTypeId : void 0;
14761
- if (!eventTypeId || !EVENT_TYPES_REQUIRING_REFINEMENT.has(eventTypeId)) continue;
14762
- const eventType = WORKFLOW_EVENT_TYPES[eventTypeId];
17500
+ if (!eventTypeId || !WORKFLOW_EVENT_TYPES_REQUIRING_REFINEMENT.has(eventTypeId)) continue;
17501
+ const eventType = getSupportedWorkflowEnrollmentTriggerByEventTypeId(eventTypeId);
14763
17502
  const note = eventType?.refinementNote ?? "This event type requires refinement filters embedded in the event filter branch.";
14764
17503
  issues.push({
14765
17504
  severity: "warning",
@@ -14816,8 +17555,13 @@ var normalizeWorkflowActionValues = (actions) => actions.map((action) => {
14816
17555
  if (!fields48) return { ...action };
14817
17556
  const actionTypeId = typeof action.actionTypeId === "string" ? action.actionTypeId : "";
14818
17557
  if (actionTypeId === "0-5") {
14819
- const { property_name, ...restFields } = fields48;
14820
- const normalizedFields = property_name && !restFields.property ? { ...restFields, property: property_name, value: injectStaticValueType(restFields.value) } : { ...restFields, value: injectStaticValueType(restFields.value) };
17558
+ const {
17559
+ property,
17560
+ property_name,
17561
+ ...restFields
17562
+ } = fields48;
17563
+ const canonicalPropertyName = typeof property_name === "string" && property_name.length > 0 ? property_name : typeof property === "string" && property.length > 0 ? property : void 0;
17564
+ const normalizedFields = canonicalPropertyName ? { ...restFields, property_name: canonicalPropertyName, value: injectStaticValueType(restFields.value) } : { ...restFields, value: injectStaticValueType(restFields.value) };
14821
17565
  return { ...action, fields: normalizedFields };
14822
17566
  }
14823
17567
  if (actionTypeId === "0-14" && Array.isArray(fields48.properties)) {
@@ -14868,10 +17612,65 @@ var collectRotateToOwnerActions = (actions) => actions.flatMap((action) => {
14868
17612
  userIds: fields48.user_ids.filter((id) => typeof id === "string")
14869
17613
  }];
14870
17614
  });
17615
+ var collectWorkflowTargetActions = (actions) => actions.flatMap((action) => {
17616
+ if (typeof action.actionTypeId !== "string" || action.actionTypeId !== "0-15") return [];
17617
+ const fields48 = typeof action.fields === "object" && action.fields !== null ? action.fields : void 0;
17618
+ if (!fields48 || typeof fields48.flow_id !== "string" || fields48.flow_id.length === 0) return [];
17619
+ return [{
17620
+ actionId: typeof action.actionId === "string" ? action.actionId : "<missing>",
17621
+ flowId: fields48.flow_id
17622
+ }];
17623
+ });
17624
+ var collectSequenceActions = (actions) => actions.flatMap((action) => {
17625
+ if (typeof action.actionTypeId !== "string" || action.actionTypeId !== "0-46510720") return [];
17626
+ const fields48 = typeof action.fields === "object" && action.fields !== null ? action.fields : void 0;
17627
+ if (!fields48 || typeof fields48.sequenceId !== "string" || fields48.sequenceId.length === 0) return [];
17628
+ return [{
17629
+ actionId: typeof action.actionId === "string" ? action.actionId : "<missing>",
17630
+ sequenceId: fields48.sequenceId
17631
+ }];
17632
+ });
17633
+ var collectSubscriptionDefinitionActions = (actions) => actions.flatMap((action) => {
17634
+ if (typeof action.actionTypeId !== "string" || action.actionTypeId !== "0-43347357") return [];
17635
+ const fields48 = typeof action.fields === "object" && action.fields !== null ? action.fields : void 0;
17636
+ if (!fields48 || typeof fields48.subscriptionId !== "string" || fields48.subscriptionId.length === 0) return [];
17637
+ return [{
17638
+ actionId: typeof action.actionId === "string" ? action.actionId : "<missing>",
17639
+ subscriptionId: fields48.subscriptionId
17640
+ }];
17641
+ });
17642
+ var collectInboxActions = (actions) => actions.flatMap((action) => {
17643
+ if (typeof action.actionTypeId !== "string" || action.actionTypeId !== "0-44475148") return [];
17644
+ const fields48 = typeof action.fields === "object" && action.fields !== null ? action.fields : void 0;
17645
+ if (!fields48 || typeof fields48["Target Inbox"] !== "string" || fields48["Target Inbox"].length === 0) return [];
17646
+ return [{
17647
+ actionId: typeof action.actionId === "string" ? action.actionId : "<missing>",
17648
+ inboxId: fields48["Target Inbox"]
17649
+ }];
17650
+ });
17651
+ var collectAssociationLabelActions = (actions) => actions.flatMap((action) => {
17652
+ if (typeof action.actionTypeId !== "string") return [];
17653
+ if (!["0-63189541", "0-73444249", "0-61139476"].includes(action.actionTypeId)) return [];
17654
+ const fields48 = typeof action.fields === "object" && action.fields !== null ? action.fields : void 0;
17655
+ const fromObjectType = typeof fields48?.fromObjectType === "string" ? fields48.fromObjectType : void 0;
17656
+ const toObjectType = typeof fields48?.toObjectType === "string" ? fields48.toObjectType : void 0;
17657
+ if (!fields48 || !fromObjectType || !toObjectType) return [];
17658
+ const fieldName = action.actionTypeId === "0-61139476" ? "labelToRemove" : "labelToApply";
17659
+ const rawId = fields48[fieldName];
17660
+ if (typeof rawId !== "string" || rawId.length === 0) return [];
17661
+ return [{
17662
+ actionId: typeof action.actionId === "string" ? action.actionId : "<missing>",
17663
+ actionTypeId: action.actionTypeId,
17664
+ fromObjectType,
17665
+ toObjectType,
17666
+ fieldName,
17667
+ labelTypeId: rawId
17668
+ }];
17669
+ });
14871
17670
  var hasValidEnumerationOption = (propertyDefinition, staticValue) => propertyDefinition.type !== "enumeration" || propertyDefinition.options.some((option) => option.value === staticValue);
14872
17671
  var EMPTY_PROPERTY_DEFINITIONS = [];
14873
17672
  var validateWorkflowMetadataEffectful = (params) => {
14874
- const { objectTypeId, enrollmentCriteria, suppressionListIds, actions, operationIndex } = params;
17673
+ const { objectTypeId, workflowType, enrollmentCriteria, suppressionListIds, actions, operationIndex } = params;
14875
17674
  const enrollmentPropertyFilters = collectWorkflowEnrollmentPropertyFilters(
14876
17675
  enrollmentCriteria,
14877
17676
  objectTypeId
@@ -14882,6 +17681,11 @@ var validateWorkflowMetadataEffectful = (params) => {
14882
17681
  const propertyActionRefs = collectWorkflowPropertyActionRefs(actions ?? []);
14883
17682
  const associatedActionRefs = collectWorkflowAssociatedPropertyActionRefs(actions ?? []);
14884
17683
  const rotateActions = collectRotateToOwnerActions(actions ?? []);
17684
+ const workflowTargetActions = collectWorkflowTargetActions(actions ?? []);
17685
+ const sequenceActions = collectSequenceActions(actions ?? []);
17686
+ const subscriptionActions = collectSubscriptionDefinitionActions(actions ?? []);
17687
+ const inboxActions = collectInboxActions(actions ?? []);
17688
+ const associationLabelActions = collectAssociationLabelActions(actions ?? []);
14885
17689
  return pipe81(
14886
17690
  HubSpotService,
14887
17691
  Effect99.flatMap(
@@ -14923,44 +17727,139 @@ var validateWorkflowMetadataEffectful = (params) => {
14923
17727
  const relatedObjects = enabledObjects.enabledObjects.filter(
14924
17728
  (obj) => obj.objectTypeId !== objectTypeId
14925
17729
  );
14926
- const associationLabelsEffect = associatedActionRefs.length === 0 || !objectTypeId ? Effect99.succeed([]) : Effect99.all(
14927
- relatedObjects.flatMap((relatedObject) => [
14928
- pipe81(
14929
- hs.getAssociationLabels(objectTypeId, relatedObject.objectTypeId),
17730
+ const associationDirectionsToFetch = /* @__PURE__ */ new Map();
17731
+ if (associatedActionRefs.length > 0 && objectTypeId) {
17732
+ for (const relatedObject of relatedObjects) {
17733
+ associationDirectionsToFetch.set(
17734
+ toDirectionKey(objectTypeId, relatedObject.objectTypeId),
17735
+ { fromObjectType: objectTypeId, toObjectType: relatedObject.objectTypeId }
17736
+ );
17737
+ associationDirectionsToFetch.set(
17738
+ toDirectionKey(relatedObject.objectTypeId, objectTypeId),
17739
+ { fromObjectType: relatedObject.objectTypeId, toObjectType: objectTypeId }
17740
+ );
17741
+ }
17742
+ }
17743
+ for (const labelAction of associationLabelActions) {
17744
+ associationDirectionsToFetch.set(
17745
+ toDirectionKey(labelAction.fromObjectType, labelAction.toObjectType),
17746
+ { fromObjectType: labelAction.fromObjectType, toObjectType: labelAction.toObjectType }
17747
+ );
17748
+ }
17749
+ const associationLabelsEffect = associationDirectionsToFetch.size === 0 ? Effect99.succeed([]) : Effect99.all(
17750
+ Array.from(associationDirectionsToFetch.values()).map(
17751
+ (direction) => pipe81(
17752
+ hs.getAssociationLabels(direction.fromObjectType, direction.toObjectType),
14930
17753
  Effect99.map((labels) => ({
14931
- directionKey: toDirectionKey(objectTypeId, relatedObject.objectTypeId),
17754
+ directionKey: toDirectionKey(direction.fromObjectType, direction.toObjectType),
14932
17755
  labels,
14933
17756
  failed: false
14934
17757
  })),
14935
17758
  Effect99.catchAll(
14936
17759
  () => Effect99.succeed({
14937
- directionKey: toDirectionKey(objectTypeId, relatedObject.objectTypeId),
17760
+ directionKey: toDirectionKey(direction.fromObjectType, direction.toObjectType),
14938
17761
  labels: [],
14939
17762
  failed: true
14940
17763
  })
14941
17764
  )
14942
- ),
14943
- pipe81(
14944
- hs.getAssociationLabels(relatedObject.objectTypeId, objectTypeId),
14945
- Effect99.map((labels) => ({
14946
- directionKey: toDirectionKey(relatedObject.objectTypeId, objectTypeId),
14947
- labels,
17765
+ )
17766
+ ),
17767
+ { concurrency: 5 }
17768
+ );
17769
+ const workflowTargetsEffect = workflowTargetActions.length === 0 ? Effect99.succeed([]) : Effect99.all(
17770
+ Array.from(new Set(workflowTargetActions.map((action) => action.flowId))).map(
17771
+ (flowId) => pipe81(
17772
+ hs.getWorkflow(flowId),
17773
+ Effect99.map((workflow) => ({
17774
+ flowId,
17775
+ workflowType: workflow.type,
17776
+ objectTypeId: workflow.objectTypeId,
17777
+ missing: false,
14948
17778
  failed: false
14949
17779
  })),
14950
- Effect99.catchAll(
14951
- () => Effect99.succeed({
14952
- directionKey: toDirectionKey(relatedObject.objectTypeId, objectTypeId),
14953
- labels: [],
14954
- failed: true
14955
- })
14956
- )
17780
+ Effect99.catchAll((error) => Effect99.succeed({
17781
+ flowId,
17782
+ missing: "code" in error && error.code === 404,
17783
+ failed: !("code" in error && error.code === 404),
17784
+ errorMessage: error instanceof Error ? error.message : String(error)
17785
+ }))
17786
+ )
17787
+ ),
17788
+ { concurrency: 5 }
17789
+ );
17790
+ const sequencesEffect = sequenceActions.length === 0 ? Effect99.succeed([]) : Effect99.all(
17791
+ Array.from(new Set(sequenceActions.map((action) => action.sequenceId))).map(
17792
+ (sequenceId) => pipe81(
17793
+ hs.getSequence(sequenceId),
17794
+ Effect99.map(() => ({
17795
+ sequenceId,
17796
+ missing: false,
17797
+ failed: false
17798
+ })),
17799
+ Effect99.catchAll((error) => Effect99.succeed({
17800
+ sequenceId,
17801
+ missing: "code" in error && error.code === 404,
17802
+ failed: !("code" in error && error.code === 404),
17803
+ errorMessage: error instanceof Error ? error.message : String(error)
17804
+ }))
14957
17805
  )
14958
- ]),
17806
+ ),
14959
17807
  { concurrency: 5 }
14960
17808
  );
17809
+ const subscriptionDefinitionsEffect = subscriptionActions.length === 0 ? Effect99.succeed({
17810
+ definitionIds: /* @__PURE__ */ new Set(),
17811
+ failed: false,
17812
+ errorMessage: void 0
17813
+ }) : pipe81(
17814
+ hs.getCommunicationSubscriptionDefinitions,
17815
+ Effect99.map((definitions) => ({
17816
+ definitionIds: new Set(definitions.map((definition) => definition.id)),
17817
+ failed: false,
17818
+ errorMessage: void 0
17819
+ })),
17820
+ Effect99.catchAll((error) => Effect99.succeed({
17821
+ definitionIds: /* @__PURE__ */ new Set(),
17822
+ failed: true,
17823
+ errorMessage: error instanceof Error ? error.message : String(error)
17824
+ }))
17825
+ );
17826
+ const inboxesEffect = inboxActions.length === 0 ? Effect99.succeed({
17827
+ inboxIds: /* @__PURE__ */ new Set(),
17828
+ failed: false,
17829
+ errorMessage: void 0
17830
+ }) : pipe81(
17831
+ hs.getConversationInboxes,
17832
+ Effect99.map((inboxes) => ({
17833
+ inboxIds: new Set(inboxes.map((inbox) => inbox.id)),
17834
+ failed: false,
17835
+ errorMessage: void 0
17836
+ })),
17837
+ Effect99.catchAll((error) => Effect99.succeed({
17838
+ inboxIds: /* @__PURE__ */ new Set(),
17839
+ failed: true,
17840
+ errorMessage: error instanceof Error ? error.message : String(error)
17841
+ }))
17842
+ );
14961
17843
  return pipe81(
14962
- Effect99.all([propertyDefinitionsEffect, associationLabelsEffect], { concurrency: "unbounded" }),
14963
- Effect99.map(([propertyDefinitionResults, associationLabelResults]) => {
17844
+ Effect99.all(
17845
+ [
17846
+ propertyDefinitionsEffect,
17847
+ associationLabelsEffect,
17848
+ workflowTargetsEffect,
17849
+ sequencesEffect,
17850
+ subscriptionDefinitionsEffect,
17851
+ inboxesEffect
17852
+ ],
17853
+ { concurrency: "unbounded" }
17854
+ ),
17855
+ Effect99.map(([
17856
+ propertyDefinitionResults,
17857
+ associationLabelResults,
17858
+ workflowTargetResults,
17859
+ sequenceResults,
17860
+ subscriptionDefinitionResults,
17861
+ inboxResults
17862
+ ]) => {
14964
17863
  const failedPropertyDefinitionObjectTypeIds = new Set(
14965
17864
  propertyDefinitionResults.filter(([, defs]) => defs.length === 0).map(([id]) => id)
14966
17865
  );
@@ -15023,7 +17922,50 @@ var validateWorkflowMetadataEffectful = (params) => {
15023
17922
  owners,
15024
17923
  operationIndex
15025
17924
  });
15026
- return [...enrollmentIssues, ...directPropertyIssues, ...associatedActionIssues, ...rotateOwnerIssues];
17925
+ const workflowTargetIssues = validateWorkflowTargetActions({
17926
+ workflowTargetActions,
17927
+ workflowTargetResults,
17928
+ workflowType,
17929
+ objectTypeId,
17930
+ operationIndex
17931
+ });
17932
+ const sequenceIssues = validateSequenceActions({
17933
+ sequenceActions,
17934
+ sequenceResults,
17935
+ operationIndex
17936
+ });
17937
+ const subscriptionIssues = validateSubscriptionDefinitionActions({
17938
+ subscriptionActions,
17939
+ definitionIds: subscriptionDefinitionResults.definitionIds,
17940
+ failed: subscriptionDefinitionResults.failed,
17941
+ errorMessage: subscriptionDefinitionResults.errorMessage,
17942
+ operationIndex
17943
+ });
17944
+ const inboxIssues = validateInboxActions({
17945
+ inboxActions,
17946
+ inboxIds: inboxResults.inboxIds,
17947
+ failed: inboxResults.failed,
17948
+ errorMessage: inboxResults.errorMessage,
17949
+ operationIndex
17950
+ });
17951
+ const associationLabelIssues = validateAssociationLabelActions({
17952
+ associationLabelActions,
17953
+ enabledObjectTypeIds,
17954
+ associationTypeIdsByDirection,
17955
+ failedAssociationDirectionKeys,
17956
+ operationIndex
17957
+ });
17958
+ return [
17959
+ ...enrollmentIssues,
17960
+ ...directPropertyIssues,
17961
+ ...associatedActionIssues,
17962
+ ...rotateOwnerIssues,
17963
+ ...workflowTargetIssues,
17964
+ ...sequenceIssues,
17965
+ ...subscriptionIssues,
17966
+ ...inboxIssues,
17967
+ ...associationLabelIssues
17968
+ ];
15027
17969
  })
15028
17970
  );
15029
17971
  })
@@ -15114,6 +18056,168 @@ var validateRotateToOwnerUserIds = (params) => {
15114
18056
  }
15115
18057
  return issues;
15116
18058
  };
18059
+ var validateWorkflowTargetActions = (params) => {
18060
+ const { workflowTargetActions, workflowTargetResults, workflowType, objectTypeId, operationIndex } = params;
18061
+ const resultsById = new Map(workflowTargetResults.map((result) => [result.flowId, result]));
18062
+ return workflowTargetActions.flatMap((action) => {
18063
+ const result = resultsById.get(action.flowId);
18064
+ if (!result) return [];
18065
+ if (result.failed) {
18066
+ return [{
18067
+ severity: "warning",
18068
+ operation_index: operationIndex,
18069
+ code: "WORKFLOW_ACTION_TARGET_WORKFLOW_LOOKUP_UNAVAILABLE",
18070
+ message: `Action '${action.actionId}' could not verify target workflow '${action.flowId}' during validation (${result.errorMessage ?? "API unavailable"}).`
18071
+ }];
18072
+ }
18073
+ if (result.missing) {
18074
+ return [{
18075
+ severity: "error",
18076
+ operation_index: operationIndex,
18077
+ code: "WORKFLOW_ACTION_TARGET_WORKFLOW_NOT_FOUND",
18078
+ message: `Action '${action.actionId}' references workflow '${action.flowId}', but that workflow was not found.`
18079
+ }];
18080
+ }
18081
+ const issues = [];
18082
+ if (workflowType && result.workflowType && result.workflowType !== workflowType) {
18083
+ issues.push({
18084
+ severity: "error",
18085
+ operation_index: operationIndex,
18086
+ code: "WORKFLOW_ACTION_TARGET_WORKFLOW_TYPE_MISMATCH",
18087
+ message: `Action '${action.actionId}' references workflow '${action.flowId}' of type '${result.workflowType}', but the current workflow type is '${workflowType}'.`
18088
+ });
18089
+ }
18090
+ if (result.objectTypeId && objectTypeId && result.objectTypeId !== objectTypeId) {
18091
+ issues.push({
18092
+ severity: "warning",
18093
+ operation_index: operationIndex,
18094
+ code: "WORKFLOW_ACTION_TARGET_WORKFLOW_OBJECT_TYPE_MISMATCH",
18095
+ message: `Action '${action.actionId}' references workflow '${action.flowId}' on object type '${result.objectTypeId}', while the current workflow object type is '${objectTypeId}'.`
18096
+ });
18097
+ }
18098
+ return issues;
18099
+ });
18100
+ };
18101
+ var validateSequenceActions = (params) => {
18102
+ const { sequenceActions, sequenceResults, operationIndex } = params;
18103
+ const resultsById = new Map(sequenceResults.map((result) => [result.sequenceId, result]));
18104
+ return sequenceActions.flatMap((action) => {
18105
+ const result = resultsById.get(action.sequenceId);
18106
+ if (!result) return [];
18107
+ if (result.failed) {
18108
+ return [{
18109
+ severity: "warning",
18110
+ operation_index: operationIndex,
18111
+ code: "WORKFLOW_ACTION_SEQUENCE_LOOKUP_UNAVAILABLE",
18112
+ message: `Action '${action.actionId}' could not verify sequence '${action.sequenceId}' during validation (${result.errorMessage ?? "API unavailable"}).`
18113
+ }];
18114
+ }
18115
+ if (result.missing) {
18116
+ return [{
18117
+ severity: "error",
18118
+ operation_index: operationIndex,
18119
+ code: "WORKFLOW_ACTION_SEQUENCE_NOT_FOUND",
18120
+ message: `Action '${action.actionId}' references sequence '${action.sequenceId}', but that sequence was not found.`
18121
+ }];
18122
+ }
18123
+ return [];
18124
+ });
18125
+ };
18126
+ var validateSubscriptionDefinitionActions = (params) => {
18127
+ const { subscriptionActions, definitionIds, failed, errorMessage, operationIndex } = params;
18128
+ return subscriptionActions.flatMap((action) => {
18129
+ if (failed) {
18130
+ return [{
18131
+ severity: "warning",
18132
+ operation_index: operationIndex,
18133
+ code: "WORKFLOW_ACTION_SUBSCRIPTION_LOOKUP_UNAVAILABLE",
18134
+ message: `Action '${action.actionId}' could not verify subscription definition '${action.subscriptionId}' during validation (${errorMessage ?? "API unavailable"}).`
18135
+ }];
18136
+ }
18137
+ if (!definitionIds.has(action.subscriptionId)) {
18138
+ return [{
18139
+ severity: "error",
18140
+ operation_index: operationIndex,
18141
+ code: "WORKFLOW_ACTION_SUBSCRIPTION_NOT_FOUND",
18142
+ message: `Action '${action.actionId}' references subscription definition '${action.subscriptionId}', but it was not found.`
18143
+ }];
18144
+ }
18145
+ return [];
18146
+ });
18147
+ };
18148
+ var validateInboxActions = (params) => {
18149
+ const { inboxActions, inboxIds, failed, errorMessage, operationIndex } = params;
18150
+ return inboxActions.flatMap((action) => {
18151
+ if (failed) {
18152
+ return [{
18153
+ severity: "warning",
18154
+ operation_index: operationIndex,
18155
+ code: "WORKFLOW_ACTION_INBOX_LOOKUP_UNAVAILABLE",
18156
+ message: `Action '${action.actionId}' could not verify inbox '${action.inboxId}' during validation (${errorMessage ?? "API unavailable"}).`
18157
+ }];
18158
+ }
18159
+ if (!inboxIds.has(action.inboxId)) {
18160
+ return [{
18161
+ severity: "error",
18162
+ operation_index: operationIndex,
18163
+ code: "WORKFLOW_ACTION_INBOX_NOT_FOUND",
18164
+ message: `Action '${action.actionId}' references inbox '${action.inboxId}', but it was not found.`
18165
+ }];
18166
+ }
18167
+ return [];
18168
+ });
18169
+ };
18170
+ var validateAssociationLabelActions = (params) => {
18171
+ const {
18172
+ associationLabelActions,
18173
+ enabledObjectTypeIds,
18174
+ associationTypeIdsByDirection,
18175
+ failedAssociationDirectionKeys,
18176
+ operationIndex
18177
+ } = params;
18178
+ return associationLabelActions.flatMap((action) => {
18179
+ const issues = [];
18180
+ const directionKey = toDirectionKey(action.fromObjectType, action.toObjectType);
18181
+ if (!enabledObjectTypeIds.has(action.fromObjectType) || !enabledObjectTypeIds.has(action.toObjectType)) {
18182
+ issues.push({
18183
+ severity: "warning",
18184
+ operation_index: operationIndex,
18185
+ code: "WORKFLOW_ACTION_ASSOCIATION_LABEL_OBJECT_TYPE_UNAVAILABLE",
18186
+ message: `Action '${action.actionId}' uses association label direction '${action.fromObjectType}' -> '${action.toObjectType}', but one or both object types are not enabled in the current portal metadata.`
18187
+ });
18188
+ return issues;
18189
+ }
18190
+ const numericLabelTypeId = Number(action.labelTypeId);
18191
+ if (!Number.isInteger(numericLabelTypeId)) {
18192
+ issues.push({
18193
+ severity: "error",
18194
+ operation_index: operationIndex,
18195
+ code: "WORKFLOW_ACTION_ASSOCIATION_LABEL_ID_INVALID",
18196
+ message: `Action '${action.actionId}' uses '${action.fieldName}'='${action.labelTypeId}', but association label IDs must be numeric typeIds.`
18197
+ });
18198
+ return issues;
18199
+ }
18200
+ if (failedAssociationDirectionKeys.has(directionKey)) {
18201
+ issues.push({
18202
+ severity: "warning",
18203
+ operation_index: operationIndex,
18204
+ code: "WORKFLOW_ACTION_ASSOCIATION_LABEL_LOOKUP_UNAVAILABLE",
18205
+ message: `Action '${action.actionId}' could not verify association label '${action.labelTypeId}' for direction '${action.fromObjectType}' -> '${action.toObjectType}' during validation (API unavailable).`
18206
+ });
18207
+ return issues;
18208
+ }
18209
+ const typeIds = associationTypeIdsByDirection.get(directionKey);
18210
+ if (!typeIds?.has(numericLabelTypeId)) {
18211
+ issues.push({
18212
+ severity: "error",
18213
+ operation_index: operationIndex,
18214
+ code: "WORKFLOW_ACTION_ASSOCIATION_LABEL_NOT_FOUND",
18215
+ message: `Action '${action.actionId}' references association label '${action.labelTypeId}' for direction '${action.fromObjectType}' -> '${action.toObjectType}', but that typeId was not found.`
18216
+ });
18217
+ }
18218
+ return issues;
18219
+ });
18220
+ };
15117
18221
 
15118
18222
  // ../shared/operations/create-workflow/index.ts
15119
18223
  var computeNextAvailableActionId = (actions) => {
@@ -15124,13 +18228,28 @@ var computeNextAvailableActionId = (actions) => {
15124
18228
  }
15125
18229
  return String(max + 1);
15126
18230
  };
18231
+ var resolveEnrollmentCriteria = (op) => op.enrollment_criteria ?? (op.enrollment_trigger ? buildEnrollmentCriteriaFromTrigger(op.enrollment_trigger) : void 0);
15127
18232
  var createWorkflowHandler = {
15128
18233
  type: "create_workflow",
15129
18234
  validate: (op, index) => {
15130
18235
  const issues = [];
18236
+ const enrollmentCriteria = resolveEnrollmentCriteria(op);
18237
+ if (op.enrollment_criteria && op.enrollment_trigger) {
18238
+ issues.push({
18239
+ severity: "error",
18240
+ operation_index: index,
18241
+ code: "WORKFLOW_ENROLLMENT_SOURCE_CONFLICT",
18242
+ message: "Use either enrollment_criteria or enrollment_trigger, not both"
18243
+ });
18244
+ }
18245
+ if (op.enrollment_trigger) {
18246
+ issues.push(
18247
+ ...validateWorkflowEnrollmentTriggerObjectType(op.enrollment_trigger, op.object_type_id, index)
18248
+ );
18249
+ }
15131
18250
  issues.push(...validateWorkflowStructure({
15132
18251
  actions: op.actions,
15133
- enrollmentCriteria: op.enrollment_criteria,
18252
+ enrollmentCriteria,
15134
18253
  operationIndex: index
15135
18254
  }));
15136
18255
  if (op.actions.length === 0) {
@@ -15141,7 +18260,12 @@ var createWorkflowHandler = {
15141
18260
  message: "Workflow must have at least one action"
15142
18261
  });
15143
18262
  }
15144
- issues.push(...validateWorkflowActions({ actions: op.actions, operationIndex: index }));
18263
+ issues.push(...validateWorkflowActions({
18264
+ actions: op.actions,
18265
+ operationIndex: index,
18266
+ workflowType: op.workflow_type,
18267
+ objectTypeId: op.object_type_id
18268
+ }));
15145
18269
  if (op.object_type_id === "0-1" && op.workflow_type !== "CONTACT_FLOW") {
15146
18270
  issues.push({
15147
18271
  severity: "warning",
@@ -15162,7 +18286,8 @@ var createWorkflowHandler = {
15162
18286
  },
15163
18287
  validateEffectful: (op, index) => validateWorkflowMetadataEffectful({
15164
18288
  objectTypeId: op.object_type_id,
15165
- enrollmentCriteria: op.enrollment_criteria,
18289
+ workflowType: op.workflow_type,
18290
+ enrollmentCriteria: resolveEnrollmentCriteria(op),
15166
18291
  suppressionListIds: op.suppression_list_ids,
15167
18292
  actions: op.actions,
15168
18293
  operationIndex: index
@@ -15172,6 +18297,7 @@ var createWorkflowHandler = {
15172
18297
  HubSpotService,
15173
18298
  Effect100.flatMap((hs) => {
15174
18299
  const actions = normalizeWorkflowActionValues(op.actions);
18300
+ const enrollmentCriteria = resolveEnrollmentCriteria(op);
15175
18301
  const startActionId = String(actions[0]?.actionId ?? "1");
15176
18302
  return hs.createWorkflow({
15177
18303
  name: op.name,
@@ -15182,7 +18308,7 @@ var createWorkflowHandler = {
15182
18308
  startActionId,
15183
18309
  nextAvailableActionId: computeNextAvailableActionId(actions),
15184
18310
  actions,
15185
- ...op.enrollment_criteria && { enrollmentCriteria: op.enrollment_criteria },
18311
+ ...enrollmentCriteria && { enrollmentCriteria },
15186
18312
  ...op.suppression_list_ids && { suppressionListIds: op.suppression_list_ids },
15187
18313
  ...op.time_windows && { timeWindows: op.time_windows },
15188
18314
  ...op.blocked_dates && { blockedDates: op.blocked_dates },
@@ -15233,13 +18359,23 @@ var computeNextAvailableActionId2 = (actions) => {
15233
18359
  }
15234
18360
  return String(max + 1);
15235
18361
  };
18362
+ var resolveEnrollmentCriteria2 = (op) => op.enrollment_criteria ?? (op.enrollment_trigger ? buildEnrollmentCriteriaFromTrigger(op.enrollment_trigger) : void 0);
15236
18363
  var updateWorkflowHandler = {
15237
18364
  type: "update_workflow",
15238
18365
  validate: (op, index) => {
15239
18366
  const issues = [];
18367
+ const enrollmentCriteria = resolveEnrollmentCriteria2(op);
18368
+ if (op.enrollment_criteria && op.enrollment_trigger) {
18369
+ issues.push({
18370
+ severity: "error",
18371
+ operation_index: index,
18372
+ code: "WORKFLOW_ENROLLMENT_SOURCE_CONFLICT",
18373
+ message: "Use either enrollment_criteria or enrollment_trigger, not both"
18374
+ });
18375
+ }
15240
18376
  issues.push(...validateWorkflowStructure({
15241
18377
  actions: op.actions,
15242
- enrollmentCriteria: op.enrollment_criteria,
18378
+ enrollmentCriteria,
15243
18379
  operationIndex: index
15244
18380
  }));
15245
18381
  if (op.actions) {
@@ -15261,16 +18397,28 @@ var updateWorkflowHandler = {
15261
18397
  (hs) => pipe83(
15262
18398
  hs.getWorkflow(op.workflow_id),
15263
18399
  Effect101.flatMap((workflow) => {
15264
- if (!op.enrollment_criteria && !op.suppression_list_ids && !op.actions) {
18400
+ if (!op.enrollment_criteria && !op.enrollment_trigger && !op.suppression_list_ids && !op.actions) {
15265
18401
  return Effect101.succeed([]);
15266
18402
  }
15267
18403
  return validateWorkflowMetadataEffectful({
15268
18404
  objectTypeId: workflow.objectTypeId ?? "",
15269
- enrollmentCriteria: op.enrollment_criteria,
18405
+ workflowType: workflow.type ?? "",
18406
+ enrollmentCriteria: resolveEnrollmentCriteria2(op),
15270
18407
  suppressionListIds: op.suppression_list_ids,
15271
18408
  actions: op.actions,
15272
18409
  operationIndex: index
15273
- });
18410
+ }).pipe(
18411
+ Effect101.map(
18412
+ (issues) => op.enrollment_trigger ? [
18413
+ ...issues,
18414
+ ...validateWorkflowEnrollmentTriggerObjectType(
18415
+ op.enrollment_trigger,
18416
+ workflow.objectTypeId ?? "",
18417
+ index
18418
+ )
18419
+ ] : issues
18420
+ )
18421
+ );
15274
18422
  }),
15275
18423
  Effect101.catchAll((error) => {
15276
18424
  if (error instanceof HubSpotError && error.code === 404) {
@@ -15321,7 +18469,7 @@ var updateWorkflowHandler = {
15321
18469
  startActionId,
15322
18470
  nextAvailableActionId: computeNextAvailableActionId2(actions),
15323
18471
  actions,
15324
- enrollmentCriteria: op.enrollment_criteria ?? current.enrollmentCriteria,
18472
+ enrollmentCriteria: resolveEnrollmentCriteria2(op) ?? current.enrollmentCriteria,
15325
18473
  suppressionListIds: op.suppression_list_ids ?? current.suppressionListIds,
15326
18474
  timeWindows: op.time_windows ?? current.timeWindows,
15327
18475
  blockedDates: op.blocked_dates ?? current.blockedDates,
@@ -16641,6 +19789,30 @@ var makeEnsureFresh = (deps, options2) => createEnsureFresh(
16641
19789
  options2
16642
19790
  );
16643
19791
 
19792
+ // src/pure/stdio-lifecycle.ts
19793
+ var registerStdioShutdownHooks = ({
19794
+ stdin,
19795
+ stderr,
19796
+ exit
19797
+ }) => {
19798
+ let shuttingDown = false;
19799
+ const shutdown = (reason) => {
19800
+ if (shuttingDown) return;
19801
+ shuttingDown = true;
19802
+ stderr.write(`[stdio] stdin ${reason} received, shutting down MCP client
19803
+ `);
19804
+ exit(0);
19805
+ };
19806
+ const onEnd = () => shutdown("end");
19807
+ const onClose = () => shutdown("close");
19808
+ stdin.on("end", onEnd);
19809
+ stdin.on("close", onClose);
19810
+ return () => {
19811
+ stdin.off("end", onEnd);
19812
+ stdin.off("close", onClose);
19813
+ };
19814
+ };
19815
+
16644
19816
  // src/index.ts
16645
19817
  process.on("uncaughtException", (err) => {
16646
19818
  console.error("[fatal:uncaughtException]", err);
@@ -16662,6 +19834,15 @@ var isEnvFlagEnabled = (name) => {
16662
19834
  var DISABLE_PLUGIN_SYNC = isEnvFlagEnabled("MCP_CLIENT_DISABLE_PLUGIN_SYNC");
16663
19835
  var DISABLE_DIFF_FOLLOWUP = isEnvFlagEnabled("MCP_CLIENT_DISABLE_DIFF_FOLLOWUP");
16664
19836
  var TEST_HEADLESS_MODE = isEnvFlagEnabled("MCP_CLIENT_TEST_HEADLESS");
19837
+ if (!TEST_HEADLESS_MODE) {
19838
+ registerStdioShutdownHooks({
19839
+ stdin: process.stdin,
19840
+ stderr: process.stderr,
19841
+ exit: (code) => {
19842
+ process.exit(code);
19843
+ }
19844
+ });
19845
+ }
16665
19846
  var mainProgram = Effect108.gen(function* () {
16666
19847
  const ws = yield* WebSocketService;
16667
19848
  const config = yield* ConfigService;