Skip to content

How do I connect my online store to the ERP?

Connecting a store means telling the ERP where your e-commerce site is and which keys to log in with. Once connected, the ERP publishes your catalogue, keeps stock and prices up to date and brings in the orders that come through the website. Everything is done from Digital channels → Online store, in the Settings tab.

What can I expect from this connection today?

The ERP connects to three e-commerce platforms: PrestaShop, WooCommerce and Shopify. There is no connection with any other platform. The list on screen also includes a test option that doesn’t connect to any real store and is only there to try out the screen.

Try the connection out first against a test store, not against the one that is selling. It is the usual advice when linking two systems that move stock and prices: a badly set up publication is spotted straight away on a test bench and costs dearly in a store with customers inside. Check the first orders and the first publications calmly before leaving it to work on its own.

There is one more limit worth knowing before you start: in WooCommerce and Shopify, if the store is set up so that prices already include VAT, that case isn’t supported. It is explained further down, in What happens if my store prices already include VAT?. Item images are published.

What do I need before I start?

You need your online store’s address and its API keys. The keys are obtained in the store itself, not in the ERP: in PrestaShop it is a Webservice key, in WooCommerce a pair of API keys and in Shopify the Client ID and Client secret of the app you create in its Dev Dashboard (or the token of an old private app, if the store already had one).

You also need permission to add stores in the ERP. Creating a store and entering its keys is an add operation. Changing the settings of a store that already exists needs a lower permission. If you don’t have the permission, the screen tells you and the buttons are greyed out.

The store doesn’t need to be empty. If it already has products created, there is a prior linking step before publishing anything: it is explained in Link a store that already has products.

How do I add my store?

  1. Go to Digital channels → Online store and open the Settings tab. You will see the list of stores you already have.
  2. Click New store, at the top right. The new store’s record opens.
  3. Type the name you want to recognise it by in the Name field.
  4. Choose the platform in Platform. When you change it, the screen asks you for other keys.
  5. Type the store’s address in Store base URL. It is the root, for example https://tienda.cliente.com, without the API path: the ERP adds that.
  6. Fill in the keys in the API credentials section.
  7. Click Save.
  8. Click Test connection to check that the ERP really gets in.

The name and the address are required. The address has to start with http:// or https://. https:// is recommended: with http:// the keys travel unencrypted and the ERP warns you.

Which credentials does each platform ask for?

Each platform asks for its own and the screen only shows the ones that are needed. If a field doesn’t appear, it is because that platform doesn’t use it.

PlatformFields it asks for
PrestaShopWebservice key; optionally, FTP user and FTP password (only to publish textures)
WooCommerceConsumer key, Consumer secret, Webhook signing secret
ShopifyClient ID and Client secret of the Dev Dashboard app; Webhook signing secret (optional: without it the Client secret is used); Access token only for an old app

The test option in the list doesn’t ask for any: it doesn’t connect to any real store. If you choose it, the API credentials section tells you so instead of staying blank.

The keys are stored encrypted and are never shown, not even to whoever typed them. Under each box you will see its status: not set, ••• set or ••• new, not saved.

This has an important practical consequence. To keep a key that is already saved, leave its box empty. To replace it, type the new one over it. An empty box never deletes what was there, so you can save changes to other fields without fear of losing your keys.

How do I get the Shopify Client ID and Client secret?

They are the two keys the ERP uses to get into your Shopify store. They work like a username and a password, but made for one program to connect to another. You get them only once, and it takes about ten minutes.

Shopify gives them through an app: a small record you create in your Shopify account to say «this program can get into my store, and only for this». You don’t have to write any code or install anything on your computer.

