[
  {
    "name": "contacts",
    "singular": "contact",
    "label": "Contacts",
    "fields": [
      {
        "name": "email",
        "label": "Email",
        "type": "text",
        "description": "The email address of the contact.",
        "filterable": true,
        "required": true,
        "isPrimary": true
      },
      {
        "name": "full_name",
        "label": "Full Name",
        "type": "text",
        "description": "The full name of the contact.",
        "required": false,
        "associationSearch": true,
        "readOnly": true
      },
      {
        "name": "firstname",
        "label": "First Name",
        "type": "text",
        "description": "The first name of the contact.",
        "filterable": true,
        "required": true,
        "associationSearch": true
      },
      {
        "name": "lastname",
        "label": "Last Name",
        "type": "text",
        "description": "The last name of the contact.",
        "filterable": true,
        "required": true
      },
      {
        "name": "phone",
        "label": "Phone",
        "type": "text",
        "description": "The phone number of the contact.",
        "required": false
      },
      {
        "name": "primary_company",
        "label": "Account (Primary)",
        "type": "association",
        "description": "The primary account this contact belongs to.",
        "filterable": true,
        "required": true,
        "readOnly": true,
        "createOnly": true,
        "associationTarget": "companies",
        "associationRelationship": {
          "id": 1,
          "category": "HUBSPOT_DEFINED",
          "label": "Primary"
        }
      },
      {
        "name": "jobtitle",
        "label": "Title",
        "type": "text",
        "description": "The title of the contact."
      },
      {
        "name": "street_address_multiline",
        "label": "Street Address (multi-line)",
        "type": "multi-line-text",
        "description": "The street address of the contact.",
        "required": false
      },
      {
        "name": "city",
        "label": "City",
        "type": "text",
        "description": "The city of the contact.",
        "required": false
      },
      {
        "name": "state",
        "label": "State/Region/Province",
        "type": "text",
        "description": "The state or region of the contact.",
        "required": false
      },
      {
        "name": "zip",
        "label": "Postal Code",
        "type": "text",
        "description": "The postal or zip code of the contact.",
        "required": false
      },
      {
        "name": "country",
        "label": "Country",
        "type": "enum",
        "description": "The country of the contact.",
        "filterable": true,
        "required": false,
        "options": [
          { "id": "United States", "name": "United States" },
          { "id": "Canada", "name": "Canada" },
          { "id": "United Kingdom", "name": "United Kingdom" },
          { "id": "Australia", "name": "Australia" },
          { "id": "Germany", "name": "Germany" },
          { "id": "France", "name": "France" },
          { "id": "Netherlands", "name": "Netherlands" },
          { "id": "Sweden", "name": "Sweden" },
          { "id": "Norway", "name": "Norway" },
          { "id": "Denmark", "name": "Denmark" },
          { "id": "Finland", "name": "Finland" },
          { "id": "Switzerland", "name": "Switzerland" },
          { "id": "Austria", "name": "Austria" },
          { "id": "Belgium", "name": "Belgium" },
          { "id": "Italy", "name": "Italy" },
          { "id": "Spain", "name": "Spain" },
          { "id": "Portugal", "name": "Portugal" },
          { "id": "Ireland", "name": "Ireland" },
          { "id": "Japan", "name": "Japan" },
          { "id": "South Korea", "name": "South Korea" },
          { "id": "Singapore", "name": "Singapore" },
          { "id": "India", "name": "India" },
          { "id": "China", "name": "China" },
          { "id": "Brazil", "name": "Brazil" },
          { "id": "Mexico", "name": "Mexico" },
          { "id": "Argentina", "name": "Argentina" },
          { "id": "Chile", "name": "Chile" },
          { "id": "New Zealand", "name": "New Zealand" },
          { "id": "South Africa", "name": "South Africa" },
          { "id": "Israel", "name": "Israel" },
          { "id": "Poland", "name": "Poland" },
          { "id": "Czechia", "name": "Czech Republic" },
          { "id": "Russia", "name": "Russia" },
          { "id": "Ukraine", "name": "Ukraine" },
          { "id": "Turkey", "name": "Turkey" },
          { "id": "United Arab Emirates", "name": "United Arab Emirates" },
          { "id": "Saudi Arabia", "name": "Saudi Arabia" },
          { "id": "Thailand", "name": "Thailand" },
          { "id": "Malaysia", "name": "Malaysia" },
          { "id": "Indonesia", "name": "Indonesia" },
          { "id": "Philippines", "name": "Philippines" },
          { "id": "Vietnam", "name": "Vietnam" },
          { "id": "Hong Kong", "name": "Hong Kong" },
          { "id": "Serbia", "name": "Serbia" },
          { "id": "Taiwan", "name": "Taiwan" },
          { "id": "Other", "name": "Other" }
        ]
      }
    ],
    "associations": [
      {
        "name": "company",
        "label": "Account",
        "type": "one-to-many",
        "target": "companies",
        "description": "The primary account this contact belongs to",
        "relationshipTypes": [
          {
            "label": "Primary",
            "name": "primary",
            "maxToObjectIds": 1,
            "category": "HUBSPOT_DEFINED",
            "id": 1
          }
        ]
      },
      {
        "name": "deals",
        "label": "Deals",
        "type": "many-to-many",
        "target": "deals",
        "description": "Deals associated with this contact",
        "relationshipTypes": [
          {
            "label": "Billing Contact",
            "name": "billing_contact",
            "maxToObjectIds": 1000,
            "category": "USER_DEFINED",
            "id": 345
          },
          {
            "label": "Decision Maker",
            "name": "decision_maker_deal",
            "maxToObjectIds": 10000,
            "category": "USER_DEFINED",
            "id": 399
          },
          {
            "label": "First AMC cc",
            "name": "first_amc_cc",
            "maxToObjectIds": 10000,
            "category": "USER_DEFINED",
            "id": 314
          },
          {
            "label": "First Shipping cc",
            "name": "first_shipping_contact",
            "maxToObjectIds": 10000,
            "category": "USER_DEFINED",
            "id": 330
          },
          {
            "label": "FME User",
            "name": "fme_user_deal",
            "maxToObjectIds": 10000,
            "category": "USER_DEFINED",
            "id": 377
          },
          {
            "label": "Primary AMC Contact",
            "name": "primary_amc_contact",
            "maxToObjectIds": 10000,
            "category": "USER_DEFINED",
            "id": 343
          },
          {
            "label": "Procurement",
            "name": "procurement_deal",
            "maxToObjectIds": 10000,
            "category": "USER_DEFINED",
            "id": 341
          },
          {
            "label": "Second AMC cc",
            "name": "second_amc_cc",
            "maxToObjectIds": 10000,
            "category": "USER_DEFINED",
            "id": 397
          },
          {
            "label": "Shipping Contact",
            "name": "shipping_contact_deal",
            "maxToObjectIds": 10000,
            "category": "USER_DEFINED",
            "id": 369
          },
          {
            "label": "Third Party Influencer",
            "name": "third_party_influencer_deal",
            "maxToObjectIds": 10000,
            "category": "USER_DEFINED",
            "id": 363
          }
        ]
      }
    ]
  },
  {
    "name": "companies",
    "singular": "company",
    "label": "Accounts",
    "fields": [
      {
        "name": "customer__",
        "label": "Customer #",
        "type": "text",
        "description": "The customer number.",
        "filterable": true,
        "readOnly": true,
        "isPrimary": true
      },
      {
        "name": "number_of_associated_assets",
        "label": "Assets",
        "type": "rollup",
        "description": "Total assets associated with the account",
        "readOnly": true
      },
      {
        "name": "name",
        "label": "Name",
        "type": "text",
        "description": "The name of the account.",
        "filterable": true,
        "required": true,
        "associationSearch": true
      },
      {
        "name": "type",
        "label": "Type",
        "type": "enum",
        "description": "The type of the account.",
        "options": [
          {
            "name": "Prospect",
            "id": "PROSPECT"
          },
          {
            "name": "Partner",
            "id": "PARTNER"
          },
          {
            "name": "Reseller",
            "id": "RESELLER"
          },
          {
            "name": "Vendor",
            "id": "VENDOR"
          },
          {
            "name": "Other",
            "id": "OTHER"
          },
          {
            "name": "Customer",
            "id": "CUSTOMER"
          },
          {
            "name": "General",
            "id": "GENERAL"
          }
        ],
        "filterable": true,
        "readOnly": true
      },
      {
        "name": "industry_",
        "label": "Industry",
        "type": "enum",
        "description": "The industry of the account.",
        "required": true,
        "options": [
          {
            "name": "AEC",
            "id": "AEC"
          },
          {
            "name": "Commercial",
            "id": "Commercial"
          },
          {
            "name": "Defence/Aerospace",
            "id": "Defence/Aerospace"
          },
          {
            "name": "Education/Non-Profit",
            "id": "Education/Non-Profit"
          },
          {
            "name": "Energy",
            "id": "Energy"
          },
          {
            "name": "Federal Government",
            "id": "Federal Government"
          },
          {
            "name": "Healthcare/Health Tech",
            "id": "Healthcare/Health Tech"
          },
          {
            "name": "Local Government",
            "id": "Local Government"
          },
          {
            "name": "Natural Resources",
            "id": "Natural Resources"
          },
          {
            "name": "Software/Technology",
            "id": "Software/Technology"
          },
          {
            "name": "State/Provincial Government",
            "id": "State/Provincial Government"
          },
          {
            "name": "Telecommunications",
            "id": "Telecommunications"
          },
          {
            "name": "Transportation",
            "id": "Transportation"
          },
          {
            "name": "Utilities",
            "id": "Utilities"
          },
          {
            "name": "Other",
            "id": "Other"
          },
          {
            "name": "None (Partner)",
            "id": "None (Partner)"
          }
        ],
        "filterable": true
      },
      {
        "name": "website",
        "label": "Website",
        "type": "url",
        "description": "The website of the account."
      },
      {
        "name": "phone",
        "label": "Phone",
        "type": "text",
        "description": "The phone number of the account."
      },
      {
        "name": "street_address_multiline",
        "label": "Street Address (multi-line)",
        "type": "multi-line-text",
        "description": "The address of the account.",
        "required": true
      },
      {
        "name": "city",
        "label": "City",
        "type": "text",
        "description": "The city of the account.",
        "required": true
      },
      {
        "name": "state",
        "label": "State/Region/Province",
        "type": "text",
        "description": "The state of the account.",
        "required": false
      },
      {
        "name": "zip",
        "label": "Zip/Postal Code",
        "type": "text",
        "description": "The zip/postal code of the account.",
        "required": true
      },
      {
        "name": "country",
        "label": "Country",
        "type": "enum",
        "description": "The country of the account.",
        "filterable": true,
        "required": true,
        "options": [
          { "id": "United States", "name": "United States" },
          { "id": "Canada", "name": "Canada" },
          { "id": "United Kingdom", "name": "United Kingdom" },
          { "id": "Australia", "name": "Australia" },
          { "id": "Germany", "name": "Germany" },
          { "id": "France", "name": "France" },
          { "id": "Netherlands", "name": "Netherlands" },
          { "id": "Sweden", "name": "Sweden" },
          { "id": "Norway", "name": "Norway" },
          { "id": "Denmark", "name": "Denmark" },
          { "id": "Finland", "name": "Finland" },
          { "id": "Switzerland", "name": "Switzerland" },
          { "id": "Austria", "name": "Austria" },
          { "id": "Belgium", "name": "Belgium" },
          { "id": "Italy", "name": "Italy" },
          { "id": "Spain", "name": "Spain" },
          { "id": "Portugal", "name": "Portugal" },
          { "id": "Ireland", "name": "Ireland" },
          { "id": "Japan", "name": "Japan" },
          { "id": "South Korea", "name": "South Korea" },
          { "id": "Singapore", "name": "Singapore" },
          { "id": "India", "name": "India" },
          { "id": "China", "name": "China" },
          { "id": "Brazil", "name": "Brazil" },
          { "id": "Mexico", "name": "Mexico" },
          { "id": "Argentina", "name": "Argentina" },
          { "id": "Chile", "name": "Chile" },
          { "id": "New Zealand", "name": "New Zealand" },
          { "id": "South Africa", "name": "South Africa" },
          { "id": "Israel", "name": "Israel" },
          { "id": "Poland", "name": "Poland" },
          { "id": "Czechia", "name": "Czech Republic" },
          { "id": "Russia", "name": "Russia" },
          { "id": "Ukraine", "name": "Ukraine" },
          { "id": "Turkey", "name": "Turkey" },
          { "id": "United Arab Emirates", "name": "United Arab Emirates" },
          { "id": "Saudi Arabia", "name": "Saudi Arabia" },
          { "id": "Thailand", "name": "Thailand" },
          { "id": "Malaysia", "name": "Malaysia" },
          { "id": "Indonesia", "name": "Indonesia" },
          { "id": "Philippines", "name": "Philippines" },
          { "id": "Vietnam", "name": "Vietnam" },
          { "id": "Hong Kong", "name": "Hong Kong" },
          { "id": "Serbia", "name": "Serbia" },
          { "id": "Taiwan", "name": "Taiwan" },
          { "id": "Other", "name": "Other" }
        ]
      },
      {
        "name": "account_status",
        "label": "Account Status",
        "type": "string",
        "description": "Indicates whether the customer is active or inactive.",
        "filterable": true,
        "readOnly": true
      }
    ],
    "associations": [
      {
        "name": "contacts",
        "label": "Contacts",
        "type": "one-to-many",
        "target": "contacts",
        "description": "Contacts that belong to this account",
        "relationshipTypes": [
          {
            "label": "Contact with Primary Account",
            "name": "company_to_contact",
            "maxToObjectIds": 50000,
            "category": "HUBSPOT_DEFINED",
            "id": 2
          }
        ]
      },
      {
        "name": "deals",
        "label": "Deals",
        "type": "one-to-many",
        "target": "deals",
        "description": "Deals associated with this account",
        "relationshipTypes": [
          {
            "label": "Deal with Primary Account",
            "name": "company_to_deal",
            "maxToObjectIds": 50000,
            "category": "HUBSPOT_DEFINED",
            "id": 6
          }
        ]
      }
    ]
  },
  {
    "name": "deals",
    "singular": "deal",
    "label": "Deals",
    "fields": [
      {
        "name": "company_name",
        "label": "Account (Primary)",
        "type": "text",
        "description": "The name of the primary account associated with the deal.",
        "filterable": true,
        "readOnly": true,
        "required": false
      },
      {
        "name": "createdate",
        "label": "Create Date",
        "type": "datetime",
        "description": "The date the deal was created.",
        "readOnly": true,
        "filterable": true
      },
      {
        "name": "dealname",
        "label": "Deal Name",
        "type": "text",
        "description": "The name of the deal.",
        "filterable": true,
        "required": true,
        "associationSearch": true
      },
      {
        "name": "dealtype",
        "label": "Deal Type",
        "type": "enum",
        "description": "The type of the deal.",
        "options": [
          {
            "id": "newbusiness",
            "name": "New Business"
          },
          {
            "id": "Subscription Asset",
            "name": "Subscription Asset"
          },
          {
            "id": "existingbusiness",
            "name": "Existing Business"
          },
          {
            "id": "Annual Maintenance",
            "name": "Annual Maintenance"
          },
          {
            "id": "Grant Program",
            "name": "Grant Program"
          },
          {
            "id": "Dev Program",
            "name": "Dev Program"
          },
          {
            "id": "Upgrade",
            "name": "Upgrade"
          },
          {
            "id": "MSP Cloud Order",
            "name": "MSP Cloud Order"
          }
        ],
        "filterable": true,
        "required": true
      },
      {
        "name": "amount",
        "label": "Amount",
        "type": "currency",
        "description": "The amount of the deal.",
        "required": true,
        "readOnly": true
      },
      {
        "name": "amount_in_home_currency",
        "label": "Amount (CAD)",
        "type": "currency",
        "description": "The deal amount converted to the partner company's currency.",
        "readOnly": true,
        "companyCurrency": "CAD"
      },
      {
        "name": "dealstage",
        "label": "Deal Stage",
        "type": "enum",
        "description": "The stage of the deal.",
        "options": [
          {
            "id": "226987385",
            "name": "Prospecting"
          },
          {
            "id": "226987386",
            "name": "Opportunity Identification"
          },
          {
            "id": "226987387",
            "name": "Technical Decision"
          },
          {
            "id": "226987388",
            "name": "Purchase Commitment"
          },
          {
            "id": "226987389",
            "name": "In Procurement"
          },
          {
            "id": "226987391",
            "name": "Not Pursued"
          },
          {
            "id": "226987390",
            "name": "Closed Won"
          },
          {
            "id": "227275596",
            "name": "Closed Lost"
          }
        ],
        "filterable": true,
        "required": true
      },
      {
        "name": "closedate",
        "label": "Close Date",
        "type": "datetime",
        "description": "The close date of the deal.",
        "required": true,
        "filterable": true
      },
      {
        "name": "hs_manual_forecast_category",
        "label": "Forecast Category",
        "type": "enum",
        "description": "Your confidence this deal closes in the current quarter — Pipeline (default), Upside (possible), or Commit (highly confident).",
        "default": "PIPELINE",
        "options": [
          {
            "id": "OMIT",
            "name": "Not forecasted"
          },
          {
            "id": "PIPELINE",
            "name": "Pipeline"
          },
          {
            "id": "Upside",
            "name": "Upside"
          },
          {
            "id": "COMMIT",
            "name": "Commit"
          },
          {
            "id": "CLOSED",
            "name": "Closed won"
          }
        ],
        "filterable": true,
        "required": true
      },
      {
        "name": "deal_sub_type",
        "label": "Deal Subtype",
        "type": "enum",
        "description": "The subtype of the deal.",
        "options": [
          {
            "id": "Upsell",
            "name": "Upsell"
          },
          {
            "id": "Cross-sell",
            "name": "Cross-sell"
          },
          {
            "id": "Sub-conversion",
            "name": "Sub-conversion"
          },
          {
            "id": "Flow Hosted",
            "name": "Flow Hosted"
          },
          {
            "id": "None",
            "name": "None"
          }
        ],
        "filterable": true,
        "required": true,
        "tooltip": true
      },
      {
        "name": "description",
        "label": "Description",
        "type": "multi-line-text",
        "description": "Special instructions or important details for Safe's order processing team",
        "hideFromTable": true
      },
      {
        "name": "partner_notes",
        "label": "Partner Notes",
        "type": "multi-line-text",
        "description": "Your deal update for the CAM team — include current status, expected close timing, and any relevant context",
        "hideFromTable": true
      },
      {
        "name": "opportunity_number",
        "label": "Opportunity Number",
        "type": "text",
        "description": "The opportunity number of the deal.",
        "filterable": true,
        "readOnly": true,
        "hideFromTable": true
      },
      {
        "name": "deal_currency_code",
        "label": "Currency",
        "type": "enum",
        "description": "The currency type for this deal.",
        "options": [
          {
            "id": "USD",
            "name": "USD"
          },
          {
            "id": "CAD",
            "name": "CAD"
          },
          {
            "id": "GBP",
            "name": "GBP"
          },
          {
            "id": "EUR",
            "name": "EUR"
          },
          {
            "id": "AUD",
            "name": "AUD"
          }
        ],
        "filterable": true,
        "required": true,
        "hideFromTable": true
      },
      {
        "name": "customer_purchase_order",
        "label": "Customer Purchase Order",
        "type": "text",
        "description": "The customer purchase order number.",
        "required": true,
        "hideFromTable": true
      },
      {
        "name": "hs_deal_stage_probability",
        "label": "Deal Stage Probability",
        "type": "percentage",
        "description": "The probability of the deal closing.",
        "readOnly": true,
        "hideFromTable": true
      },
      {
        "name": "is_subscription_deal_",
        "label": "Is Subscription Deal",
        "type": "calculation",
        "readOnly": true,
        "hidden": true
      },
      {
        "name": "total_ela_line_items",
        "label": "Total ELA Line Items",
        "type": "rollup",
        "readOnly": true,
        "hidden": true
      },
      {
        "name": "count_of_line_items",
        "label": "Count of Line Items",
        "type": "rollup",
        "description": "Number of line items associated with this deal. Used to lock currency changes.",
        "readOnly": true,
        "hidden": true
      },
      {
        "name": "billing_contact_sync",
        "label": "Billing Contact",
        "type": "text",
        "description": "ID of the billing contact associated with this deal.",
        "readOnly": true,
        "hideFromTable": true
      },
      {
        "name": "shipping_contact_email_sync",
        "label": "Shipping Contact Email",
        "type": "text",
        "description": "Email of the shipping contact associated with this deal.",
        "readOnly": true,
        "hideFromTable": true
      },
      {
        "name": "primary_amc_contact_email",
        "label": "Primary AMC Contact",
        "type": "text",
        "description": "ID of the primary AMC contact associated with this deal.",
        "readOnly": true,
        "hideFromTable": true
      }
    ],
    "associations": [
      {
        "name": "company",
        "label": "Account",
        "type": "many-to-one",
        "target": "companies",
        "description": "The primary account associated with this deal",
        "relationshipTypes": [
          {
            "label": "Primary",
            "name": "primary",
            "maxToObjectIds": 1,
            "category": "HUBSPOT_DEFINED",
            "id": 5
          }
        ]
      },
      {
        "name": "contacts",
        "label": "Contacts",
        "type": "many-to-many",
        "target": "contacts",
        "description": "Contacts associated with this deal",
        "relationshipTypes": [
          {
            "label": "Billing Contact",
            "name": "billing_contact",
            "maxToObjectIds": 1000,
            "category": "USER_DEFINED",
            "id": 344
          },
          {
            "label": "Decision Maker",
            "name": "decision_maker_deal",
            "maxToObjectIds": 1000,
            "category": "USER_DEFINED",
            "id": 398
          },
          {
            "label": "First AMC cc",
            "name": "first_amc_cc",
            "maxToObjectIds": 1000,
            "category": "USER_DEFINED",
            "id": 313
          },
          {
            "label": "First Shipping cc",
            "name": "first_shipping_contact",
            "maxToObjectIds": 1000,
            "category": "USER_DEFINED",
            "id": 329
          },
          {
            "label": "FME User",
            "name": "fme_user_deal",
            "maxToObjectIds": 1000,
            "category": "USER_DEFINED",
            "id": 376
          },
          {
            "label": "Primary AMC Contact",
            "name": "primary_amc_contact",
            "maxToObjectIds": 1000,
            "category": "USER_DEFINED",
            "id": 342
          },
          {
            "label": "Procurement",
            "name": "procurement_deal",
            "maxToObjectIds": 1000,
            "category": "USER_DEFINED",
            "id": 340
          },
          {
            "label": "Second AMC cc",
            "name": "second_amc_cc",
            "maxToObjectIds": 1000,
            "category": "USER_DEFINED",
            "id": 396
          },
          {
            "label": "Shipping Contact",
            "name": "shipping_contact_deal",
            "maxToObjectIds": 1000,
            "category": "USER_DEFINED",
            "id": 368
          },
          {
            "label": "Third Party Influencer",
            "name": "third_party_influencer_deal",
            "maxToObjectIds": 1000,
            "category": "USER_DEFINED",
            "id": 362
          }
        ]
      },
      {
        "name": "contracts",
        "label": "Contracts",
        "type": "one-to-one",
        "target": "p_contracts",
        "description": "Contract associated with this deal",
        "relationshipTypes": [
          {
            "label": "Deal Contract",
            "name": "deal_to_contract",
            "maxToObjectIds": 1,
            "category": "HUBSPOT_DEFINED",
            "id": 1048
          }
        ]
      }
    ]
  }
]
