Jump to content

A Question About Production Flow


Colbytech

Recommended Posts

New to the forum, hello everyone.
 

I've ordered a 2020 F-150 and I've dug around the Internet and found the link to the API.  I've got my VIN, pulled down the JSON file and I've been watching that because I don't want to my poor sales guy crazy.  However, I've hit a status that he didn't know, and more searching led me here.

 

The status is "Released to Body Company".  Now, all the searches on this forum tend to be in the Vehicle Tracking section, and from what I have read, that infers that the truck has been sent somewhere (an upfitter, but I can't find an explanation for that term if it is an internal group or an external firm) for some additional work, or something like that. The only custom thing that I think is getting done is the spray-in bedliner, other than that it's a pretty standard order I thought.

 

Is it as straightforward as that?

 

Cheers

Edited by Colbytech
Link to comment
Share on other sites

  • 2 weeks later...

So, my boredom has gotten the better of me (I'm currently recovering from some surgery), so I leveraged the AEMServices API, a bit of PowerShell and a scheduled task to send myself emails on how my truck is moving down the line...

 

Here's the script I used (I used Outlook.com as the sening email because it's simple.  If you don't use Outlook.com, you can either create a throwaway email in there, or change things to fit what you want):

 

$To = "RecipientEmail@SomeDomain.com" #change this to the email address that you want the email to go to
$From = "SenderEmail@outlook.com" #change this to the email address of the email account you are using to send the email
$SMTPServer = "smtp.live.com" #this is the Outlook.com SMTP server. Change this if using another provider
$Credential = Import-CliXml -Path "${env:\userprofile}\user.Cred" #this pulls in the stored credentials for the sending account (this may be why you want to use a throwaway account).  Create the credential by running the following commands - $Credential = Get-Credential and then $Credential | Export-CliXml -Path "${env:\userprofile}\user.Cred"

$request = "https://shop.ford.com/aemservices/shop/vot/api/customerorder/?partAttributes=BP2_.*&vin=XXXXXXXXXX" #put your VIN here
$jsonresult = Invoke-WebRequest $request
$data = $jsonresult | ConvertFrom-json
$emailbody = "<h2>Here's the latest status of the truck!</h2><br><br>"
$emailbody += "Truck Info: $($data.year) $($data.Make) $($data.Model) $($data.Trim)<br>"
$emailbody += "Vin is $($data.VIN)<br><br>"
$emailbody += "Order Date: $($data.receiptDate)<br>"
$emailbody += "Build Date: $($data.productiondate) - Happy Birthday<br>"
$emailbody += "Ship Date: $($data.shipmentDate)<br><br>"
$emailbody += "Estimated days in transit: $($data.transitDate)<br>"
$emailbody += "ETA Date: $($data.etaEndDate)<br><br><br>"
$emailbody += "Delivered to Dealer Date: $($data.finalDeliveredDate)<br><br>"
$emailbody += "Current Phase:<b> $($data.primaryStatus)</b><br>"
$emailbody += "Current Status: <b>$($data.Status)</b>"


Send-MailMessage -To $To -From $From -Subject "Truck Status is currently $($data.PrimaryStatus) - $($data.Status) as of $(Get-Date)" -BodyAsHTML -Body ($emailbody | Out-String) -SmtpServer $SMTPServer -Port "587" -UseSSL -Credential $credential
 

I then set up a scheduled task to query every 12 hours (which is probably less often than I was refreshing my browser, and I get the email in my inbox.  This is what it looks like (and the latest I received - woohoo):

 

image.png.55ec3b9e0b1a10325c0c44c45bb54f28.png

 

Not sure if this is of interest to anyone.  Thanks to everyone who was patient and answered my questions.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...