{
  "actionUrl": "<NEXUSCRM_WEBHOOK_BASE_URL>/webhooks/hubspot-crm-connector/workflow-action",
  "published": false,
  "objectTypes": [
    "CONTACT"
  ],
  "inputFields": [
    {
      "typeDefinition": {
        "name": "campaign_id",
        "type": "enumeration",
        "fieldType": "select",
        "optionsUrl": "<EXTERNAL_ADAPTER_BASE_URL>/hubspot/workflow-actions/options/campaigns?options_token=<OPTIONS_TOKEN>"
      },
      "supportedValueTypes": [
        "STATIC_VALUE"
      ],
      "isRequired": true
    },
    {
      "typeDefinition": {
        "name": "status",
        "type": "enumeration",
        "fieldType": "select",
        "optionsUrl": "<EXTERNAL_ADAPTER_BASE_URL>/hubspot/workflow-actions/options/statuses?options_token=<OPTIONS_TOKEN>"
      },
      "supportedValueTypes": [
        "STATIC_VALUE"
      ],
      "isRequired": true
    },
    {
      "typeDefinition": {
        "name": "email",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": true
    },
    {
      "typeDefinition": {
        "name": "salesforceleadid",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "salesforcecontactid",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "firstname",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "lastname",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "company",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "country_picklist__sfdc_",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "hubspot_owner_id",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "jobtitle",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "leadsource",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "lifecyclestage",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "no__of_times_mql",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "hs_lead_status",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "salesforce_industry",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "recent_source",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "recent_source_details",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    },
    {
      "typeDefinition": {
        "name": "lead_source_details",
        "type": "string",
        "fieldType": "text"
      },
      "supportedValueTypes": [
        "OBJECT_PROPERTY"
      ],
      "isRequired": false
    }
  ],
  "inputFieldDependencies": [
    {
      "dependencyType": "SINGLE_FIELD",
      "controllingFieldName": "campaign_id",
      "dependentFieldNames": [
        "status"
      ]
    }
  ],
  "labels": {
    "en": {
      "actionName": "Add to NexusCRM Campaign",
      "actionDescription": "Creates or updates a CampaignMember in NexusCRM for the enrolled Contact.",
      "appDisplayName": "NexusCRM",
      "actionCardContent": "Add contact to campaign {{campaign_id}} with status {{status}}",
      "inputFieldLabels": {
        "campaign_id": "NexusCRM Campaign",
        "status": "Member Status",
        "email": "Contact Email",
        "salesforceleadid": "Legacy Lead ID",
        "salesforcecontactid": "Legacy Contact ID",
        "firstname": "Contact First Name",
        "lastname": "Contact Last Name",
        "company": "Contact Company",
        "country_picklist__sfdc_": "Country",
        "hubspot_owner_id": "HubSpot Owner ID",
        "jobtitle": "Job Title",
        "leadsource": "Lead Source",
        "lifecyclestage": "Lifecycle Stage",
        "no__of_times_mql": "Number of Times MQL",
        "hs_lead_status": "HubSpot Lead Status",
        "salesforce_industry": "Salesforce Industry",
        "recent_source": "Recent Source",
        "recent_source_details": "Recent Source Details",
        "lead_source_details": "Lead Source Details"
      },
      "inputFieldDescriptions": {
        "campaign_id": "Search by campaign name through the external adapter selected by NexusCRM#1949.",
        "status": "Select a CampaignMemberStatus returned by the external adapter for the selected campaign.",
        "email": "Bind to the Contact's Email property; NexusCRM uses it only as a deterministic person-resolution input.",
        "salesforceleadid": "Bind to HubSpot's explicit legacy Lead ID property for fail-closed migration identity resolution.",
        "salesforcecontactid": "Bind to HubSpot's explicit legacy Contact ID property for fail-closed migration identity resolution.",
        "firstname": "Bind to the Contact's First Name property; NexusCRM may use it when creating a temporary Lead shell.",
        "lastname": "Bind to the Contact's Last Name property; NexusCRM may use it when creating a temporary Lead shell.",
        "company": "Bind to the Contact's Company Name property; NexusCRM may use it when creating a temporary Lead shell.",
        "country_picklist__sfdc_": "Optional Contact property used to hydrate Lead.Country on the workflow-action shell path.",
        "hubspot_owner_id": "Optional Contact property used to route the workflow-action Lead shell through HubSpotOwnerBinding__c.",
        "jobtitle": "Optional Contact property used to hydrate Lead.Title on the workflow-action shell path.",
        "leadsource": "Optional Contact property used to hydrate Lead.LeadSource on the workflow-action shell path.",
        "lifecyclestage": "Optional Contact property used to hydrate Lead.Lifecycle_Stage__c on the workflow-action shell path.",
        "no__of_times_mql": "Optional Contact property used to hydrate Lead.No_of_Times_MQL__c on the workflow-action shell path.",
        "hs_lead_status": "Optional Contact property used to hydrate Lead.Status on the workflow-action shell path.",
        "salesforce_industry": "Optional Contact property used to hydrate Lead.Industry on the workflow-action shell path.",
        "recent_source": "Optional Contact property used to hydrate Lead.Recent_Source__c on the workflow-action shell path.",
        "recent_source_details": "Optional Contact property used to hydrate Lead.Recent_Source_Detail__c on the workflow-action shell path.",
        "lead_source_details": "Optional Contact property used to hydrate Lead.Lead_Source_Details__c on the workflow-action shell path."
      }
    }
  }
}
