Comment on page
In order to enable ERPAG users to sell through the Square service, ERPAG enabled the connection between these two services using the API (Application Programming Interface).
By connecting ERPAG and Square, the user gets the following benefits:
- 1.Complete Inventory Management (Sales, Procurement, Stock Status, Production, Ordering, Packaging and Shipping) on the ERPAG page
- 2.ONLINE and POS sales from Square
- 3.Updating items in Square (sending from ERPAG)
- 4.Updating quantities (stock) in Square (sending from ERPAG)
- 5.Update items in ERPAG (download from Square)
- 6.Download Sales Order from Square in ERPAG
In the synchronization process, ERPAG relies solely on the SKU. So, if you already have articles defined in Square, make sure each product and its variation have a unique SKU.
The first step for successful linking is to create a private application in Square and download Personal Access Tokens. In the browser, go to https://squareup.com and log in using your Square account. Then click on the "Apps" link as shown in the picture.
Enter the name of the Application (e.g. ERPAG) and click the Create Application button.
When Square creates your private application, it will automatically generate a Personal Access Token. Save Personal Access Token data because you will need it to enter ERPAG.
Scroll down to the bottom and in the API Version section, select version 2019-06-12. In the moment of writing this text, this is the latest version, however, if there is a newer version, select the specified ERPAG to use the API correctly. If necessary, save your changes by clicking the Save button.
In order for ERPAG to communicate with your Square Store, you need to enter the previously acquired Personal Access Token in ERPAG. Log into ERPAG using your ERPAG account and activate the "Web Shops" option from the "Sales" menu.
The next step is to open a new Web Store.
In the following form, besides entering the Square Personal Access Token, the setting of the synchronization mode is also made. How data synchronization will take place depends on your business process and varies from case to case. That's why we will explain each option in detail and you will decide for yourself which model suits you best.
In the case that the SKU exists in Square and does not exist in ERPAG, ERPAG will download and create a new Product in the Product and Services list
The Warehouse field will only appear if more than one warehouse is defined in ERPAG. Choose the default warehouse.
In the Description field, enter the name of your Shop. This name will later be shown through the synchronization process, and you will know which Square account you are synchronizing with.
In the Synchronized field, enter the starting date and time from which ERPAG will begin to download Sales Orders. Later, at each synchronization, ERPAG will correct this information to the date when the last Sales Order was taken over.
In the Status field, you can turn on or temporarily turn off sync from Square.
In the Update qty to webshop box, select whether you want ERPAG to update the inventory status in your shop.
Enter the Personal Access Token and then press the VERIFY button to verify that the API data is entered correctly. When connecting to your Square, ERPAG will check whether you have entered the correct Personal Access Token.
At the beginning of this text, we said that ERPAG synchronizes with Square by searching products based on their SKU. When the SKUs are different, the following processes will be performed:
- In the case that the SKU exists in Square and does not exist in ERPAG, ERPAG will download and create a new Product in the Product and Services list
- In the case that the SKU exists in ERPAG and does not exist in Square, ERPAG will create a new product in your Square
Conflict resolver is essential in the situation where identical SKUs are found on both sides.
In the Product field, you can choose which side will win, or which data will be valid:
- ERPAG win - means that the product found in ERPAG will be considered valid and the product in Square will be overwritten with the one in ERPAG
- Webshop win - means that the product in Square will be considered valid and the product in ERPAG will be overwritten with the one in Square
In the Price field, you can choose which side will win as far as the selling price is concerned:
- ERPAG win - means that the selling price for the product found in ERPAG will be considered valid and the selling price for the same product in Square will be overwritten with the price from ERPAG
- Webshop win - means that the selling price for the product in Square will be considered valid and the selling price for the same product in ERPAG will be overwritten with the price from Square
This panel will display all of your locations in Square, and you will be able to define the relationships between each single location in Square and the warehouses in ERPAG.
By defining these relations, ERPAG will, when downloading Sales Order, create documents in the appropriate ERPAG warehouse, which means that all your sales from any Square location will be transferred to ERPAG in an exactly-defined warehouse. Also, if you have defined that ERPAG updates the amount of inventory, it will be in line with the location in Square.
When you have completed all of the necessary settings (in the same way as the Shop specifically needs), you need to click on the SAVE button to record the changes.
ERPAG allows you to create and select the products you want to synchronize with your Square Store. Creating products in ERPAG is already described in the following link: https://learn.erpag.com/project/create-new-product-1/untitled-4/basic-definition and in this manual we will only show details related to Square. So, go to the Products and Services list and activate the product you want to synchronize with your Square Store.
From the dropdown list, select the web shop with which you want to synchronize (if needed, you can also select multiple web shops).
By choosing one or more web shops, a special panel for each web shop will appear on the form.
In this panel, you can define all parameters necessary for sending items to Square. ERPAG will offer you some default values, but you can correct them at any time. The only information you cannot select is SKU. This information must be identical on both sides so that the synchronization process can function at all.
Thus, Description, Category (in the ERPAG product category) and Selling price may be different from the ones defined in ERPAG.
When the setting is complete, record the changes by pressing the Save button.
Once you've set up all the items you want to sync, you can synchronize the same data with your Square Store. From the Product and Services list, click the Web Shops button and then the store with which you want to synchronize the data. Please note that ERPAG will synchronize all products that are defined for synchronization, not just those that you just entered or selected in the list.
The synchronization process takes place as follows:
1) ERPAG reads the product list you have in your web shop;
2) Comparison of items from Square list and ERPAG list based on SKU is performed:
a. In case that Square has an SKU that does not exist in ERPAG, a new article is inserted into ERPAG;
b. In case there is an SKU in ERPAG that does not exist in Square, a new item is added to Square;
c. In case there is a product with identical SKU on both sides, comparison of other data (name, price, properties, etc.) is made.
- i. If the data is identical, no synchronization is performed,
- ii. If the data are not identical, the correction of the data is done based on the Conflict Resolver
So, in the event that ERPAG determines during data synchronization that data needs to be updated using Conflict resolver, you need to know the following:
1) If ERPAG wins - the data in Square will be corrected according to the information defined in ERPAG,
2) If the Webshop wins - the data in ERPAG will be corrected according to the information defined in Square.
Also, ERPAG will adjust the price of products according to the configuration in the Conflict resolver:
1) If ERPAG wins - the price in Square will be adjusted in accordance with the price defined in ERPAG,
2) If the Webshop wins - the price in ERPAG will be adjusted in accordance with the price defined in Square.
In addition to the above operations, ERPAG performs other parameters of a particular product, such as Product category, Product with variations, Variant names. In case it is needed (on the Square page or on the ERPAG page), ERPAG will automatically create or correct the data in accordance with the Conflict resolver.
After the synchronization is complete, refresh the list of products in the Square where synchronized data will appear.
Orders created in Square with Open and Completed statuses can be downloaded into ERPAG while other Orders, i.e. Orders with Canceled status are not downloaded. ERPAG will not download the Orders automatically, you need to log into ERPAG, activate the Sales menu and then select Sales Orders. Now from the Sales Order list, click the Synchronization button and select the web shop.
The process of synchronizing and downloading Sales Order runs as follows:
1) ERPAG downloads a list of all Square Orders created after the last synchronization date (reading the Synchronized date in the Setup Webshop);
2) Performs a check of products found in Square Orders and, if necessary, synchronizes products with ERPAG;
3) Performs a customer check (by name) and if they do not exist, creates them in ERPAG;
4) Creates Sales Order in ERPAG and loads products with quantities and prices as they are in Square Order regardless of prices found in ERPAG.
In the case that the Orders created in Square do not have customer information (name, address, etc.), ERPAG will create a Sales Order where it will write Point of Sale in the name of the customer.
In the case that there are Orders in Square containing items that you have deleted in the meantime from the Square Items list, ERPAG will create a Sales Order with a Draft status because it is unable to determine the exact contents of the Order. In this case, you need to activate the Sales Order and correct the content yourself, or to enter the correct products that should be in the Sales Order.