Salesforce

Connecting Salesforce with Mesa

When you're setting up your first workflow with Salesforce, you will need to create a Credential in order to connect Mesa with Salesforce.

Log in to Salesforce, then click the Setup button (gear icon in the top right). If a menu is displayed, then click Setup.

In the left hand menu, navigate to Apps and App Manager.

Then click on New Connected App.

Enter a name for the connected app under Connected App Name. The API Name field will then auto-populate. 

Enter a valid email for Contact Email, then for Callback URL enter: https://app.getmesa.com/apps/mesa/oauth/redirect-token

Ensure Enable OAuth Settings is checked. Then select all items under Available OAuth Scopes and hit the right arrow under Add to move all of them to Selected OAuth Scopes.

Do not alter any other fields, then hit the Save button at the top. 

Note: After saving, you may then see a warning that changes can take up to 10 minutes to take effect.

After saving, copy the values for Consumer Key and Consumer Secret.

Back in your Mesa workflow, open your Salesforce Trigger or Action. Paste the value for Consumer Key into the Client ID field, and the value for Consumer Secret into Client Secret.

For Authorization URL, enter: https://login.salesforce.com/services/oauth2/authorize

For Token URL, enter: https://login.salesforce.com/services/oauth2/token

Note: If you are connecting to a Salesforce sandbox, in most cases you should replace login.salesforce.com with test.salesforce.com for the two URLs above. 

Hit Authenticate with Salesforce. You may be asked to login to your Salesforce account. Once logged on, you will get a prompt asking for access. Hit Allow.

You will be taken back to Mesa, with a new Salesforce credential created. 

You have now finished setting up your Salesforce credential. From now on, as long as you are connecting to the same Salesforce account, you can just reuse the same one. Great work 🎉

Configuring

Synchronizing your Salesforce fields

Mesa allows you to pull down the fields from your Salesforce account, for a selected resource, such as Account. Once you have set up or selected a valid credential for a trigger or action, click the Retrieve Fields button. 

This will retrieve all editable fields and make them available when creating or updating a resource, and also as tokens in subsequent actions - for example Email. 

Within Salesforce, if you edit the fields on a resource, you can then click Retrieve Fields on your Salesforce trigger or action to get a refreshed list. Any existing fields which have values assigned to them will be preserved.

Why can't I set the amount on an opportunity?

If an opportunity has products, then the amount on an opportunity is the sum of its related products. Please see this Salesforce article for details.

Templates

For details on Mesa's Salesforce templates, see the following documentation.

I don't see my Salesforce workflow activating when I update something in Salesforce?

For Salesforce Triggers (such as Lead Created), the Salesforce app will run every hour, on the hour, and will look for any recent activity in Salesforce. As a result, you may not see immediate activity in your MESA workflow until the hour hits. 

Once the hour hits, MESA will process every single task that has accrued within the previous hour.