function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kunal Purohit 4Kunal Purohit 4 

How to update Time Zone based on ZipCode provided by User? What approach should I use?

Hello Folk,
How to update Time Zone based on ZipCode provided by User? What approach should I use? Trigger or Flow? Should I need REST API for for same? Please suggest.
Best Answer chosen by Kunal Purohit 4
SubratSubrat (Salesforce Developers) 
Hello Kunal ,

Requesting you to follow this article which is machting with your requirement -> https://salesforcecodex.com/salesforce/zip-code-to-time-zone-using-zipcodeapi-in-salesforce/

If it helps please mark this as best Answer.
Thank you.

All Answers

Helen BarrowHelen Barrow
There are a few ways you could approach updating the time zone based on a zip code provided by the user. One option would be to use a flow in your application that allows the user to input their zip code, and then uses that information to look up the corresponding time zone. Another option would be to use a trigger, such as a button or form submission, to initiate the process of looking up the time zone based on the zip code.
You would need an API to get the timezone based on zip code, you could use a public API like openweathermap.org, or you could use a paid service like zipcodeapi.com.
You would need to use REST API for the same, which can take input as zipcode and return the timezone as output.
https://www.optonline.ltd/
SubratSubrat (Salesforce Developers) 
Hello Kunal ,

Requesting you to follow this article which is machting with your requirement -> https://salesforcecodex.com/salesforce/zip-code-to-time-zone-using-zipcodeapi-in-salesforce/

If it helps please mark this as best Answer.
Thank you.
This was selected as the best answer