Before you start, you need to sign in to Shopify with the store owner’s account, or with a staff account allowed to develop apps.

  1. In the Shopify admin, open Settings (bottom left) → Apps → App development, and click Develop apps in Dev Dashboard. Another Shopify page opens: the Dev Dashboard.
  2. Click Create app and give it a name you will recognise, for example «ERP». Your customers don’t see the name.
  3. Find the permissions section (Shopify calls them scopes). Copy this whole list and paste it as it is, with no spaces: read_products,write_products,read_inventory,write_inventory,read_locations,read_orders,write_orders,read_fulfillments,write_fulfillments,read_merchant_managed_fulfillment_orders,write_merchant_managed_fulfillment_orders,read_customers Each permission lets the ERP do one specific thing: publish products, set the stock, read orders, mark an order as shipped or read the buyer’s details. If one is missing, that part will fail later with a permissions error.
  4. Save the changes and release the version of the app.
  5. Install the app on your store. Shopify shows you the list of permissions and asks you to confirm.
  6. Open the app’s Settings. There you will see the Client ID and the Client secret. The secret is usually hidden: click the button to show it or copy it.
  7. In the ERP, on the store record, paste the Client ID into Client ID and the Client secret into Client secret. Click Save and then Test connection.

From here there is nothing else to do. The ERP uses these two keys to ask Shopify for an access pass that expires every day, and it asks for a new one on its own before it expires.

Treat the secret like a password: don’t send it by email or paste it into a chat. If someone has seen it where they shouldn’t, regenerate it in the Dev Dashboard and enter the new one in the ERP.

If you get a permissions error after saving, a permission from the list is usually missing. Add it to the app, release another version and install it on the store again.

How do I get the Shopify Access token?

You only need it if your store already had an older app of the kind that gave a fixed token, starting with shpat_. New stores don’t need it: they use the Client ID and Client secret, as explained above. Shopify no longer lets you create new apps of that older kind.

If you already have one, the token is in the Shopify admin, under Settings → Apps → App development → the older app → API credentials, in the Admin API access token section.

  1. Copy the token. It starts with shpat_.
  2. In the ERP, on the store record, paste it into Access token (older Shopify apps only).
  3. Click Save and then Test connection.

Shopify shows that token only once, when the app is installed. If you can no longer see it and didn’t save it, it can’t be recovered: the simplest thing is to create the new Dev Dashboard app and use the Client ID and Client secret.

The older app needs the same permissions as the new one. If the token is filled in, the ERP uses it and ignores the Client ID and Client secret. You can leave all three keys filled in without any problem.

How do I check that the connection works?

Click Test connection. The ERP makes a real call to the store and tells you whether it responded. If all goes well you will see a message like ‘Connection to “My store” (WooCommerce) successful: the API responded and returned 3 order(s) from the current cursor’.

The test uses the keys already saved, not the ones you have just typed. If you have something typed and not saved, the ERP tells you and doesn’t test: save first. If the store is new and you haven’t saved it yet, it can’t be tested either.

When it fails, the message gives the reason as the store returns it. An authorisation error points to the keys; a connection error points to the address or to the server not responding.

What is each sync switch for?

The Synchronisation section decides what work the ERP does on its own on that store. There are six independent switches.

SwitchWhat it does
Active storeIf it is turned off, the ERP stops working with that store completely
Automatic publishingThe full catalogue is published on its own, every so often
Sync stockKeeps the website stock up to date
Sync pricesKeeps the website prices up to date
Show out-of-stock itemsWhen on, a product with no units is still shown in the store, as sold out. When off, it is hidden when it runs out of units and shown again when it is restocked; this is checked on every stock sync. A product with sizes or colours is shown while it has any left
Recreate products deleted in the storeWhen off, which is how it comes out of the box, a product someone deletes from the store isn’t published again and shows in the Deleted in the store box on the record. When on, the ERP creates it again on the next publication. It is explained in Keep stock and prices up to date

Automatic publishing comes turned off out of the box and it is best to leave it that way at first. Publishing the whole catalogue against a live store is the heaviest operation and the one that changes the most. While it is off, the catalogue is only published when you click Publish changes.

Orders always come in, with no switch to control them. A connected store whose orders aren’t read isn’t connected to anything.

Which warehouses does the stock the store sees come from?

Below the intervals is Warehouses that count towards the website stock. Tick the warehouses whose stock you want to publish in that store, or leave All, which is how it comes out of the box. The sum of the ticked ones is published. It is explained in more detail in Keep stock and prices up to date.

Which Shopify location is stock written to?

Shopify keeps stock by location: a warehouse, a physical shop… If your store has more than one, below the warehouses you see Store location where stock is written.

  1. Press Read locations. The ERP asks Shopify which ones you have.
  2. Choose in the drop-down the location where you want the stock.
  3. Press Save.

