It shouldn't change, but why hardcode? I would put the OrgId in a custom setting, and read it from there. That way you can test in Sandboxes, work in Prod and, if it ever changes, it's 5 minutes to modify without any code "movement". **UPDATE** There are a few things you can do that do not involve hardcoding... hopefully one of them will work 1. To log into production you hit `login.salesforce.com`, sandbox is `test.salesforce.com`. Perhaps you can identify your environment because of that. 2. Alternatively, you can call a method in SFDC to return whether the org you're hitting is "Prod" or Sandbox". A simple SoQL query will return that: `select Id, IsSandbox from Organization limit 1`. See [here][1] for more details. [1]: http://salesforce.stackexchange.com/questions/50/can-we-determine-if-the-salesforce-instance-is-production-org-or-a-sandbox-org