I'm currently using the Salesforce REST API to send data from our client app to our users' Salesforce accounts. While some of our data fits into the stock fields of a Lead object, we will also require custom fields to add more unique data points.
While I've read that it is only possible to add custom fields via the Metadata API, I have yet to see any good examples - or even a simple explanation of what an API request should look like. The closest I've come to an explanation is the answer to this question, however it points to Apex code and not a generic set of instructions of how to add custom fields to standard objects via the Metadata API.
This leads me to ask two questions:
- Is this even possible? Can I add custom fields to standard Lead objects on behalf of our users?
- What's the best way to do this? I read a lot about the WSDL, but I'm not sure how to use that or the Metadata API. I'm attempting to do this in Go, but any clear examples would be helpful.