Updating settings for eCommerce Bridge Application

Hello!

I have a public approved application in HubSpot marketplace (already with some customers).

I notice the SKU of the products were not syncing correctly and found some post about changing the internal settings mapping from ‘sku’ to ‘hs_sku’.

We I try to update the settings for my application I always get some sort of error (changes in every request).

My settings:

GET https://api.hubapi.com/extensions/ecomm/v2/settings?appId=MY_APP_ID&hapikey=DEV_API_KEY

{
 "enabled": true,
 "webhookUri": null,
 "mappings": {
 "CONTACT": {
 "properties": [
 {
 "externalPropertyName": "external_source_account_id",
 "hubspotPropertyName": "ip__sync_extension__external_source_account_id",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "firstname",
 "hubspotPropertyName": "firstname",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "familyname",
 "hubspotPropertyName": "lastname",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "external_source_app_id",
 "hubspotPropertyName": "ip__sync_extension__external_source_app_id",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "phone_number",
 "hubspotPropertyName": "mobilephone",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "customer_email",
 "hubspotPropertyName": "email",
 "dataType": "STRING"
 }
 ]
 },
 "DEAL": {
 "properties": [
 {
 "externalPropertyName": "external_source_account_id",
 "hubspotPropertyName": "ip__sync_extension__external_source_account_id",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "purchase_date",
 "hubspotPropertyName": "closedate",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "abandoned_cart_url",
 "hubspotPropertyName": "ip__ecomm_bridge__abandoned_cart_url",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "name",
 "hubspotPropertyName": "dealname",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "stage",
 "hubspotPropertyName": "dealstage",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "external_source_app_id",
 "hubspotPropertyName": "ip__sync_extension__external_source_app_id",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "amount",
 "hubspotPropertyName": "amount",
 "dataType": "NUMBER"
 },
 {
 "externalPropertyName": "order_number",
 "hubspotPropertyName": "ip__ecomm_bridge__order_number",
 "dataType": "STRING"
 }
 ]
 },
 "PRODUCT": {
 "properties": [
 {
 "externalPropertyName": "external_source_account_id",
 "hubspotPropertyName": "ip__sync_extension__external_source_account_id",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "price",
 "hubspotPropertyName": "price",
 "dataType": "NUMBER"
 },
 {
 "externalPropertyName": "product_description",
 "hubspotPropertyName": "description",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "image_url",
 "hubspotPropertyName": "ip__ecomm_bridge__image_url",
 "dataType": "AVATAR_IMAGE"
 },
 {
 "externalPropertyName": "external_source_app_id",
 "hubspotPropertyName": "ip__sync_extension__external_source_app_id",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "sku",
 "hubspotPropertyName": "sku",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "product_name",
 "hubspotPropertyName": "name",
 "dataType": "STRING"
 }
 ]
 },
 "LINE_ITEM": {
 "properties": [
 {
 "externalPropertyName": "external_source_account_id",
 "hubspotPropertyName": "ip__sync_extension__external_source_account_id",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "price",
 "hubspotPropertyName": "price",
 "dataType": "NUMBER"
 },
 {
 "externalPropertyName": "tax_amount",
 "hubspotPropertyName": "tax",
 "dataType": "NUMBER"
 },
 {
 "externalPropertyName": "external_source_app_id",
 "hubspotPropertyName": "ip__sync_extension__external_source_app_id",
 "dataType": "STRING"
 },
 {
 "externalPropertyName": "num_items",
 "hubspotPropertyName": "quantity",
 "dataType": "NUMBER"
 },
 {
 "externalPropertyName": "discount_amount",
 "hubspotPropertyName": "discount",
 "dataType": "NUMBER"
 }
 ]
 }
 }
}

I’m trying to change:

PUT https://api.hubapi.com/extensions/ecomm/v2/settings?appId=MY_APP_ID&hapikey=DEV_API_KEY

{
 "enabled": true,
 "webhookUri": null,
 "mappings": {
 "CONTACT": {
 // removed to make it shorter
 "PRODUCT": {
 "properties": [
 // removed to make it shorter
 {
 "externalPropertyName": "sku",
 "hubspotPropertyName": "hs_sku", <-- changed from 'sku' to 'hs_sku'
 "dataType": "STRING"
 }
 ]
 },
 "LINE_ITEM": {
 // removed to make it shorter
 }
 }
}

And the 400 response:

{
 "status": "error",
 "message": "|ObjectType: CONTACT| syncPreferences [PropertyRequest{propertyName=phone_number, dataType=STRING, targetHubspotProperty=mobilephone}, PropertyRequest{propertyName=ecomm_synced, dataType=STRING, targetHubspotProperty=ip__ecomm_bridge__ecomm_synced}, PropertyRequest{propertyName=external_source_account_id, dataType=STRING, targetHubspotProperty=ip__sync_extension__external_source_account_id}, PropertyRequest{propertyName=external_source_app_id, dataType=STRING, targetHubspotProperty=ip__sync_extension__external_source_app_id}, PropertyRequest{propertyName=firstname, dataType=STRING, targetHubspotProperty=firstname}, PropertyRequest{propertyName=source_app_id, dataType=STRING, targetHubspotProperty=ip__ecomm_bridge__source_app_id}, PropertyRequest{propertyName=source_store_id, dataType=STRING, targetHubspotProperty=ip__ecomm_bridge__source_store_id}, PropertyRequest{propertyName=customer_email, dataType=STRING, targetHubspotProperty=email}, PropertyRequest{propertyName=familyname, dataType=STRING, targetHubspotProperty=lastname}] must not define reserved propertyNames ([external_source_account_id, external_source_app_id]) or reserved targetHubspotProperties ([ip__sync_extension__external_source_account_id, ip__sync_extension__external_source_app_id])",
 "correlationId": "06c3bed4-bb80-4969-93c5-e27901aa2a91"
}

Am I doing something wrong? Is there something I can do to change it?

Thanks,

Hélder

@himanshurauthan , any advice here?

Thanks @dennisedson , still looking for a solution.

Figured it out!

Looks like I’m not suppose to send the

external_source_account_id

and

external_source_app_id

fields back to the server!

Thanks!