Ecommerce Bridge - Cannot change currency

Hi,

I am trying to sync ecommerce data into HubSpot using Ecommerce Bridge, but I have encountered an issue when I tried to change line item currency.

Here is a request which is used to add line item to the deal and set Norwegian Krone as a line item currency:

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

[{
		"integratorObjectId": "7657564",
		"action": "UPSERT",
		"changeOccurredTimestamp": "1558590167793",
		"propertyNameToValues": {
			"product_id": "9821",
			"order_id": "CO190522-00101",
			"price": 5000.0000,
			"quantity": 1,
			"amount": 1,
			"currency": "NOK"
		}
	}
]

Line item is added to the order, but message about missing product price is displayed:

Following currencies are set up in Account DefaultsCurrencies:

Following request is used to add product to product library:

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

[{
		"integratorObjectId": "9821",
		"action": "UPSERT",
		"changeOccurredTimestamp": "1558519314533",
		"propertyNameToValues": {
			"name": "9821",
			"price": 2923.0000,
			"price_nok": 5999.0,
			"price_dkk": 3443.0
		}
	}
]

I see that prices are updated correctly:

GET https://api.hubapi.com/crm-objects/v1/objects/products/28457235

{
 "objectType": "PRODUCT",
 "portalId": 5184830,
 "objectId": 28457235,
 "properties": {
 "hs_price_dkk": {
 "versions": [
 {
 "name": "hs_price_dkk",
 "value": "3343.0",
 "timestamp": 1558519314533,
 "source": "INTEGRATIONS_SYNC",
 "sourceVid": [],
 "requestId": "a26d26b0-3d0d-4c80-a0d1-ba6b284bdee2"
 }
 ],
 "value": "3343.0",
 "timestamp": 1558519314533,
 "source": "INTEGRATIONS_SYNC",
 "sourceId": null
 },
 "price": {
 "versions": [
 {
 "name": "price",
 "value": "2923.0000",
 "timestamp": 1558517542432,
 "source": "INTEGRATIONS_SYNC",
 "sourceVid": [],
 "requestId": "01b1dd0e-2c6c-4aca-b1fc-b971822262cd"
 }
 ],
 "value": "2923.0000",
 "timestamp": 1558517542432,
 "source": "INTEGRATIONS_SYNC",
 "sourceId": null
 },
 "name": {
 "versions": [
 {
 "name": "name",
 "value": "9821",
 "timestamp": 1558517542432,
 "source": "INTEGRATIONS_SYNC",
 "sourceVid": [],
 "requestId": "01b1dd0e-2c6c-4aca-b1fc-b971822262cd"
 }
 ],
 "value": "9821",
 "timestamp": 1558517542432,
 "source": "INTEGRATIONS_SYNC",
 "sourceId": null
 },
 "hs_price_nok": {
 "versions": [
 {
 "name": "hs_price_nok",
 "value": "5999.0",
 "timestamp": 1558517542432,
 "source": "INTEGRATIONS_SYNC",
 "sourceVid": [],
 "requestId": "01b1dd0e-2c6c-4aca-b1fc-b971822262cd"
 }
 ],
 "value": "5999.0",
 "timestamp": 1558517542432,
 "source": "INTEGRATIONS_SYNC",
 "sourceId": null
 }
 },
 "version": 7,
 "isDeleted": false
}

However Norwegian Krone and Danish Krone are missing on product page and I cannot use these currencies in line items:

Here you can find property mappings:

 "productSyncSettings": {
 "properties": [
 {
 "propertyName": "name",
 "dataType": "STRING",
 "targetHubspotProperty": "name"
 },
 {
 "propertyName": "price_nok",
 "dataType": "NUMBER",
 "targetHubspotProperty": "hs_price_nok"
 },
 {
 "propertyName": "price_dkk",
 "dataType": "NUMBER",
 "targetHubspotProperty": "hs_price_dkk"
 },
 {
 "propertyName": "price",
 "dataType": "NUMBER",
 "targetHubspotProperty": "price"
 }
 ]
 },
 "lineItemSyncSettings": {
 "properties": [
 {
 "propertyName": "currency",
 "dataType": "STRING",
 "targetHubspotProperty": "hs_line_item_currency_code"
 },
 {
 "propertyName": "product_id",
 "dataType": "STRING",
 "targetHubspotProperty": "hs_assoc__product_id"
 },
 {
 "propertyName": "amount",
 "dataType": "NUMBER",
 "targetHubspotProperty": "amount"
 },
 {
 "propertyName": "quantity",
 "dataType": "NUMBER",
 "targetHubspotProperty": "quantity"
 },
 {
 "propertyName": "order_id",
 "dataType": "STRING",
 "targetHubspotProperty": "hs_assoc__deal_id"
 },
 {
 "propertyName": "price",
 "dataType": "NUMBER",
 "targetHubspotProperty": "price"
 }
 ]
 },

I am able to create new product and set NOK and DKK using UI, but I can’t do it using Ecommerce Bridge.

I would be grateful if could help me with this issue and let me know if I am missing something.

Hi, @Zibi.

Sincere apologies for the delayed response. I’m happy to help.

Thank you for sharing all your troubleshooting steps; your description was crystal clear!

I’m still digging into this, but I suspect that NOK may not be a valid option for the line item property hs_line_item_currency_code.

Indeed, I’m not able to see what options are valid, as when I retrieve all line item properties using api.hubapi.com/properties/v2/line_item/properties, the options array for hs_line_item_currency_code is empty:

{
 "name": "hs_line_item_currency_code",
 "label": "Currency",
 "description": "Currency code for the line item.",
 "groupName": "lineiteminformation",
 "type": "enumeration",
 "fieldType": "select",
 "createdAt": null,
 "readOnlyDefinition": true,
 "updatedAt": null,
 "formField": false,
 "displayOrder": -1,
 "readOnlyValue": false,
 "hidden": false,
 "mutableDefinitionNotDeletable": true,
 "favorited": false,
 "favoritedOrder": -1,
 "calculated": false,
 "externalOptions": true,
 "displayMode": "current_value",
 "showCurrencySymbol": null,
 "createdUserId": null,
 "textDisplayHint": null,
 "hubspotDefined": true,
 "numberDisplayHint": null,
 "optionsAreMutable": null,
 "referencedObjectType": null,
 "isCustomizedDefault": false,
 "searchableInGlobalSearch": false,
 "currencyPropertyName": null,
 "hasUniqueValue": false,
 "deleted": null,
 "updatedUserId": null,
 "options": [ ]
 }

I am seeking insight on this from my team and will update you as soon as I have the next bit of information!
Thanks for your patience.

Hi, @IsaacTakushi.

Thank you so much for your response. I was wondering if you had any updates on this issue.

Regards,

Zibi

Hi, @Zibi.

Yes, I do!

After much testing, I have confirmed that a deal’s deal_currency_code and line item’s hs_line_item_currency_code values must match for the line items to display properly in the UI.

If they do not match, a “This product is missing a product price for your deal currency. Update a price for this product.” error appears. As such, deals cannot contain line items of different currencies.

In your case, NOK was a valid value for hs_line_item_currency_code — and it showed in the API data — but the UI could not reconcile the difference with the associated deal’s deal_currency_code., which wasUSD.

If you create a mapping for the deal property deal_currency_code and ensure that deals and line items have matching values, you should not see this issue.

Both deal_currency_code and hs_line_item_currency_code properties contain values that mirror the ISO 4217.

Please let me know if you have additional questions.

Thank you so much. It resolves the issue.

So glad to hear it, @Zibi!