HubSpot Process Documentation
- Generated by: HubSpot Documentation Engine
- Total process candidates: 1
- Workflow assessment scope: name_contains via DOCS_WORKFLOW_PREFIXES: ELEVATE, Quality (86/500)
- List assessment scope: name_contains via DOCS_LIST_PREFIXES: ELEVATE (45/2191)
- Status: draft
ELEVATE_(Re)associate Company with lead
METADATA
title: ELEVATE_(Re)associate Company with lead
type: process
domain: ELEVATE
objects: [Contact]
status: draft
User Story (optional)
Logic not derivable from system.
Why
- Why this process exists: Logic not derivable from system.
- What business problem it solves: Logic not derivable from system.
- What breaks if removed: HubSpot would stop executing the system behavior listed below; business impact is not derivable from system alone.
How It Works
Trigger
- Exact trigger from workflow: HubSpot enrollment criteria type: EVENT_BASED
- Criteria type: EVENT_BASED
- Filter-like criteria returned: 5
- Property references: hs_name, hs_value
- List references: none detected
- Filter types: PROPERTY: 2
- Operators: ALL_PROPERTY: 1, HAS_COMPLETED: 1, IS_EQUAL_TO: 1, IS_KNOWN: 1, STRING: 1
- Trigger logic:
- Enrollment criteria type: EVENT_BASED
- Enrollment branch 1:
- AND group
- hs_name equals company_id__sync_
- hs_value is known
Steps
Step 1 - Action 1
- What happens: Runs custom code; 0 inputs; 0 outputs
- What triggers it: Workflow start action returned by HubSpot
- System condition: Previous workflow connection or enrollment trigger returned by HubSpot.
- What data is used: properties: Lead Name (hs_lead_name); lists: none detected
DATA MEANING:
ACTION EVIDENCE:
- Action category: custom_code
- Connection: object with keys: edgeType, nextActionId
- Detected intent: Runs custom code
- Returned action type: CUSTOM_CODE
ACTION-LEVEL CONDITIONS:
- No extra action-level filter logic detected.
BRANCH LOGIC:
- No branch paths detected in this step.
LIST LOGIC:
- No list logic detected in this step.
PROPERTY MAPPINGS:
- No property mappings detected in this step.
CUSTOM CODE LOGIC:
- Inputs used by code: none detected
-
| Conditions detected in code: Code condition: if (!token) { Code condition: if (!contactId) { Code condition: if (primaryCompanyId) { Code condition: if (associatedCompanies.length === 0) { Code condition: if (current.includes(“ |
”)) { Code condition: if (String(companyId) === String(keepCompanyId)) continue; Code condition: if (!companyPick.companyId) { Code condition: if (leads.length === 0) { Code condition: if (DEBUG) { Code condition: if (!targetCompanyName) { Code condition: if (updatedName.trim() === currentName.trim()) { Code condition: if (DEBUG) log(Lead ${leadId} name already correct. Skipping.); |
- CRM/API operations detected: creates records or resources, creates, removes, or checks associations, deletes or archives records, searches records, updates records or resources, writes properties: hs_lead_name
- Concrete CRM operations: archive/delete: associations, companies, contacts, objects; associate: associations, companies, contacts, objects; create: associations, companies, contacts, objects; read by ID: associations, companies, contacts, objects; search: associations, companies, contacts, objects; update: associations, companies, contacts, objects
- Search/filter evidence: search/filter operator: EQ; search/filter property: associations.contact
- Data transformations: combines multiple values, maps collections into derived values, normalizes text to lowercase, removes surrounding whitespace, serializes data as JSON, splits a value into parts
- Outputs returned to workflow: companySource, error, failures, fallbackCompanyCount, leadsAssociatedPrimaryFailed, leadsAssociatedPrimaryOk, leadsFound, leadsRemoveOldCompaniesFailed, leadsRenameFailed, leadsRenameSkipped, leadsRenamed, ok, otherCompanyAssociationsRemoved, outputFields, reason, status, targetCompanyId, targetCompanyName
- HubSpot CRM objects affected or referenced: associations, companies, contacts, objects
- Associations handled: association logic referenced in custom code, association type ID 580
- Workflow control: contains asynchronous execution, returns output fields to later workflow actions
- Safeguards/error handling: error or warning logging, guard clauses or missing-value checks, structured response handling, try/catch error handling, checks missing values, has catch block, logs errors
- Imports: @hubspot/api-client
- External systems/hosts: none detected
- External call evidence: none detected
- HTTP methods in code: none detected
- Secrets configured: 2
- Code evidence: 321 lines returned; code body analyzed but omitted from docs
Step 2 - Action 3
- What happens: Runs a connected HubSpot workflow action
- What triggers it: After action 1
- System condition: Previous workflow connection or enrollment trigger returned by HubSpot.
- What data is used: properties: none detected; lists: none detected
DATA MEANING:
- No property descriptions returned for the properties in this step.
ACTION EVIDENCE:
- Action category: connected_action
- Connection: object with keys: edgeType, nextActionId
- Detected intent: Runs a connected HubSpot workflow action
- Returned action type: SINGLE_CONNECTION
- Returned field keys: delta, time_unit
ACTION-LEVEL CONDITIONS:
- No extra action-level filter logic detected.
BRANCH LOGIC:
- No branch paths detected in this step.
LIST LOGIC:
- No list logic detected in this step.
PROPERTY MAPPINGS:
- No property mappings detected in this step.
CUSTOM CODE LOGIC:
- No custom code detected in this step.
Step 3 - Action 2
- What happens: Branches based on HubSpot list membership; 2 branches
- What triggers it: After action 3
- System condition: 2 branch condition(s) returned by HubSpot.
- What data is used: properties: Company (hs_associated_company_name); lists: none detected
DATA MEANING:
ACTION EVIDENCE:
- Action category: list_branch
- Detected intent: Branches based on HubSpot list membership
- Returned action type: LIST_BRANCH
ACTION-LEVEL CONDITIONS:
- No extra action-level filter logic detected.
BRANCH LOGIC:
- Branch: known
- Condition summary: known
- Default branch: no
- Next action IDs: workflow exit or not returned
- Referenced properties: Company (hs_associated_company_name)
- Referenced lists: none detected
- Filter-like criteria returned: 3
- Returned branch logic:
- Branch: default branch
- Condition summary: default branch
- Default branch: yes
- Next action IDs: 7
- Referenced properties: none detected
- Referenced lists: none detected
- Filter-like criteria returned: 0
- Returned branch logic:
- AND group
- Branch name: default branch
- Next action: 7
LIST LOGIC:
- No list logic detected in this step.
PROPERTY MAPPINGS:
- No property mappings detected in this step.
CUSTOM CODE LOGIC:
- No custom code detected in this step.
Step 4 - Action 7
- What happens: Runs a connected HubSpot workflow action
- What triggers it: After action 2
- System condition: Previous workflow connection or enrollment trigger returned by HubSpot.
- What data is used: properties: none detected; lists: none detected
DATA MEANING:
- No property descriptions returned for the properties in this step.
ACTION EVIDENCE:
- Action category: connected_action
- Connection: object with keys: edgeType, nextActionId
- Detected intent: Runs a connected HubSpot workflow action
- Returned action type: SINGLE_CONNECTION
- Returned field keys: delta, time_unit
ACTION-LEVEL CONDITIONS:
- No extra action-level filter logic detected.
BRANCH LOGIC:
- No branch paths detected in this step.
LIST LOGIC:
- No list logic detected in this step.
PROPERTY MAPPINGS:
- No property mappings detected in this step.
CUSTOM CODE LOGIC:
- No custom code detected in this step.
Step 5 - Action 4
- What happens: Runs custom code; 0 inputs; 0 outputs
- What triggers it: After action 7
- System condition: Previous workflow connection or enrollment trigger returned by HubSpot.
- What data is used: properties: Lead Name (hs_lead_name); lists: none detected
DATA MEANING:
ACTION EVIDENCE:
- Action category: custom_code
- Connection: object with keys: edgeType, nextActionId
- Detected intent: Runs custom code
- Returned action type: CUSTOM_CODE
ACTION-LEVEL CONDITIONS:
- No extra action-level filter logic detected.
BRANCH LOGIC:
- No branch paths detected in this step.
LIST LOGIC:
- No list logic detected in this step.
PROPERTY MAPPINGS:
- No property mappings detected in this step.
CUSTOM CODE LOGIC:
- Inputs used by code: none detected
-
| Conditions detected in code: Code condition: if (!token) { Code condition: if (!contactId) { Code condition: if (primaryCompanyId) { Code condition: if (associatedCompanies.length === 0) { Code condition: if (current.includes(“ |
”)) { Code condition: if (String(companyId) === String(keepCompanyId)) continue; Code condition: if (!companyPick.companyId) { Code condition: if (leads.length === 0) { Code condition: if (DEBUG) { Code condition: if (!targetCompanyName) { Code condition: if (updatedName.trim() === currentName.trim()) { Code condition: if (DEBUG) log(Lead ${leadId} name already correct. Skipping.); |
- CRM/API operations detected: creates records or resources, creates, removes, or checks associations, deletes or archives records, searches records, updates records or resources, writes properties: hs_lead_name
- Concrete CRM operations: archive/delete: associations, companies, contacts, objects; associate: associations, companies, contacts, objects; create: associations, companies, contacts, objects; read by ID: associations, companies, contacts, objects; search: associations, companies, contacts, objects; update: associations, companies, contacts, objects
- Search/filter evidence: search/filter operator: EQ; search/filter property: associations.contact
- Data transformations: combines multiple values, maps collections into derived values, normalizes text to lowercase, removes surrounding whitespace, serializes data as JSON, splits a value into parts
- Outputs returned to workflow: companySource, error, failures, fallbackCompanyCount, leadsAssociatedPrimaryFailed, leadsAssociatedPrimaryOk, leadsFound, leadsRemoveOldCompaniesFailed, leadsRenameFailed, leadsRenameSkipped, leadsRenamed, ok, otherCompanyAssociationsRemoved, outputFields, reason, status, targetCompanyId, targetCompanyName
- HubSpot CRM objects affected or referenced: associations, companies, contacts, objects
- Associations handled: association logic referenced in custom code, association type ID 580
- Workflow control: contains asynchronous execution, returns output fields to later workflow actions
- Safeguards/error handling: error or warning logging, guard clauses or missing-value checks, structured response handling, try/catch error handling, checks missing values, has catch block, logs errors
- Imports: @hubspot/api-client
- External systems/hosts: none detected
- External call evidence: none detected
- HTTP methods in code: none detected
- Secrets configured: 2
- Code evidence: 321 lines returned; code body analyzed but omitted from docs
Step 6 - Action 5
- What happens: Runs a connected HubSpot workflow action
- What triggers it: After action 4
- System condition: Previous workflow connection or enrollment trigger returned by HubSpot.
- What data is used: properties: none detected; lists: none detected
DATA MEANING:
- No property descriptions returned for the properties in this step.
ACTION EVIDENCE:
- Action category: connected_action
- Detected intent: Runs a connected HubSpot workflow action
- Returned action type: SINGLE_CONNECTION
- Returned field keys: delta, time_unit
ACTION-LEVEL CONDITIONS:
- No extra action-level filter logic detected.
BRANCH LOGIC:
- No branch paths detected in this step.
LIST LOGIC:
- No list logic detected in this step.
PROPERTY MAPPINGS:
- No property mappings detected in this step.
CUSTOM CODE LOGIC:
- No custom code detected in this step.
System Behavior
- Workflow actions: 6
- Branch actions: 1
- Custom code actions: 2
- Property operations: 0
- List dependencies: 0
- Action categories: connected_action: 3, custom_code: 2, list_branch: 1
- Property operation types: Logic not derivable from system.
- Associations created: listed under Outcomes when custom code exposes association evidence.
Outcomes
- Objects created: associations (custom code contains create call), companies (custom code contains create call), contacts (custom code contains create call), objects (custom code contains create call)
- Objects updated: associations (custom code contains update call), companies (custom code contains update call), contacts (custom code contains update call), objects (custom code contains update call)
- Associations created: association logic referenced in custom code, association logic referenced in custom code
- Marketing emails sent: 0
- Internal notifications: 0
- Sequence enrollments: 0
- Subscription updates: 0
- Webhooks: 0
- Custom code actions: 2
How It Is Implemented
Workflows
- Workflow: ELEVATE_(Re)associate Company with lead
- Workflow ID: 3214698718
- Revision ID: 14
- Enabled: yes
- Current HubSpot description: No workflow description returned.
- Purpose: Logic not derivable from system.
- Key logic: connected_action: 3, custom_code: 2, list_branch: 1
- Branching logic: 2 branch detail(s) returned by HubSpot
- known: known; next actions: not returned; properties: hs_associated_company_name; lists: none detected
- default branch: default branch; next actions: 7; properties: none detected; lists: none detected
- Dependencies: lists: none detected; properties: Company (hs_associated_company_name), hs_name, hs_value; custom code: 2 custom code action(s)
Property Context
- Company (hs_associated_company_name) - Name of the associated company if present. Roles: branch condition, step data. internal name: hs_associated_company_name; object: Leads; type: string.
- Lead Name (hs_lead_name) - The full name of the lead. Roles: step data. internal name: hs_lead_name; object: Leads; type: string.
- hs_name - No HubSpot property description returned. Roles: trigger condition. internal name: hs_name; object: object not returned; type: not returned.
- hs_value - No HubSpot property description returned. Roles: trigger condition. internal name: hs_value; object: object not returned; type: not returned.
Evidence And Gaps
- Domain evidence: Derived from configured workflow scope prefix: ELEVATE
- Quality flags: custom_code_present: Workflow appears to contain one or more custom code actions.
branching_logic_present: Workflow contains branching logic.
- Narrative context: not used as source of truth.