We're sorry you have had to come here. We know you want to see your Salesforce Org metadata and it is frustrating when your sync fails or seems to be taking a long time.
We use the Salesforce APIs to get the data from Salesforce. There are a number of reasons that the sync fails - but we are not always told why. Here are some of the symptoms.
Taking a long time:
The time depends on the loading of the Salesforce servers. A brand new Dev Org takes 5-10 mins. A huge Org (60,000 items) takes 2-3 hours. Sandboxes run slower than Production.
It is a good practice to have the sync scheduled during the night to make sure the delays do not slow you down during the day.
Sync failed (got an email or message in Org Model):
Sometimes it seems like Salesforce servers just "lost the plot" and stopped. We're not told why. It may be that some metadata has synced.
Simply re-running the sync works. I know it sounds awful, but usually, it runs fine.
Sync fails almost instantly:
This normally means that the Remote Site Setting is incorrect, so Salesforce won't let Elements sync. This could be for the following reasons:
One of the two Remote Site Settings is missing or incorrect. There should be https://api.q9elements.com and then EITHER https://na99.salesforce.com where na99 is your server OR https://AAA.my.salesforce.com where AA is your MyDomain.
You have implemented MyDomain which means you need to ADD a new Remote Site Setting, e.g. https://AAA.my.salesforce.com where AA is your MyDomain.
The Org has 'Lock Sessions to the IP address from which they originated' in Security/Session Settings enabled. This stops Salesforce from being able to make REST API calls to itself which the Elements Catalyst Sync requires. This setting will also stop the Salesforce Workbench from being able to make REST API calls. Here is a detailed article on Salesforce Session Settings and login IP ranges
Sync returns a "Salesforce token not found" error
This means that either:
in Elements app, the connection has not been authenticated; or
in Elements app, the Salesforce user that was authenticated does not belong to this Org or does not have the right to access the API.
You can refresh (and reset) the user token in the settings tab against the Org connection.
An item (e.g. object) doesn't seem to be in Org Model
For some reason, an item caused an error and won't sync. There is no consistent pattern. Rather than stop the whole sync, we skip it and keep going. We can look back into the log files and work with you to resolve the issue.
Contact us at email@example.com with your email, the Org Model name and Space name.
We can then wade through the huge (500k) log file to find out what happened.