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
TriCoopTriCoop 

Organization ID in a SOAP Request generated by SFDC

I have an outbound message set up to send a SOAP request to a web service that I have created.  In viewing the actual request there is an organization id that is sent:

 

<notifications xmlns="http://soap.sforce.com/2005/09/outbound">
   <OrganizationId>00DS00000007WwpMAE</OrganizationId>

 

I was hoping to use this id for identification purposes because I'll end up having multiple SFDC customers using this web service.  The problem, though, is that the id has "MAE" tacked onto the end.  Does anyone know whether this is a standard practice?  Is this possibly happening because I'm generating the request out of my sandbox?  I don't want to just remove the last 3 characters because I'm not certain what SFDC is going to do in either a live environment or with  different customers.

 

Thanks

Best Answer chosen by Admin (Salesforce Developers) 
kbromerkbromer

All salesforce IDs have a 15 digit case sensitive and an 18 digit case insensitive version.  

All Answers

kbromerkbromer

All salesforce IDs have a 15 digit case sensitive and an 18 digit case insensitive version.  

This was selected as the best answer
TriCoopTriCoop

If I look on the Company Profile under Setup I see that there's an Organization ID there:   00DS00000007Wwp

 

Is it safe for me to take the first 15 characters of the value of the <OrganiztionID> element in order to get this number?

 

Thanks

kbromerkbromer

AFAIK, yes, just know that they're case sensitive in that scenario.

 

TriCoopTriCoop

That's fine, just wanted to make sure that I could parse the value out to get the Organization ID that's listed on the Company Profile.

 

Thanks

dkadordkador

Just truncating the last three characters won't always work if you try to do an exact string comparison of the first 15 characters and the value in the company profile page under setup.  The salesforce API and its related features (outbound messaging being one of them) always return 18 character IDs, so I'd suggest using the entire 18 character ID.