If you don’t choose any, the ERP writes to the first active one. With several active and none chosen, a warning shows, because the stock could end up in the wrong one without anyone noticing. It also warns if the chosen location no longer exists in Shopify.

How often does the ERP work on my store?

Below the switches there are four intervals, in minutes: Orders (min), Stock (min), Prices (min) and Catalogue (min). Each one says how often that work is repeated.

Out of the box they are 5 minutes for orders, 15 for stock, 15 for prices and 60 for the catalogue. The minimum allowed is 1 minute.

These intervals are only kept if the store is active and already linked. A deactivated store, or one waiting to be linked, is never touched, even if it has intervals set.

What are the platform options?

Each platform has its own settings that don’t fit in a common form. They are edited in the … options section, which comes folded: click anywhere on its header to open it —the arrow on the right turns when it is open—. The help on screen tells you what each one accepts:

Shopify’s inventory location is the same setting you choose in Store location where stock is written. There is no need to type it here: choose it in the drop-down, as explained in Which Shopify location is stock written to?, and the ERP writes it into this text.

It is a technical text in JSON format. If you don’t understand it, don’t touch it: ask whoever is implementing the ERP. If you get the format wrong, the ERP tells you and doesn’t save the change.

The four sync intervals live inside that same text. That is why changing an interval above rewrites its line below: the two places never contradict each other.

What are size, colour and the other dimensions called in the store?

Each dimension of the item —up to three: for example model, colour and size— is published as an attribute (in Shopify, an option) of the product, in the same order as in the ERP:

The colour swatch goes to the attribute of the colours dimension. Shopify allows three options per product at most, which is also the maximum number of dimensions an item can have.

How does PrestaShop know which VAT to charge on each item?

The ERP sends the price excluding VAT, and PrestaShop applies the VAT of the product’s tax group. For each item to carry its VAT (21 %, 10 %, 4 %…), tell the ERP which group in your store corresponds to each percentage, in PrestaShop options:

{
  "IdTaxRulesGroupDefecto": 1,
  "TaxRulesGroupPorTipoIva": { "21": 1, "10": 2, "4": 3 }
}

The numbers on the right are the IDs of your store’s groups. You can see them in PrestaShop, in International → Taxes → Tax Rules.

Each item’s VAT is the same one the ERP uses when invoicing it: that of its VAT type or, if it doesn’t have one, the percentage on its record. An exempt item goes to PrestaShop’s ‘no tax’ group without having to set it up.

If an item has no VAT on its record, or has a percentage that isn’t in the list, it is created with the IdTaxRulesGroupDefecto group and the sync log warns about it. On a product that was already in the store, the group is only changed when the percentage is in the list: otherwise the one it has is kept.

What happens if my store prices already include VAT?

In WooCommerce and Shopify that case isn’t supported. The ERP stores its prices excluding VAT and publishes them as they are. If the store is set up to read those numbers as prices including taxes, it will undercharge your customers.

The ERP detects the situation and leaves a clearly visible warning in the sync log. In WooCommerce the warning says that the store declares ‘prices include tax’ and that it isn’t supported. In Shopify it says the same about the option for all prices to include taxes.

The solution, meanwhile, is to change the store’s tax settings so that prices are entered excluding taxes. That is how the ERP stores its own.

What happens with item images?

The ERP publishes each item’s image and each *web category*’s image together with the catalogue. Where each one comes from and how each platform receives it is explained in What happens with item images?, in the catalogue help.

The only thing set up here is for WooCommerce. In PrestaShop and Shopify there is nothing to set up. In WooCommerce, to upload files (not addresses) two optional details are needed in the store credentials: WordPress user and Application password (it is created in WordPress, in Users → Profile → Application Passwords). Without them, WooCommerce only accepts images by public address and the log leaves a warning saying exactly that.

What is the webhook for and how do I set it up?

Without doing anything, the ERP asks your store every few minutes whether new orders have come in. That is why an order can take a few minutes to show up.

The webhook is an automatic notice. As soon as someone buys, the store calls the ERP and tells it «an order has come in». The ERP fetches it right then, in less than a minute, without you clicking anything.

It is optional. Without a webhook everything works the same, only orders take a little longer to arrive. The webhook only brings orders: stock, prices and the catalogue keep their own pace.

