Steps to sync tickets and contacts between AgriSync and Salesforce

An integration between AgriSync and Salesforce allows Salesforce users to see AgriSync tickets within Salesforce so you can keep track of customer issues. It also allows you to sync contacts between Salesforce and AgriSync to enrich your data in both systems.

Tickets created in AgriSync are synced to Salesforce as a custom object. Since tickets are synced one-way from AgriSync to Salesforce, ticket changes in Salesforce aren't pushed back to AgriSync.

Contacts created in AgriSync are synced to Salesforce unless that contact already exists in Salesforce (determined by mobile phone number).

When a new contact is created in Salesforce and the Sync with AgriSync checkbox is checked, that contact will be synced to AgriSync unless that contact already exists (determined by mobile phone number). The following fields are included in the sync:
Contact's full name
Contact's mobile phone number
Contact's email address
Account Name

Here's a demo video of the AgriSync + Salesforce integration:



1. Install the Salesforce Package

Install from AppExchange

Follow the link above and it will take you to the login screen for your Salesforce account
Once logged in, you'll see the Package Installation Screen. Select Install for All Users and then check the acknowledgment box. Click Install.

Package Installation Screen

Approve third party access and click Continue

Third party access request

Wait for the package to install (this may take several minutes).

Wait for the package to install

Once you see the Installation Complete confirmation, click Done. You'll also receive an email when the installation is complete.

Installation complete

2. Configure package settings

Update the Connected App Policies
In Salesforce, navigate to Setup and search for "App Manager"
Under Platform Tools go to Apps > App Manager
Look for the App Name "AgriSync App" and select Manage from the dropdown

App Manager

Click Edit Policies
Under OAuth Policies set the following:
- Permitted Users to Admin Approved users are pre-authorized
- IP Relaxation to Relax IP Restrictions
- Click Save

Connected App Settings

Scroll down to Profiles, and click Manage Profiles
Select System Administrator and click Save

Add profiles to the app

Verify Remote Site Settings
From Setup, search for "Remote Site Settings"
Find AgriSync and click Edit
If necessary, update the Remote Site URL to match your instance:
- AgriSync: https://crm-connector.agrisync.com
- ExpertConnect: https://crm-connector.expertconnect.support
Click Save

Verify remote site settings

3. Update Page Layouts

Update the Contact Page Layout
From Setup, navigate to Object Manager and open Contact
Select Page Layouts and do one of the following:
- Update your page layout assignments to use the default AgriSync Contact Layout; or
- Modify your existing contact page layout(s) to include the following:
a. AgriSync Tickets related list
b. Sync with AgriSync checkbox
c. Standard Mobile phone number field
d. Standard Email address field

Update Contact page layout

Update the Account Page Layout
From Setup, navigate to Object Manager and open Account
Select Page Layouts and open one of the page layouts
Drag and drop the AgriSync Tickets related list to the page layout
Click the wrench icon to edit related list properties
Add the following fields to the Selected Fields section:
- Title
- Ticket Number
- Contact
- Created Date (AgriSync)
- Status
- Advisor Name
- Assigned Team

In the Sort By dropdown, select Created Date (AgriSync) then choose Descending

Related List Properties - AgriSync Tickets

Expand the Buttons section, deselect all buttons, then click OK
Save the page layout

Deselect buttons

4. Create Default AgriSync Account
Contacts in Salesforce aren't visible to Standard Users unless they belong to an Account. Let's create a default account to hold any new contacts that are created in AgriSync - that way these contacts are visible inside Salesforce.

Pro-tip: Assign someone from your organization to frequently check this account and re-assign any contacts from this default account to the appropriate account in Salesforce. Doing so also updates the Organization field in AgriSync.

Create a new account
Navigate to Accounts and click New
Give the account a name like "AgriSync Default Account" (This can be anything you choose)
Fill out any required fields and click Save

Create a default AgriSync account

Get the account ID
Open the account you just created and copy the ID from the address bar

Copy the Account ID

Set the default account
From Setup, search for Custom Settings in the Quick Find box
Find AgriSyncSettings and click Manage
Click New and enter the following information
- Name: Default Account Id (This must be entered exactly as shown, including spaces and capitalization)
- Key: DefaultAccountId
- Value: Paste the ID of the your default AgriSync account (created above)
*Click Save

Set default AgriSync account

5. Grant access to users in Salesforce
In order to see AgriSync tickets within Salesforce, users must be assigned the "AgriSync" permission set.

In Setup, search for "Permission Sets" and click AgriSync Permissions
Click Manage Assignments
Click Add Assignments
Select the users who should see AgriSync tickets and then click Assign

6. Register your Salesforce account with AgriSync

Gather the following information
Salesforce URL (switch to Salesforce classic and use the URL ending in salesforce.com instead of lightning.force.com)
Username of the System Admin

Send to AgriSync
Send this information to help@agrisync.com. You can expect your Salesforce account to be registered within 24 business hours.

7. Bulk import contacts into AgriSync

To bulk import contacts from Salesforce to AgriSync, follow the instructions below:

Use DataLoader.io or Contact list view to mark BulkImportToAgriSync as True

Set flag to True

Open Developer Console (Gear icon used for Setup)

Open Developer Console

From the Debug menu, select Open Execute Anonymous Window

Paste the following code and press Execute

Database.executeBatch(new AGS3.SyncContactwithAgriSyncBatch(), 200);

Bulk import contacts into AgriSync

Once the records are processed successfully, the BulkImportToAgriSync checkbox will be unchecked. If there are any issues, navigate to the Exception Log custom object. The most common error is invalid phone numbers. AgriSync only accepts valid mobile phone numbers. Toll free (1-800) numbers are not accepted.

Notes
Historical tickets (those created prior to the Salesforce integration) will not be synced - only new tickets will be visible in Salesforce.
The account (organization) field on AgriSync contacts can only be changed via Salesforce
A contact's email address is only synced from Salesforce when there is no email address already in AgriSync. Updating the contact's email address in Salesforce (once it has already been synced to AgriSync) will not be reflected in AgriSync. Email addresses from AgriSync never sync to Salesforce.
If something isn't working properly, check Remote Site Settings and Custom Settings. Both endpoints should match. If Custom Settings are missing, ask AgriSync to re-register your Salesforce account.
Was this article helpful?
Cancel
Thank you!