Exchange Rates
A customer pays in euros at a Swedish till. How many kronor is that? Exchange Rates keeps the answer ready for every store: the exchange rates each store uses, for sales, for purchases and between the company's own businesses. When a store's rates change, Exchange Rates tells the other Hii Retail services.
The rates come from three places. The customer's ERP system usually sends them through the Exchange Rates API. Exchange Rates can also import them from the European Central Bank (ECB) every night. And a person can set a rate by hand in the Configuration Portal. A rate can be set for the whole company, for a group of stores or for one store, and every store below that level uses it.
What it handles
| Area | What Exchange Rates does |
|---|---|
| Exchange rates | A rate between two currencies, such as 1 EUR = 11.3205 SEK, of one of three types: sales, purchase or intercompany. |
| Which rates each store uses | Rates set for the whole company, a group of stores or one store. A store uses everything set above it, and a rate of its own wins. |
| The ECB import | Switched on for the whole company, a group or a store. Every night it fetches the ECB's reference rates for the currencies those stores take, and keeps them up to date. |
| Markup | A percentage that gives the store a margin on a foreign currency, set in Hii InStore. Other services receive the rate both with and without it. |
| Telling other services | When a store's rates change, Exchange Rates sends a message for that store, in the same format as the service it replaced. |
Who does what
- The customer's ERP is usually in charge. It calls the Exchange Rates API to set or delete a rate for the whole company or for one store, and it can read back the rates each store uses. See Exchange Rates API.
- The ECB import keeps the sales rates up to date without anyone typing them. It is switched on per level and builds its rates from the currencies the stores take in Currency. See Importing rates from the European Central Bank.
- The Configuration Portal is for rates set by hand, for rates on a group of stores, and for switching the ECB import on and off. Hii InStore is where the markup is set. See Exchange rates in the Configuration Portal and Hii InStore.
- Hii Retail services and apps either receive Exchange Rates' messages or ask the API. They never have to work out the company tree themselves: every message and every answer is already about one store. See Messages to other services.
The rates themselves are kept in Hii Retail's Customer Controlled Configuration (CCC), because CCC already knows the company tree and works out what each store inherits. You do not use CCC directly for exchange rates. The API, the ECB import and the Configuration Portal write to it for you.
Exchange Rates and Currency
Exchange Rates works together with Currency. Currency decides which currencies a store takes and which of them is its default currency, the store's home currency. Exchange Rates decides what those currencies are worth. The ECB import reads both from Currency: it fetches rates only for the currencies the stores take, and it prices each of them against the home currency.
Moving from Currency & Exchange Rates
Exchange Rates replaces the exchange-rate part of the deprecated Currency & Exchange Rates service, and Currency
replaces the currency part. Exchange Rates publishes on the same topic, cer.public.event.rates-changed.v1, in the
same message format, one message per store. The Hii Retail services that already subscribe, such as Store Data,
change nothing when a customer moves over.
What is new for the customer is that rates follow the company tree, the nightly ECB import, and markup. Exchange Rates works out the company tree before it publishes, so subscribers still receive one message per store.
An ERP that called the Currency & Exchange Rates API calls the Exchange Rates API instead. Extenda can copy the customer's existing rates across when the customer moves.
If you want to…
| If you want to… | read |
|---|---|
| understand what a rate is, how to read it, the three types and markup | Rates, types and markup |
| understand which rates a store uses, and what deleting one does | Which rates a store uses |
| keep the sales rates up to date from the European Central Bank | Importing rates from the European Central Bank |
| set a rate by hand, switch the import on or off, or set a markup | Exchange rates in the Configuration Portal and Hii InStore |
| connect your ERP system | Exchange Rates API |
| receive the changes in a Hii Retail service | Messages to other services |