For it to work, your ERP has to be on the internet, at an address the store can reach. If you use the ERP in the cloud, it already is.

It is set up in two places, and the details go in opposite directions:

In the ERP, everything is on the store record, in the Webhook (optional) box:

  1. Save the store, if it is new. Until it is saved it has no address yet.
  2. Click Generate token. If there was one already, the button says Regenerate token.
  3. The full address appears in Full URL — copy it now, it will not be shown again. Click Copy.
  4. Paste it into the store, in its webhooks section. For Shopify it is explained step by step just below.
  5. Copy the secret the store gives you and paste it into Webhook signing secret. Click Save.

The address is shown only once, because it has a password inside. Afterwards, under Endpoint for this store you will only see the beginning of the address and some dots (•••) instead of the password. If you lose it, click Regenerate token and paste the new address into the store again: the old one stops working.

How do I set up the webhook in Shopify, step by step?

Have the address you have just copied from the ERP to hand.

  1. In the Shopify admin, open Settings (bottom left) → Notifications.
  2. Scroll down to the end of the page and open Webhooks.
  3. Click + Webhook (or Create webhook) and fill in:
    • Event: Order creation.
    • Format: JSON.
    • URL: paste the ERP address, in full.
    • API version: leave the one shown.
  4. Click Save.
  5. Under the list of webhooks you will see a sentence like «Your webhooks will be signed with 2de4e9d1…». That long code is the signing secret. Copy it in full.
  6. In the ERP, paste it into Webhook signing secret and click Save.

Look at the number in the address right after /webhook/. It is the number of the store record in the ERP, and that record must have Active store switched on. If you switch it off, the notices arrive but the ERP ignores them.

There can’t be two records switched on pointing to the same store: every order would come in twice. If you try, the ERP won’t save and tells you which the other one is. You can keep a spare record, but switched off.

How do I know the webhook works?

Look at the Status box on the record. If it says Configured and Last notice shows a recent time, the notices are arriving. If it says Configured, but the store is switched off, switch on Active store: with the record switched off, the ERP doesn’t act on the notices.

To check it fully, or if the last notice is old, make a test purchase:

  1. Make a test purchase in your store, at a time when the ERP isn’t due to read orders on its own. To be sure, raise Orders (min) to 30 on the record for a moment.
  2. Don’t click Sync or Fetch now.
  3. Open the Orders tab and wait a minute. The new order should show up on its own.
  4. If it shows up, the webhook works. Put Orders (min) back as it was.

If it hasn’t shown up after a few minutes, check in this order:

Opening the webhook address in the browser does not test it: you get a «method not allowed» error, because that address only accepts the notices the store sends.

What happens if I change the store’s address?

If the record already has published products, when you press Save the ERP doesn’t save yet: it asks Is it the same store?

To have both stores at the same time, don’t change the address: add another record.

Can I have several stores?

Yes. A company can have several stores connected at the same time, even on different platforms.

The Settings tab opens on the list: one row per store, with its name and its address, the platform, whether it has Credentials set and whether it is Active or Inactive (with a not adopted warning when the link is missing). Click a row to open its record. The record has the store name at the top and, to its left, an ← arrow to go back to the list.

Each store has its keys, its switches, its intervals and its own sync log. They work separately and don’t get in each other’s way: two stores can sync at the same time.

On the right of the record you have, in this order: the Save and Test connection buttons, the Status summary and the Latest syncs.

Status tells you at a glance how the open store stands, with a coloured dot per line: whether the Store is Active or Inactive, whether Adoption is Adopted or Not adopted, whether Publishing is Automatic or Manual, and how the Webhook stands: No token, Configured, or Configured, but the store is switched off (the notices arrive, but the ERP ignores them). With the webhook set up there is also Last notice: how long ago the store’s last notice arrived, or None yet.

Latest syncs is that store’s log: a timeline with each run, from most recent to oldest, with how long ago it was, what it was for, how many entries went out, how many failed and how long it took. It is explained in full in What does the Latest syncs panel tell me?.

Which store does the ERP work with if I have several?

With the last one you opened. Opening a store selects it: when you click its row in the list, that store becomes the one the ERP works with until you open another, and it is the one already selected in the Orders tab —so that Fetch now and Convert pending are ready from the first moment—. Its row stays highlighted in the list, so you can tell at a glance which one it is.

