When I send some sync messages to the API, the contact or deal is created/updated, but certain fields stay empty even if I'm sending what I believe are the correct properties. For example, I send this to the API:
I get a 204 No Content in reply, I check the sync status and it says no errors. I check the contact, and some fields are changed, but firstname, lastname and the address fields (address, city, state, zip, country) are still empty on the contact. I checked the object properties and mappings, and I think those are the correct properties, but they still don't work.
On the deal, dealtype and amount don't work. Again, I've checked all the things I could think of that I might be doing wrong, but it seems right and still doesn't work.
Can you post your property mappings? It sounds like mappings might be missing/misconfigured for some of those properties. On a cursory look, `firstname` and `lastname` are the internal property name of the default "First name" and "Last name" properties. However sending sync messages that include internal HubSpot property names directly isn't supported; you still need to create a mapping for those properties.
@Derek_Gervais That was a big part of the problem, thank you! I thought that the mappings were just for convenience, I didn't realize they were required. Once I added those, everything worked except for address, city, state, zip and country on the contact.
I tried changing the mappings to have the external name be different from the internal name, in case that was a problem, so I'm now sending something like this for the mapping above:
Apologies for the delay here. If you're seeing issues with specific properties, my guess is that there's some more information we can glean from the sync errors. Can you give me the Hub ID of the portal(s) you're working in, and some example contacts that you're seeing issues with? I'm happy to help dig into these.
I really appreciate your patience here. I dug into the logs we have on our end, as well as your account's sync settings and the status of the object in question. I'm not seeing any particular issue in your configuration, but I am noticing two things:
It looks like you're sending the value 'US' for the 'country' property, which is an enumeration, but the value you want is actually 'United States'. You can check out this sync error here: extensions/ecomm/v2/sync/status/stenhouse-test-store/CONTACT/nick.anderson@highlights.com
The last sync message for that specific contact was sent a few weeks ago; this isn't an issue in and of itself, but it does make it a bit harder to dig in on my end. Could you send another sync message (identical to the one above) and see if it works? If it does, awesome! If not, I'll have a much more recent example to investigate.
Again, I really appreciate your patience here, and I'm looking forward to getting to the bottom of this so that you can get up and running with the Ecommerce Bridge API!
@Derek_Gervais The country was the last piece! Changing the country from US to United States fixed all of the address fields. Thanks for working with me on this.
The thing that I don't understand is why I didn't see the sync error. I was checking the sync status at the url that you had in #1 before you mentioned it, and the errors array was empty. When you said you saw the sync error, I refreshed that same URL, and then I saw the sync error about the country. Any idea why I didn't see the error before and I do now?
I'm glad to hear it's up and running! Regarding the sync error; it's tough to say for certain, since the sync message (and the corresponding error) are pretty old. But the Ecommerce Bridge API is asynchronous, so it's possible that there was a delay between when the sync happened, and when it appears in the "Check sync status of an object" endpoint.
If you run into this issue again, please don't hesitate to post here again!
Hi @Mike_Eastwood, no I didn't try OAuth. The Ecommerce Bridge Overview page says that "Note: When developing a custom solution for an individual HubSpot account, the OAuth token can be omitted and the API key for that account should be used instead." I'm doing this for an individiual Hubspot account, so it seems that the HAPI key is the way to go. The developers.hubspot.com page also says that the HAPI key should be used for custom solutions for a specific business.
I might have to end up trying OAuth, but I don't want to make that the first option. Thanks for replying though!
@Mike_Eastwood I have a similiar tool, yeah. I get a 204 No Content response from the API, which seems to be what's expected. And then when I check the sync status of the object, it indicates that there are no errors. But when I look at the First Name and Last Name fields on the contact, there's nothing there.