Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Estimated Arrival Date

Featured Replies

Trying to calculate the estimated arrival date of a shipment. 

I believe I am overcomplicating it

We ship same day before 3 pm otherwise, it ships on the next business day if it's Friday then Monday unless priority Saturday delivery is elected. 

Would like to make this more reliable.

Grateful for a better approach. 

 

Let ( [

id = Method  ;

shipOn = Case( status = 0 ; Get(CurrentDate) ; INVOICES::Invoice_Date) ;
w = DayOfWeek ( shipOn ) ;

cutoff = Case ( Hour ( Get(CurrentHostTimestamp )) > 15 and w = 6 ; 2 ; 0 )  


];

shipOn + cutoff + 

Case ( 

//3Day
id = 118 or id = 119; 3 + Case ( w ≥ 4 ; 2 ) ;

//2Day
id =  106 ; 2 + Case ( w ≥ 5 ; 2 ) ;

//Std Overnight
id =  116 ; 1 + Case ( w = 6 ; 1 ) ;

//Priority
id =  112 ; 1 + Case ( w = 6 ; 2 )  ;

//SaturdayPriority
id =  114 ; 1 

) 


)

 

I am not sure I follow your business rules. 

I think (!) it might be easier to calculate the target shipping date first, without considering the weekend. Then, if it falls on a weekend, delay it until Monday, unless it has a higher priority.

 

 

Edited by comment

  • Author

if the invoice is paid in full before 3pm we will ship same date M-F and

based on service add 3 day / 2 days / 1 day (morning or afternoon) / and today is Friday they can elect Saturday delivery. 

Anytime after 3pm we will ship it out the next day plus days in transit. But if it's after 3pm on Friday it won't ship until Monday, almost seems to need to be recorusive a bit? 

I am sorry, I missed the fact that the 1/2/3 days are days in transit, not days until shipment. Still, I think you should start with the day of shipment, then add the days in transit.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.