I am getting duplicate orders imported. How can I avoid this please?
Also, a record was rejected because of the shipto address. Is there a way to bypass the validation so that it never fails for this reason?
Could you please describe the issue in more details?
Does the package create the records with the same Id's? Could you please provide the screenshot or an example of the duplicated records?
Regarding the shipto address, could you please also share the error message of the rejected record?
We look forward to your reply
The duplicate orders have different ids. Please see the screenshots from Shipstation and SQL. I'm surprised that the Orders table doesn't have the ordernumber as a primary key and that the api command permitted the same order number to be inserted multiple times. I decided to modify the task and return the order_id to my SQL table. Now my import package excludes orders that have order_ids. I don't know if that is best practice for avoiding duplication. But it works. Can you please confirm that this is the correct method?
For the shipto addresses that failed, the shipto street 1 values were empty and the shipto street 2 is where the address line was entered. That is how these addresses were created in our ERP which has no address validation. The error message from Skyvia reads 'Invalid shipTo address' (please see 3rd screenshot below). So my question is, do I need to validate and correct the data coming from my ERP, or is there a way to for the api to do the correction?
According to Shipstation documentation the OrderId is a unique id assigned to the order by ShipStation API. A user-defined order number used to identify an order. Order number is a user-defined field used to identify an order. It may be if the order is split to several shipments for example.
The returning setting works in this case, because it returns the auto-generated Id to the source and after that the record won’t be processed again.
You can also try to use the Upsert operation. The Upsert operation updates a record if it exists or inserts a new record. This allows you to avoid inserting duplicate data. You need to map the target ID/Primary key columns for performing Upsert.
Please find more information about Upsert here
Regarding the invalid address, as we can see ShipToStreet1 is the required field and ShipToStreet2 is not. If no value comes to the required field, it returns error.
You can use expression mapping to get the value for this field from both fields, for example: ISNULL(Customer_Address1) ? ShipToStreet2 : ShipToStreet1 Please inform us if it works for you.