Help Center

How can we help? 👋

Avochato API Credentials Data Table

An overview of syncing Avochato API Credentials to Salesforce, and using the Avochato API Credentials Datatable (AACD)

Last updated on February 9, 2022

A. Overview

Outlined below is how to sync your Avochato API Credentials to Salesforce, as well as how to manage them via the Avochato API Credentials Datatable. Once the credentials find their way into Salesforce, you’ll be able to send messages via Flow Builder and Process Builder automation, List View Broadcasting, or Apex Code.

B. TLDR Quick Setup

Want to get your API credentials enabled right away? Follow these simple steps:

  1. Ensure Avochato for Salesforce is installed in your Salesforce org. If you’re unsure, visit the Avochato for Salesforce listing on the AppExchange and install it on your org
  1. Within Avochato, click on the “Integrations” menu option. Now you can connect Avochato to your Salesforce Org of choice. Use “Connect Production” if you’re ready to go live with the sync, or “Connect Sandbox” if you’re in the testing phase. If you see the “Settings” button, it means you’re already connected and good to go
    1. Notion image
  1. Go to Avochato → Settings → API Access, and select the user you’d like to use as your default API user. When you click “Generate Credentials”, it automatically syncs them to Salesforce, enabling features like List View Broadcasting and Flow Builder Avochato Apex actions.
    1. 🚀
      See section D.1. below for step-by-step on generating Avochato API credentials
  1. Done! See the rest of this article in order to see all the credentials you created, and some advanced tricks & tips around managing your API credentials

C. Where do I see it?

In order to access the Avochato Setup tab, which is where the AACD lives, simply click on the App Launcher in the upper left corner of the page (3 by 3 dots icon in the left side of the Salesforce header) and type "Avochato Setup" in the quick finder, then click the Avochato Setup link:

Within the Avochato Setup page, click the "Advanced" tab (to the right of "Essentials" tab) to see the AACD in action.

Notion image
Notion image

D. How do I use it?

There's two parts in order to get your API callout goodness working in Salesforce.

1. Attain API credentials

First, get your Avochato API Credentials. You can either get credentials from one Avochato user & inbox, and those will serve you for all your messaging needs, or you can create API Credentials per user per inbox for the ability to send messages on behalf of specific Avochato users from specific inboxes. What a mouthful!

If you already have API credentials, then find them and keep them handy for the next section. For first time users, you can acquire some new keys by following the gif below:

Notion image

For those who prefer lists over gifs, follow these instructions below:

  1. Go into Avochato, click Settings, then click API Access
  1. Select a user you'd like to create the API credentials for. Whatever Avochato accounts & inboxes that user has access to in Avochato will be the access they have when sending messages from Journey Builder
  1. Click the friendly green-ish Generate Credentials button
Notion image

Yay! API Keys FTW! Save the Auth ID and Auth Secret somewhere safe - the secret will not be given to you again 🤫

2. (Optional) Add or adjust API credentials to Salesforce User of choice

💡
Avochato API credentials should have been automatically added using the “Generate Credentials” button above, if you’re Avochato was already connected to your Salesforce org. Below are manual steps you can take to apply these API credentials manually to other orgs.

The second part is to add or adjust these new credentials for the matching Salesforce user. You'll see a datatable with all your Salesforce users:

Notion image

To manually add a credential to a Salesforce user, just click the action arrow to the far right next to the user (in our case above, Tom Smith), and click Add API Credential:

Notion image

Bring out that post-it note with your API Credentials on it (seriously though, don't write your Auth Secrets on post-it notes! Security hazard! ☣️ ).

Put in the Auth Id and Auth Secret. Enter the Avochato Inbox name if you have it handy, and select Default Credential if this is the first time you're entering an API credential into your Salesforce org:

Notion image

Click Create Credential. Aaaaaaand we're off!

Notion image

Creating the credential in Salesforce takes a bit of time (a few seconds to a few minutes - thank you multi-tenant platform handling asynchronous requests 🙌 ) and you'll see a friendly message telling you to be patient. Refresh the page to see if your credentials were created, or see the action on the Deployment Status page.

Eureka! Tom now has API credentials and your Salesforce org can now do Avochato messaging and other API callout goodness!

Notion image

Now if you saw a ⚠️ in front of the row, don't sweat it. In the background we are auto-confirming that credential and encrypting your secret to keep it...a secret. Refresh to page after about a half minute and you should see that warning sign go to ✅.

E. The Fun, Advanced Stuff

1. Make it the default credential

If you want to set a specific credential as the default for all your Avochato API needs, click the "Make Default" action. It will automatically mark that credential as the default

Notion image

2. Deactivate and Activate

No longer want to have a credential useable in Salesforce (maybe deactivated a Salesforce user recently)? Click "Deactivate" to disable the API credential from being used

If you have a deactivated credential and want to re-activate, click the...well you know where this is going 👀 😙

Notion image

3. Confirm credential

Sooooo if you see this option and that ⚠️ sign next to the credential, it means you have an Avochato API credential that's not in working condition...just yet.

Notion image

Click the "Confirm" action and it'll adjust the credential to ensure it actually works as intended. For those technical types, this will encrypt the Auth Secret so that it's secure and scrambles the original secret from being intelligible from the reader.

Did this answer your question?
😞
😐
🤩