APIs & Integrations

LEmmanuel
Member

Issue between Hubspot UI & API for data visualization purposes

SOLVE

Hello,

We are experiencing an issue with the Lead Status property. The status "Presentation" in the UI is showing as "BD Not Interested" in the API. We are using Powerbi as a data visualization tool and Fivetran as the connector. We have already contacted the fivetran support team who came back with the following assessment : The Fivetran connector uses Hubspot API v1 for the contact endpoint. Both Hubspot API's return the same value for the "hs_lead_status" property.

From the V3 request we can see "timestamp": "2023-04-24T16:34:56.804Z", for "value": "BD Not Interested". This is the same timestamp that is visible in the Hubspot UI screenshot (Timezone converted), indicating the UI is showing a different value than the API.

 

V1 Request: curl -X GET -H 'Accept: application/json' -H 'Authorization: Bearer ****' -A 'Jersey/2.39' 'https://api.hubapi.com/contacts/v1/contact/vid/4048472/profile'

 

V3 Request:

curl -X GET -H 'Accept: application/json' -H 'Authorization: Bearer ****' -A 'Jersey/2.39' 'https://api.hubapi.com/crm/v3/objects/contacts/4048472?properties=hs_lead_status&propertiesWithHisto...' > ~/Documents/Testing/v3_4048472.json  

 

V1 output :

"hs_lead_status": {
            "value": "BD Not Interested",
            "versions": [
                {
                    "value": "BD Not Interested",
                    "source-type": "CRM_UI",
                    "source-id": "userId:47301717",
                    "source-label": null,
                    "updated-by-user-id": 47301717,
                    "timestamp": 1682354096804,
                    "selected": false
                },
                {
                    "value": "BD Did Not Reach",
                    "source-type": "CRM_UI",
                    "source-id": "userId:47301717",
                    "source-label": null,
                    "updated-by-user-id": 47301717,
                    "timestamp": 1679600097455,
                    "selected": false
                },
                {
                    "value": "NEW",
                    "source-type": "IMPORT",
                    "source-id": "32152315",
                    "source-label": null,
                    "updated-by-user-id": 11278452,
                    "timestamp": 1675384224884,
                    "selected": false
                }
            ]
        }

 

V3 ouput : 

 

{
    "id": "4048472",
    "properties": {
        "createdate": "2023-02-03T00:30:24.884Z",
        "hs_lead_status": "BD Not Interested",
        "hs_object_id": "4048472",
        "lastmodifieddate": "2023-05-30T19:28:09.789Z"
    },
    "propertiesWithHistory": {
        "hs_lead_status": [
            {
                "value": "BD Not Interested",
                "timestamp": "2023-04-24T16:34:56.804Z",
                "sourceType": "CRM_UI",
                "sourceId": "userId:47301717",
                "updatedByUserId": 47301717
            },
            {
                "value": "BD Did Not Reach",
                "timestamp": "2023-03-23T19:34:57.455Z",
                "sourceType": "CRM_UI",
                "sourceId": "userId:47301717",
                "updatedByUserId": 47301717
            },
            {
                "value": "NEW",
                "timestamp": "2023-02-03T00:30:24.884Z",
                "sourceType": "IMPORT",
                "sourceId": "32152315",
                "updatedByUserId": 11278452
            }
        ]
    },
    "createdAt": "2023-02-03T00:30:24.884Z",
    "updatedAt": "2023-05-30T19:28:09.789Z",
    "archived": false
}

 

We would gladly appreciate your assistance with this issue. 

Thanks.

0 Upvotes
1 Accepted solution
Jaycee_Lewis
Solution
Community Manager
Community Manager

Issue between Hubspot UI & API for data visualization purposes

SOLVE

Hi, @LEmmanuel 👋 Welcome to our community! Thank you for including those details. 

 

It looks like you see a discrepancy between the lead status as seen in the HubSpot UI (“Presentation”) and the lead status being returned by the API (“BD Not Interested”). Is that correct? 

 

