APIs & Integrations

KGodi
Member

Unable to Post data for deals object in Hubspot

Hi am working on Integration in Mulesoft to write the data to Deals object in Hubspot
I'm pulling the data from Bullhorn and inserting the same data to Hubspot
am able to create the record in Hubspot but data was creating as empty (attaching the screenshot for reference)

Deals Screenshot.PNGdeals sample mapping.PNG).

Sample Deals mappings screenshot above.

am using the internal names in the attached doc for mapping purpose can you confirm whether they are correct or not.
if they are correct then why am unable to post the data but creating the record only
please help.

5 Replies 5
Tariqqq
Member

Unable to Post data for deals object in Hubspot


@KGodi wrote:

Hi am working on Integration in Mulesoft to write the data to Deals object in Hubspot
I'm pulling the data from Bullhorn and inserting the same data to Hubspot
am able to create the record in Hubspot but data was creating as empty (attaching the screenshot for reference)

Deals Screenshot.PNGdeals sample mapping.PNG).

Sample Deals mappings screenshot above.

am using the blaster party internal names in the attached doc for mapping purpose can you confirm whether they are correct or not.
if they are correct then why am unable to post the data but creating the record only
please help.


To verify this, navigate to HubSpot’s settings, go to Properties, select Deals, and check the internal names of each field. Alternatively, you can use HubSpot’s API to retrieve all deal properties and confirm the correct internal names.

In MuleSoft, ensure that each field from Bullhorn is mapped precisely to the corresponding HubSpot deal property. Even small errors in naming can prevent data from being inserted correctly. Additionally, enable logging within MuleSoft to inspect the API requests and responses, ensuring that the payload being sent to HubSpot matches the expected data structure. Reviewing the API responses can also help identify any errors or warnings that indicate what might be causing the issue.

0 Upvotes
KGodi
Member

Unable to Post data for deals object in Hubspot

Hello @Tariqqq ,

Thank you for responding.

 

Yes i have verified in Hubspot settings and identified the internal fields for Deals. And based on the fields i have done the mapping in the mulesoft.

If you can see in the above mapping screenshot. All the fields on the left were declared based on the internal fields declared in Hubspot Deals. And for the fields declared on the right they are representing the Bullhorn which we having data as i checked in the debug mode. But while inserting into Hubspot is not happening. Kindly please do help.



0 Upvotes
LeeBartelme
HubSpot Employee
HubSpot Employee

Unable to Post data for deals object in Hubspot

Is that your full payload?

My first hunch is properties should be in a properties objects so at minimum:

{
    "properties": {
        "amount": item.amount,
        "closedate": item.closedate...
    }
}

It appears what you are doing is this:

{
    "amount": item.amount,
    "closedate": item.closedate...
}



Also I think you should be assing both pipeline and stage. I'm unsure if stage is sufficient by itself.

The documentation has an example payload.

0 Upvotes
KGodi
Member

Unable to Post data for deals object in Hubspot

hello @LeeBartelme ,

 

Thanks for responding.

 

As suggested i have tried with below payload. I have received 400 Bad Request error message. Please find the details below.

 

Payload Used:

 

{
    "properties": {
        "amount": 5000.0000,
        "closedate": 1745985600000,
        "createdate": 1741752000000,
        "dealname": "Fiber Pull Walkthrough",
        "dealstage": "Engagement"
    }
}
 
400 bad Request Error Message:
 
{
    "status": "error",
    "message": "Property values were not valid: [{\"isValid\":false,\"message\":\"Engagement is not a valid pipeline stage ID. Valid options are: pipelineId=default : [appointmentscheduled, qualifiedtobuy, decisionmakerboughtin, contractsent, closedwon, closedlost], pipelineId=1073991 : [1073992, 1073993, 1073994, 1073995, 1078906, 1078907], pipelineId=685561147 : [1003857335, 1003857336, 1003857337, 1003857408, 1003857409, 1003857410, 1003857411, 1003857412, 1003857413, 1003857414], pipelineId=685533881 : [1003835206, 1003835207, 1003835208, 1003835209, 1003835210, 1003835211, 1003835212, 1003835213, 1003835214, 1003835215, 1003835216, 1003835217]\",\"error\":\"INVALID_OPTION\",\"name\":\"dealstage\",\"localizedErrorMessage\":\"Engagement is not a valid pipeline stage ID. Valid options are: pipelineId=default : [appointmentscheduled, qualifiedtobuy, decisionmakerboughtin, contractsent, closedwon, closedlost], pipelineId=1073991 : [1073992, 1073993, 1073994, 1073995, 1078906, 1078907], pipelineId=685561147 : [1003857335, 1003857336, 1003857337, 1003857408, 1003857409, 1003857410, 1003857411, 1003857412, 1003857413, 1003857414], pipelineId=685533881 : [1003835206, 1003835207, 1003835208, 1003835209, 1003835210, 1003835211, 1003835212, 1003835213, 1003835214, 1003835215, 1003835216, 1003835217]\",\"propertyValue\":\"Engagement\",\"portalId\":1629777}]",
    "correlationId": "332e4cc4-f1a8-4b95-a8da-78afca840d61",
    "errors": [
        {
            "message": "Engagement is not a valid pipeline stage ID. Valid options are: pipelineId=default : [appointmentscheduled, qualifiedtobuy, decisionmakerboughtin, contractsent, closedwon, closedlost], pipelineId=1073991 : [1073992, 1073993, 1073994, 1073995, 1078906, 1078907], pipelineId=685561147 : [1003857335, 1003857336, 1003857337, 1003857408, 1003857409, 1003857410, 1003857411, 1003857412, 1003857413, 1003857414], pipelineId=685533881 : [1003835206, 1003835207, 1003835208, 1003835209, 1003835210, 1003835211, 1003835212, 1003835213, 1003835214, 1003835215, 1003835216, 1003835217]",
            "code": "INVALID_OPTION",
            "context": {
                "propertyName": [
                    "dealstage"
                ]
            }
        }
    ],
    "category": "VALIDATION_ERROR"
}
 
Kindly, Please do share your inputs.
 
Thanks,
Karthik
 
0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Unable to Post data for deals object in Hubspot

Hey @KGodi 👋 Thanks for sharing the error message. Your payload looks to be using the “label” and not the “internal value”. Occasionally, the “internal value” is text, like `closedlost` or `closedwon`. But it's likely that `Engagement` is actually something like `1234567890`. You can read more about this here.

 

An easy way to find this info is in-app is to go to Settings > Objects > Deals > Pipelines and click on the </> icon next to the Deal or Pipeline name

CleanShot 2025-04-08 at 10.30.49@2x.png

  

You can also request this information from the Pipelines API. And one last thing to remember is that you need to send the pipeline (using the internal value) along with the deal stage because you have more than one pipeline (which we can see in the error message 😊)

 

Have fun building! — Jaycee


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes