Ecommerce bridge how to resolve errors

Hi,

I would like to know how I can resolve synchronization errors. Right now we use ecommerce bridge sync messages to synchronize data to HubSpot.

For instance I try to sync contact with invalid email:

PUT https://api.hubapi.com/extensions/ecomm/v1/sync-messages/contact

[{
		"integratorObjectId": "test-contact",
		"action": "UPSERT",
		"changeOccurredTimestamp": "1559734419277",
		"propertyNameToValues": {
			"firstname": "Tom Doe",
			"lastname": "Tom Doe",
			"city": "London",
			"postalcode": "3456",
			"address": "Lubicz 32",
			"country": "UK",
			"email": "aa@aaa"
		}
	}
]

Then I check if there is any synchronization errors and following data is returned :

GET https://api.hubapi.com/extensions/ecomm/v2/sync/status/default/CONTACT/test-contact

{
 "storeId": "default",
 "objectType": "CONTACT",
 "externalObjectId": "test-contact",
 "hubspotId": 3851,
 "lastProcessedAt": 1559752161704,
 "errors": [
 {
 "portalId": 5940484,
 "storeId": "default",
 "objectType": "CONTACT",
 "externalObjectId": "test-contact",
 "changedAt": 1559751507058,
 "erroredAt": 1559751530198,
 "type": "INVALID_EMAIL_ADDRESS",
 "details": "Email address SyncHadoopHubspotPropertyValue{hubspotPropertyName=email, propertyValue=aaa@aaa, timestamp=1559751507058} is not valid",
 "status": "OPEN"
 }
 ]
}

I see that email is incorrect, so I resend contact with fixed email property.

PUT https://api.hubapi.com/extensions/ecomm/v1/sync-messages/contact

[{
		"integratorObjectId": "test-contact",
		"action": "UPSERT",
		"changeOccurredTimestamp": "1559734419277",
		"propertyNameToValues": {
			"firstname": "Tom Doe",
			"lastname": "Tom Doe",
			"city": "London",
			"postalcode": "3456",
			"address": "Lubicz 32",
			"country": "UK",
			"email": "aa@aaa.com"
		}
	}
]

When I try to check sync status for updated contact, error is still returned (however contact has been sucessfully synchronized and I see it in UI)

{
 "storeId": "default",
 "objectType": "CONTACT",
 "externalObjectId": "test-contact",
 "hubspotId": 3851,
 "lastProcessedAt": 1559752161704,
 "errors": [
 {
 "portalId": 5940484,
 "storeId": "default",
 "objectType": "CONTACT",
 "externalObjectId": "test-contact",
 "changedAt": 1559751507058,
 "erroredAt": 1559751530198,
 "type": "INVALID_EMAIL_ADDRESS",
 "details": "Email address SyncHadoopHubspotPropertyValue{hubspotPropertyName=email, propertyValue=aaa@aaa, timestamp=1559751507058} is not valid",
 "status": "OPEN"
 }
 ]
}

I wonder why status is not set to resolved or errors array is not removed after successful synchronization. Is there any way to check if specific synchronization request has been processed successfully?

I found following post: https://community.hubspot.com/t5/APIs-Integrations/Best-practice-to-resolve-Ecomm-sync-errors/m-p/262332
It seems there is no way to clear sync errors. Is there any way to set status of the error to RESOLVED?

Regards,

Zibi

Hi, @Zibi.

Thanks for another detailed post.

It’s not possible to directly set a sync error asRESOLVED, but according to both the v1 and v2 Get all sync errors for an app articles:

"A successful sync for a given externalObjectId will mark the error as RESOLVED."

From your description, it sounds like you are using the Check the sync status of an object endpoint. I’m curious — do you get the same results from the Get all sync errors for an app endpoint, or does it show the object asRESOLVED? (If you don’t use an OAuth app, then use this endpoint for your production account.)