what is the maximum salesforce id length? I have to communicate it to another system that has to create an ad hoc field
Salesforce is using 18 character IDs.
There are also the shorter 15 char case-sensitive ones. Salesforce recommends the use of the longer one.
For more information see the official documentation on the topic: https://help.salesforce.com/articleView?id=000004383&language=en_US&type=1