There is nothing else to tick: there is no separate box to keep up to date. The first store you add is selected on its own, and the selection is kept from one session to the next.

Changing store doesn’t turn anything on or off. ‘Selected’ and Active store are different things: active says whether the ERP works with that store, and they can all be active at the same time; selected is simply which one you are working with now, and there is only one.

If you only have view permission, you can open any store to look at it, but the module’s selection doesn’t move: changing it needs edit permission.

How do I delete a store?

In the list, each row has a bin button on the right. When you click it the ERP doesn’t delete anything yet: first it counts what hangs from that store and tells you in the confirmation —‘128 orders received, 340 identity links and 52 sync records’—. Only if you answer Yes, delete is it deleted, and everything is deleted in one go.

Deleting a store is irreversible. It takes with it:

Two things are not deleted, and the confirmation reminds you when they apply:

Deleting needs the module’s highest permission, above the one for adding. If you only want to stop working with a store without losing its history, turn off its Active store switch instead of deleting it: the ERP leaves it alone and everything is kept.

If you delete the store you were working with, another one inherits the selection automatically —an active one, if there is any left—, so that the other tabs aren’t left without a store to open with.

If something goes wrong

What you seeWhat has happenedWhat to do
‘The store needs a name.’The Name field is emptyType a name and click Save again
‘The store needs its base URL (for example https://tienda.cliente.com).’The store address is missingType the store root in Store base URL
‘The base URL must be absolute and start with http:// or https://.’The address is incomplete or misspeltType it in full, with https:// in front
‘Save the store before testing: the test uses the saved credential.’The store is new and hasn’t been saved yetClick Save and then Test connection
‘There are unsaved credentials. Save first: the test uses the saved credentials.’You have typed new keys and haven’t saved themClick Save and test again
‘Could not connect to “…” (…): …’The store didn’t respond, or rejected the keysRead the sentence after the colon: it says what to check (the key, the address or the connection). The «Details» at the end is the technical reason, in case it has to go to support
‘The minimum frequency is 1 minute.’An interval of less than 1 has been enteredType 1 or more minutes
‘The advanced options must be a valid JSON object (for example {}).’The options text has a format errorCorrect it, or leave it empty to go back to the default values
‘The advanced options are not a valid JSON object: correct them first.’You are trying to change an interval with the options badly writtenFix the options text first
‘Save the store before generating its webhook token.’The token is requested for a store that hasn’t been savedClick Save and then Generate token
‘You do not have permission to add stores or enter their credentials.’The add permission is missingAsk whoever administers the ERP for that permission
‘You do not have permission to change the online store settings.’The edit permission is missingAsk whoever administers the ERP for that permission
‘The store no longer exists (did another user delete it?).’Someone else has deleted the store while you were editing itReload the screen and start again
‘No store is being edited.’A setting has been changed without any store openGo back to the list with the ← arrow and open one, or click New store
‘You do not have permission to delete stores.’The module’s highest permission is missingAsk whoever administers the ERP for it, or turn off Active store instead of deleting it
‘This store has payments inside bank remittances: deleting it would break that reconciliation…’A store payment is already in a bank remittanceDon’t delete it: switch off Active store and everything is kept
‘The store does not exist.’You are trying to delete a store someone else has already deletedClick Refresh in the list
‘You do not have permission to view the online store settings.’The view permission is missingAsk for access to the online store module
The token has been copied but the browser doesn’t copy the addressThe browser blocks the clipboardSelect the address in the field and copy it by hand
Testing the connection with Shopify gives a permissions errorThe Shopify app is missing a permissionAdd all the permissions in the list, release another version of the app and install it again
The webhook is Configured but orders don’t arrive on their ownThe record with that number is switched off, the address is old or the secret doesn’t matchGo through the list in «How do I know the webhook works?»
‘There is already another store switched on with this same address: ‘…’. If both are on, every order comes in twice…’You are trying to switch on a record that points to the same store as another switched-on oneSwitch off Active store on one of them
The webhook address can no longer be seenIt is shown only once, when it is generatedClick Regenerate token and paste the new address into the store

See also: Prepare the store catalogue · Link a store that already has products · Keep stock and prices up to date

More about Online shop