# Ecommerce Bridge - Cannot change currency

**URL:** <https://community.hubspot.com/t/ecommerce-bridge-cannot-change-currency/14494>\
**Category:** APIs & Integrations\
**Created:** [May 23, 2019, 6:10am UTC](https://community.hubspot.com/t/ecommerce-bridge-cannot-change-currency/14494 "2019-05-23T06:10:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zibi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zibi/32/78108_2.png) [@Zibi](https://community.hubspot.com/u/Zibi)\
**Post date:** [May 23, 2019, 6:10am UTC](https://community.hubspot.com/t/ecommerce-bridge-cannot-change-currency/14494/1 "2019-05-23T06:10:09Z")

</div>

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](https://api.hubapi.com/extensions/ecomm/v1/sync-messages/LINE_ITEM)

```auto
[{
		"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:

 ![2019-05-23 07_44_48-Deal Line Item Editor.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/7/d72630007c84543ba3eb0e40fb930761e213e053.png)

Following currencies are set up in **Account Defaults** → **Currencies** :

 ![2019-05-23 07_51_25-Settings.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/e/2ee3404e42df0750a1e7fe66749c72eb579b1c74.png)

Following request is used to add product to product library:

PUT [https://api.hubapi.com/extensions/ecomm/v1/sync-messages/PRODUCT](https://api.hubapi.com/extensions/ecomm/v1/sync-messages/PRODUCT)

```auto
[{
		"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](https://api.hubapi.com/crm-objects/v1/objects/products/28457235)

```auto
{
 "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:

 ![2019-05-23 07_54_57-Settings.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/c/5c3de1e3d939dca0dc58d563f4f79ff68788e45d.png)

Here you can find property mappings:

```auto
 "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.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [May 30, 2019, 10:10pm UTC](https://community.hubspot.com/t/ecommerce-bridge-cannot-change-currency/14494/2 "2019-05-30T22:10:47Z")

</div>

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](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) using `api.hubapi.com/properties/v2/line_item/properties`, the `options` array for `hs_line_item_currency_code` is empty:

```auto
{
 "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.

---

<div class="post-metadata">

**Author:** ![Zibi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zibi/32/78108_2.png) [@Zibi](https://community.hubspot.com/u/Zibi)\
**Post date:** [June 5, 2019, 5:49am UTC](https://community.hubspot.com/t/ecommerce-bridge-cannot-change-currency/14494/3 "2019-06-05T05:49:10Z")

</div>

Hi, @IsaacTakushi.

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

Regards,

Zibi

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [June 5, 2019, 8:13pm UTC](https://community.hubspot.com/t/ecommerce-bridge-cannot-change-currency/14494/4 "2019-06-05T20:13:55Z")

</div>

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 was`USD`.

If you [create a mapping](https://developers.hubspot.com/docs/methods/ecommerce/upsert-settings) 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](https://en.wikipedia.org/wiki/ISO_4217).

Please let me know if you have additional questions.

---

<div class="post-metadata">

**Author:** ![Zibi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zibi/32/78108_2.png) [@Zibi](https://community.hubspot.com/u/Zibi)\
**Post date:** [June 6, 2019, 5:42am UTC](https://community.hubspot.com/t/ecommerce-bridge-cannot-change-currency/14494/5 "2019-06-06T05:42:22Z")

</div>

Thank you so much. It resolves the issue.

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [June 6, 2019, 12:44pm UTC](https://community.hubspot.com/t/ecommerce-bridge-cannot-change-currency/14494/6 "2019-06-06T12:44:27Z")

</div>

So glad to hear it, @Zibi!
