Overview
This page documents the data structures used throughout the Marketing Events Sync workflow, including API response formats, internal data models, and callback output structures.Marketing Event Object
Source Structure
From: HubSpot Marketing Events API response Example from:test.js:6-29
Field Definitions
Name of the marketing event. Used as
dealname in the created deal.Type of event (e.g., “Webinar”, “Conference”, “Onsite - In Person”, “Workshop”)
ISO 8601 formatted start date and time for the event
ISO 8601 formatted end date and time for the event
Name of the organization or person organizing the event. Mapped to valid HubSpot options.
Description text for the event
URL for event registration or details page
Whether the event has been cancelled
Whether the event has been completed
Array of custom property objects (see Custom Properties structure below)
Unique identifier for the marketing event. Used as
evento_marketing_id in deals.Current status: “UPCOMING”, “ONGOING”, “COMPLETED”, or “CANCELLED”
ISO 8601 timestamp when the event was created in HubSpot
Custom Properties Array
Location: Nested within Marketing Event objects Example from:test.js:16-25, 38-47, 61-70
Structure
Field Definitions
Property identifier/key
Property value
Common Properties
pipeline
pipeline
Identifies which HubSpot pipeline the deal should be assigned to.Type:
string | numberValid Values:"default"- Default pipeline732960029,733263424,733155504,732990838,733019304,733257614- Specific pipeline IDs
getPipelineFromCustomProperties() functionsimpleevents_event_location
simpleevents_event_location
Physical or virtual location of the event.Type:
stringExamples:"Icare | El Golf 40, Piso Zócalo, Las Condes""Online""Santiago"
simpleevents_configuration
simpleevents_configuration
Encoded configuration data from SimpleEvents.io integration.Type:
stringFormat: Base64 encoded JSONDeal Properties Object
Location: Sent in POST request to create deals Defined in:events.js:284-295
Structure
Field Definitions
Name of the deal (from
eventName)Source: eventData.eventNameEvent start date/time in ISO 8601 formatSource:
eventData.startDateTimeEvent end date/time in ISO 8601 formatSource:
eventData.endDateTimeMapped organizer value (Icare, G12, or Legal)Source: Transformed from
eventData.eventOrganizer via mapOrganizerToValidOption()Valid Values: "Icare", "G12", "Legal"Event description textSource:
eventData.eventDescriptionEvent URL for registration or detailsSource:
eventData.eventUrlUnique marketing event identifierSource:
eventData.objectIdPurpose: Links deal to original marketing event; used for duplicate detectionMarketing event typeSource:
eventData.eventTypePipeline identifierSource: Extracted from
customProperties via getPipelineFromCustomProperties()Default: "default"Deal stage ID based on pipelineSource: Mapped from pipeline via
getDealStageByPipeline()Default: "appointmentscheduled"Pipeline Mapping Structure
Location:events.js:205-213
Definition
Mapping Table
| Pipeline ID | Deal Stage ID | Description |
|---|---|---|
| default | appointmentscheduled | Default pipeline stage |
| 732960029 | 1067986567 | Custom pipeline 1 |
| 733263424 | 1068046680 | Custom pipeline 2 |
| 733155504 | 1067993111 | Custom pipeline 3 |
| 732990838 | 1067990364 | Custom pipeline 4 |
| 733019304 | 1068033893 | Custom pipeline 5 |
| 733257614 | 1068039530 | Custom pipeline 6 |
If a pipeline value is not found in the mapping, the function returns
"appointmentscheduled" as the default deal stage.Callback Output Structure
Location:events.js:362-372
Success Response
Field Definitions
Total number of marketing events retrieved from API
Number of events created today (after filtering)
Number of deals successfully created
Number of events skipped (already exist)
Number of events that failed to create
JSON string array of created deal objects with
id and dealnameJSON string array of skipped events with
name and reasonJSON string array of failed events with
name and errorCreated Event Object
Location: Returned bycreateCustomRecord() at events.js:315-318
Structure
HubSpot CRM object ID for the created deal
Name of the created deal (same as event name)
Skipped Event Object
Location: Created during processing loop atevents.js:333, 341
Structure
Name of the skipped event
Reason for skippingPossible Values:
"exists_by_id"- Event already exists byevento_marketing_id"exists_by_name"- Event already exists bydealname
Failed Event Object
Location: Created during error handling atevents.js:350-353
Structure
Name of the event that failed to create
Error message from the exception
Test Data Examples
Complete Event with Pipeline
From:test.js:54-74
Event with Unmapped Pipeline
From:test.js:98-118
Note how the unmapped pipeline value
"999888777" is preserved in the pipeline field, but the dealstage defaults to "appointmentscheduled".Event Without Pipeline
From:test.js:31-52
When no
pipeline property is found in customProperties, the function uses "default" as the pipeline value and "appointmentscheduled" as the deal stage.