Back to connectors… Back to Other...

Shopify Integration Table - Last Run Date (7 replies)

Sue Herrmannn
6 years ago
Sue Herrmannn 6 years ago

I have a client who went live with their Shopify website last Monday - everything was going smoothly until this Sunday. An order was posted on the website where one of the items did not have a sku. Clearly this is a shopify website setup issue. But what's weird is that the Shopify Order Posting job in Iman runs hourly, and I received errors on that order every hour. It went ahead and posted the other orders it pulled down and but it kept sending emails with that order/error in it.

I'm confused because my understanding was that the Last Run Date in the Shopify Integration table, in Iman Setup, is supposed to determine which orders are pulled from Shopify. I was under the impression that the Last Run Date essentially says "only pull orders newer than this date/time". The Last Run Date says 2018-10-08 04:06:02Z.  Everything on this order that keeps trying to post says 2018-10-07T12:05:31-05:00Z. (See screenshot & attached csv)

I'm having the customer manually enter the order, so we can get past this error. (I've got the Sage 300 order posting event set to Insert Only - so this should work.) But I guess I need to better understand how this Last Run Date works. (i.e. what date is it looking at on the order, and why is this job still pulling stuff from the 7th, if the Last run date says the 8th... and both sets of date/times seem to be UTC...)

Because I'm quite sure we will have another posting error sometime in the future and I believe fully understanding how the date/time works will be vital in helping me to resolve or bypass the issue.

Thanks! 

https://www.realisable.co.uk/wp-content/uploads/2018/10/Shopify-Date-Time-Stamp.jpg
Sue Herrmannn
6 years ago
Sue Herrmannn 6 years ago

sorry - it wouldn't let me attach the csv. Let me try this again with xlsx...

Sue Herrmannn
6 years ago
Sue Herrmannn 6 years ago

Grrr... sorry - one more try as txt... embarrassing... 

Support
6 years ago
Support 6 years ago

Sue, there are a few things you probably want to do:

  1. Add a filter into your integration is at the very start of the integration (see screenshot) to stop duplicate orders from being posted.
    Lookup("SHOPORDS300", "SHOPORD", %id, False) <> ""

    Where the lookup being referenced is per the attached image. You will obviously need to map the id field to the SHOPORDID optional field (change the lookup and the lookup expression if you're recording this elsewhere.

  2. Once the duplicate filter is in place, you can rewind the last run date to a date/time prior to any failure. The integration will retrieve all these orders and only those which are not integrated will flow through into Sage.
https://www.realisable.co.uk/wp-content/uploads/2018/10/2-LookupSetup.png
https://www.realisable.co.uk/wp-content/uploads/2018/10/1-Filter.png
Sue Herrmannn
6 years ago
Sue Herrmannn 6 years ago

So my issue is not that it is trying to post orders that already exist. I have set my Sage connector to insert only - so any order that already exists is skipped.

 

My issue is that I may want to skip an order entirely from posting for whatever reason. My understanding is that the last run date is supposed to tell Shopify "only pull orders with a date/time stamp newer than the last run date", but it doesn't seem to be working that way. It's pulling orders at least 12 hours prior to the last run date. So can you please tell me the exact logic of the last run date (including what date/time it's looking at on the Shopify order), so I fully understand how it should work?

 

thanks! 

Support
6 years ago
Support 6 years ago

It's using UTC time.

Sue Herrmannn
6 years ago
Sue Herrmannn 6 years ago

Okay, sorry... I am clearly not communicating very well...

I understand that it is UTC time. In my first email I stated that all of the shopify date/time fields for that order were UTC 10/7/2018 and the "last run date" was 10/8/2018. Every time the job ran with a 10/8 last run date, it still pulled the 10/7 order.

I was told that the last run date limits the "read" from Shopify to all orders newer than the last run date. But it kept pulling a UTC 10/7 order. So does the last run date mean it's pulling newer orders plus the last 24 hours? The last 12 hours? How does the logic actually work - so that if I have an order blow up the job and I don't want that order to be pulled at all, I know how far in the future I have to set the run date. 

Thanks!

Sue Herrmannn
6 years ago
Sue Herrmannn 6 years ago

Sorry, James, I'm still out sick. but based on some error handling I built in the shopify job, I think I have figured this out. It looks like it pulls any orders within the last 20 hours. So, for example, we had an order come in that threw an error this weekend. The error was thrown each hour when the Iman job ran - from 10/13 16:15 until 10/14 12:15 - and then the errors stopped because the job stopped reading that order. 

So I think we can close this ticket. I just wanted to know how the last run date/time worked and it looks like it will pull orders newer than the last run date + the last 20 hours... So I'm good. thanks! 

Contact

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Request Demo

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Access Downloads

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close