I have two requests to help the community better understand your issue:

  • Can you navigate in-app to Settings > Properties > Contacts > Lead Status, please? And grab a screenshot of the labels and internal values (not too zoomed in, please). Example from my test portal:
    CleanShot 2023-06-07 at 10.12.33.png
  • Make a request to the Properties endpoint for this property? GET/crm/v3/properties/{objectType}/{propertyName}
    Example request for the default values
    curl --request GET \
      --url 'https://api.hubapi.com/crm/v3/properties/contacts/hs_lead_status?archived=false' \
      --header 'authorization: Bearer YOUR_ACCESS_TOKEN'​
    Response:
    HTTP 200
    
    {
      "updatedAt": "2023-05-01T20:02:33.973Z",
      "createdAt": "2020-06-30T15:57:36.706Z",
      "name": "hs_lead_status",
      "label": "Lead Status",
      "type": "enumeration",
      "fieldType": "radio",
      "description": "The contact's sales, prospecting or outreach status",
      "groupName": "sales_properties",
      "options": [
        {
          "label": "New",
          "value": "NEW",
          "description": "",
          "displayOrder": 0,
          "hidden": false
        },
        {
          "label": "Open",
          "value": "OPEN",
          "description": "",
          "displayOrder": 1,
          "hidden": false
        },
        {
          "label": "In Progress",
          "value": "IN_PROGRESS",
          "description": "",
          "displayOrder": 2,
          "hidden": false
        },
        {
          "label": "Open Deal",
          "value": "OPEN_DEAL",
          "description": "",
          "displayOrder": 3,
          "hidden": false
        },
        {
          "label": "Unqualified",
          "value": "UNQUALIFIED",
          "description": "",
          "displayOrder": 4,
          "hidden": false
        },
        {
          "label": "Attempted to Contact",
          "value": "ATTEMPTED_TO_CONTACT",
          "description": "",
          "displayOrder": 5,
          "hidden": false
        },
        {
          "label": "Connected",
          "value": "CONNECTED",
          "description": "",
          "displayOrder": 6,
          "hidden": false
        },
        {
          "label": "Bad Timing",
          "value": "BAD_TIMING",
          "description": "",
          "displayOrder": 7,
          "hidden": false
        }
      ],
      "displayOrder": -1,
      "calculated": false,
      "externalOptions": false,
      "hasUniqueValue": false,
      "hidden": false,
      "hubspotDefined": true,
      "modificationMetadata": {
        "archivable": true,
        "readOnlyDefinition": true,
        "readOnlyOptions": false,
        "readOnlyValue": false
      },
      "formField": true
    }​

Context for requesting this info — Based on your description, it sounds like the discrepancy is coming from Label vs Internal Value. In-app and using the Properties API will show us both the label and the value. This is really the only way for the community to “see” how things are set up and not just make educated guesses. 

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

View solution in original post

0 Upvotes
1 Reply 1
Jaycee_Lewis
Solution
Community Manager
Community Manager

Issue between Hubspot UI & API for data visualization purposes

SOLVE

Hi, @LEmmanuel 👋 Welcome to our community! Thank you for including those details. 

 

It looks like you see a discrepancy between the lead status as seen in the HubSpot UI (“Presentation”) and the lead status being returned by the API (“BD Not Interested”). Is that correct? 

 

I have two requests to help the community better understand your issue:

  • Can you navigate in-app to Settings > Properties > Contacts > Lead Status, please? And grab a screenshot of the labels and internal values (not too zoomed in, please). Example from my test portal:
    CleanShot 2023-06-07 at 10.12.33.png
  • Make a request to the Properties endpoint for this property? GET/crm/v3/properties/{objectType}/{propertyName}
    Example request for the default values
    curl --request GET \
      --url 'https://api.hubapi.com/crm/v3/properties/contacts/hs_lead_status?archived=false' \
      --header 'authorization: Bearer YOUR_ACCESS_TOKEN'​
    Response:
    HTTP 200
    
    {
      "updatedAt": "2023-05-01T20:02:33.973Z",
      "createdAt": "2020-06-30T15:57:36.706Z",
      "name": "hs_lead_status",
      "label": "Lead Status",
      "type": "enumeration",
      "fieldType": "radio",
      "description": "The contact's sales, prospecting or outreach status",
      "groupName": "sales_properties",
      "options": [
        {
          "label": "New",
          "value": "NEW",
          "description": "",
          "displayOrder": 0,
          "hidden": false
        },
        {
          "label": "Open",
          "value": "OPEN",
          "description": "",
          "displayOrder": 1,
          "hidden": false
        },
        {
          "label": "In Progress",
          "value": "IN_PROGRESS",
          "description": "",
          "displayOrder": 2,
          "hidden": false
        },
        {
          "label": "Open Deal",
          "value": "OPEN_DEAL",
          "description": "",
          "displayOrder": 3,
          "hidden": false
        },
        {
          "label": "Unqualified",
          "value": "UNQUALIFIED",
          "description": "",
          "displayOrder": 4,
          "hidden": false
        },
        {
          "label": "Attempted to Contact",
          "value": "ATTEMPTED_TO_CONTACT",
          "description": "",
          "displayOrder": 5,
          "hidden": false
        },
        {
          "label": "Connected",
          "value": "CONNECTED",
          "description": "",
          "displayOrder": 6,
          "hidden": false
        },
        {
          "label": "Bad Timing",
          "value": "BAD_TIMING",
          "description": "",
          "displayOrder": 7,
          "hidden": false
        }
      ],
      "displayOrder": -1,
      "calculated": false,
      "externalOptions": false,
      "hasUniqueValue": false,
      "hidden": false,
      "hubspotDefined": true,
      "modificationMetadata": {
        "archivable": true,
        "readOnlyDefinition": true,
        "readOnlyOptions": false,
        "readOnlyValue": false
      },
      "formField": true
    }​

Context for requesting this info — Based on your description, it sounds like the discrepancy is coming from Label vs Internal Value. In-app and using the Properties API will show us both the label and the value. This is really the only way for the community to “see” how things are set up and not just make educated guesses. 

 

Thank you! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes