Users / User Mapping
When are users synchronized between Salesforce and OCC?
Users are synchronized daily at 2:00 AM UTC.
Are there any specifics to types of users that are synchronized from Salesforce?
Yes, the integration between OCC and Salesforce allows you to support a custom user object. By default, we utilize named users in Salesforce and we utilize the OwnerId value to link between the Lead / Opportunity back to those users.
If you wish to utilize a custom user mapping, you would set the “Enable Custom User Object” in the settings of our Salesforce integration. Once enabled, you’ll need to provide us with a couple pieces of information so we can appropriately map users:
- Model: What is the Salesforce Data Model we need to look at to pull the list of users we’ll map into our system (this is User by default).
- ID: What is the field we will utilize from the Model defined above to pull as the unique identifier (this is id by default).
- Note: This is the item that will be present on the object we’re utilizing for associations elsewhere in the integration.
- Email: What is the field we will utilize from the Model defined above to pull as the email address of the user (this is Email by default).
- Name: What is the field we will utilize from the Model defined above to pull as the name of the user (this is Name by default).
- Association Key: What is the field named on the object (Opportunity or Lead) which we will utilize to identify who the newly created job will be assigned to.
How are users matched between Salesforce and OCC?
The user from Salesforce has their email address compared to a list of users available in OCC by email. If the emails match they’re automatically linked up.
Can I manually map a user between Salesforce and OCC?
Yes, you certainly can! This can be done from the Salesforce card on the integrations page. You will need to click on the “Users Connected” tab where you will be presented with a list of users from Salesforce.
You can hover and click the “edit” (pencil) icon in order to manually select the OCC user you wish to associate with the Salesforce user.
Job / Job Data Mapping
How often are updates to jobs pulled from Salesforce and when do they run?
Updates to jobs are pulled every 15 minutes. The job runs at 10, 25, 40, and 55 minutes after the hour.
Can I add filters to selectively pull jobs and/or updates in from Salesforce to OCC?
Yes, you can configure custom filters for specific fields on the object (Opportunity or Lead) we’re synchronizing with.
This is done on the Settings tab of the Salesforce integration card under the “Enable Filters” accordion. To enable filters, you’ll need the following information:
- Column: The column on the object (Opportunity or Lead) you wish to utilize as your filter.
- Valid Values: The value(s) you wish to utilize as a part of your filter.
Some examples might be something like a Column of LeadSource and a valid value of “Web” or “Phone”. What this will do, is upon syncing it will FILTER and ONLY create jobs for records which meet the criteria defined in the filter.
Document Uploads Back to Salesforce
Are documents able to be uploaded back to Salesforce?
Yes, documents can be pushed back from OCC back to Salesforce.
Where are documents uploaded back to Salesforce?
Documents that are automatically uploaded back to Salesforce from OCC will be uploaded to the object you have set up as your “Job Object” which is either an Opportunity or Lead.
In the case of an Opportunity, it will show up on the Notes & Attachments section of the Opportunity (similar to below).
In the case of a Lead, it will show up on the Files section of the Lead (similar to below).
How do I configure when OCC should push back documents to Salesforce?
On the integration card for Salesforce, there is a Settings Tab that has a set of options entitled “Document Attachment Preferences” where you can configure exactly when documents are attached back to Salesforce.
General
What happens when the sync button is pressed on the Integration UI?
Pressing the Sync button on the Salesforce integration card kicks off the Initial Sync job which does the following:
- Pull ResultReasons: This pulls result values which requests client.picklist_values('Opportunity', 'StageName')
- The following mapping is utilized to store the information on the organization:
- description: result.value
- The following mapping is utilized to store the information on the organization:
- Pulls Users: Makes the following SOQL query to Salesforce (SELECT Id, Email, Name, AssociationKey FROM Model). The specific values for those are set based upon how the User Object is set up and configured for the integration. The following mapping is utilized:
- crm_id: Model.Id
- name: Model.Name
- email: Model.Email
- Pulls Objects: This job determines what is set up integration-wise and pulls the correct job based on the configuration.
- Lead: Calls Pull Leads Job (for things updated in the last 29 days)
- It makes a call to Salesforce to get the ids of leads that have been updated since the time specified.
- It then makes a call to Salesforce to pull field names for the lead (e.g. client.describe(‘Lead’).fields.pluck(:name)
- It then takes those fields and makes the following SOQL query:
- SELECT AllFields FROM Lead WHERE Id IN ListOfUniqueUpdatedSinceTime
- The system then iterates over ALL ACTIVE and mapped Salesforce / OCC Users and creates a job with the mapping identified in the next section.
- Opportunity: Calls PullOpportunitiesJob, PullOrderNotesJob, and PullOpportunityOrdersJob (for things updated in the last 29 days)
- PullOpportunitiesJob: The system makes calls to look for the IDs of Opportunity, Contact, and Events which have been updated in the time period.
- In the case there are more than 5000 records updated it stops and doesn’t continue processing.
- With the list of unique IDs that have been updated, it does the following:
- It makes a call to Salesforce to pull fields names for the Opportunity object (e.g. client.describe(‘Lead’).fields.pluck(:name))
- It then takes those fields and makes a SOQL query to Salesforce:
- SELECT AllFields, “(SELECT Id, ContactId, IsDeleted, Contact.Name, Contact.FirstName, Contact.LastName, Contact.Email, Contact.HomePhone, Contact.MobilePhone, Contact.Phone, Contact.MailingStreet, Contact.MailingCity, Contact.MailingState, Contact.MailingPostalCode, Contact.LeadSource, Contact.Id 'FROM OpportunityContactRoles ), ( SELECT Id, StartDateTime, EndDateTime, Subject, OwnerId, WhatId, Description FROM Events ) FROM Opportunity 'WHERE Id IN ListOfUniqueUpdatedSincetime
- The list of records is then filtered based upon the filter configuration for the integration.
- Records that pass the filter will then be created based upon the mapping identified in the next section.
- PullOrderNotesJob: If notes sync is enabled for the integration, the following process is then done:
- The system pulls the information for the user configured as the “Create notes in OCC based on this user” that is set up in the integration.
- The system will pull Opportunity Order Notes and update the One Click job notes.
- The integration then makes the following SOQL Query: SELECT Id, LinkedEntityId, ContentDocumentId, TYPEOF LinkedEntity WHEN Order THEN OpportunityId END FROM ContentDocumentLink WHERE LinkedEntityId IN (Select Id FROM Order) AND ContentDocument.FileType = 'SNOTE' AND ContentDocument.LastModifiedDate > DateTime
- PullOpportunityOrdersJob: If notes sync is enabled for the integration, the following process is then done:
- PullOpportunitiesJob: The system makes calls to look for the IDs of Opportunity, Contact, and Events which have been updated in the time period.
- Lead: Calls Pull Leads Job (for things updated in the last 29 days)
My job hasn’t shown up in OCC. Is there a way to expedite job creation if I can’t wait until the next 15 minute run?
You can utilize the Sync button to force a synchronization.