Summary
This article will detail the specifications and upgrade steps for the new LS4SF package version 4.45, specifically for customers upgrading from package version 3.75.
Release Date
April 20, 2022
What’s New?
There are several new features and updates for customers upgrading to 4.45. The following detail some of the more important features, especially for customers coming from a more recent, 3.x package:
Features
There are some exciting new features available in package 4.45 that are not in package 3.75:
Minutely Periodic Sync
The new ‘Minutely’ periodic sync gives customers the ability to set periodic sync definitions at much shorter intervals than ever before. You can now set your periodic syncs at iterations starting every 3 or 5 mins. in increments of 3 or 5 depending on what you set in the ‘Settings’ tab. This is especially beneficial when you need quick enrichment of new records, but have too much incoming volume for an event-based sync to handle
Custom Objects
The new (and optional) ‘Custom Objects’ feature gives customers two new dedicated custom objects, ‘Company’ and ‘Person’, that contain the LS enriched data completed on the Salesforce Standard Objects (Account, Lead, Contact). Please refer to the Custom Objects article in our Knowledge Base for more information.
LS Utility
The Settings tab now houses an LS Utility button, which will scan your package setup for authorization settings, remote site settings, and permission sets. One click ‘Fix’ option for each to easily diagnose and fix common configuration issues.
New Settings Tab Options
There are 4 new additions to the settings tab thanks to the new Custom Objects and Minutely Periodic features:
- Single Enrichment Authentication: This allows you to work with Leadspace to designate a dedicated program ID and token for event-based syncs, which use our Single API endpoint.
- Sync Definition - Minute Interval: This allows you to set the minute iterations for your minutely sync. Note: Once you run a minutely sync, this cannot be changed.
- Receive Email Updates For Each Minutely Based Sync Activity: Toggle on if you want the email addresses listed in the Configurations > Email Addresses section to receive a notification after each minutely job.
- Custom Objects: Toggle on if you want to utilize new Company and Person Custom Objects. Note: Once you toggle on, the Lead, Account, and Contact Output Mapping tabs will no longer be accessible.
- New Bulk Size Options: Now choose either 400 or 500 as bulk sizes per API call.
Quality of Life Improvements
There are also some quality of life improvements for package 4.45. No action is needed for these changes.
Field Label Changes: Select fields have new, more logical field labels as part of the package. These fields are:
- SYNC ID = Sync ID
- Number of records = Number of Records
- ApexJobId = Apex Job ID
New Fields: The following fields have been added:
- Processing Message
- Number of Tries
- JSON Response
New Statuses and Messaging: Due to the available frequency that Minutely syncs afford, a new status was added for the minutely periodic syncs ‘Done - Won’t Run’. This will populate one of two values in the ‘Processing Message’ field:
- Skipped: Two of the same periodic jobs from the same sync definition are scheduled at the same time.
- Skipped - SF Limitation of 100 jobs in a queue: Scheduled periodic job exceeds SFDC’s queue limit of 100.
Cleanup
We also cleaned up some of the package fields’ API Name values in SFDC. To do this, we had to create new fields that are now duplicates of fields in 3.75, so you will want to delete these as part of the Upgrade Steps listed below (Step 5).
Requirements
Here are some requirements regarding the installation and use of the package.
IMPORTANT: Starting with package 3.68, all LS4SF packages are now 'secure' packages due to requirements on the Salesforce App Exchange. This especially affects the functionality with Event Based Syncs, meaning that all users who create or update records to trigger these syncs will need to have the Leadspace Manager permission set applied to their profile assignments. If you have any questions, please contact support before proceeding.
Some other requirements include:
- SFDC System Administrator must install the package
- The creator of the Periodic Sync must have the proper permission set or SFDC profile access:
- System Admin
- Leadspace Manager
- Leadspace Admin
- After the upgrade, you must click the ‘Complete Upgrade’ button in the ‘Settings’ tab to see the new minutely option in Sync Definition creation.
Upgrade Steps
- Have a Salesforce System Administrator log into the SFDC instance to which you want to install. NOTE: There are no longer separate links for Sandbox and Production.
- Click the upgrade link here
- Choose ‘Install for All Users’ and Submit.
- Once completed, click ‘Done’
- Go to the Settings tab and click the new ‘Complete Upgrade’ button.
Now, when you go to Sync Definitions > New > Periodic, you’ll see the new ‘Minutely’ option with Frequency options in intervals of 3 mins. up to 57.
We now need to do a little cleanup, per the ‘New Features’ above > Cleanup section. If using Salesforce Lightning UI, please switch to Classic View as the following is only available in classic.
- Go to Setup > Accounts or Leads or Contacts > Fields. Scroll down to Account Custom Fields & Relationships
- Look for the fields with the envelope and red X. You’ll notice that the ones to delete have ‘Leadspace’ in the API Name. The new fields have LS instead.
- Click ‘Delete’
- Repeat this for all 3 standard objects: Contacts, Leads, Accounts
**Note: If you have any active sync definitions that use any of the fields deleted above, you will need to edit the sync definition and replace the deleted criteria/filter with the new version.
Now that the cleanup is complete, you will want to run a quick ‘clear the table’ job using the same search criteria you are planning to use in your minutely periodic sync. This will ensure that you are not sending a large volume of records through the minutely sync at one time.
**Note: You can wait on this step until right before you go to setup the minutely periodic sync definition.
- Go to Leadspace for Salesforce App > Sync Definitions > New
- Choose the object you want to sync > Run Once > All Fields
- In the ‘Search Criteria’ section, set the criteria you plan on using in your minutely sync job
- Click ‘Apply Filters’
- If you have a small number of records that fit the criteria, you can skip this step
- If you have a large number (Greater than 5000), submit to run the job
Once the job completes, you are now ready to setup and start using your minutely periodic sync.
Technical Specifications
Apex Jobs
The apex classifications and jobs are mostly the same as with packages prior to 4.45. The one main change is with the ‘minutely’ sync where we’ve added a new ‘worker’ job to schedule the syncs.
Here’s how it works with the minutely sync:
- As with the current, hourly periodic syncs, Leadspace Job Handler runs once per hour at the top of the hour.
- NEW: Leadspace Job Handler (worker: date/time stamp) queues up the sync activity at the next, minutely interval
- As a result, the scheduled apex job Sch_EnrichmentJob will queue the next interval
- Scheduled apex jobs Batch_EnrichmentJob and Batch_PollingJob will run
- When enrichment and polling jobs are status ‘Completed’, the Sch_EnrichmentJob will abort
- The process will repeat at the next scheduled interval
API Specifications
- All periodic syncs in LS4SF including the new minutely solution use Leadspace’s Bulk API v3.
- API rate limit for Bulk API is set to 30 TP/s
- 1800 records per minute
- 5400 records every 3 min. Interval
Behavior
- In the minutely sync, if a sync activity is still running when another scheduled job kicks off, the new job will run independently and not affect concurrent jobs already running.
- The exception is if concurrent jobs exceed 10 (Known Issue).
Known Issues
The following issues are known issues related to package 4.45. Our Development Teams are actively working to resolve these issues:
- Standard/Common Use Case not on sync definition tab until you click ‘Complete Upgrade’ in Settings tab
- Records stuck ‘In Progress’ when SFDC queue limit of 100 is reached
- When using the minutely periodic sync, jobs scheduled will start at the next round hour, then iterate at the frequency from then on. Example of ‘Every 3 minute’ job scheduled at 5:47am:
- Unrecognized LS Log description ‘Before Insert or Upsert list must not have two identically equal elements’
- Periodic jobs don’t kick off when there's 10 periodic jobs in parallel
- Pause and resume of minutely sync definition creates 2 jobs on the next round hour
- Use Case field on SFDC record changes from ‘Standard’ to ‘Required’ after choosing ‘Complete Upgrade’ in Settings
- Error 427 ‘Insufficient Credits’ causes sync activity status to stay ‘In Progress’
Best Practices / Limitations
- Minutely sync not created to run large amts. of records. The formula to calculate how many max records can run for any given interval is as follows:
- 30 x 60 x Minute interval.
- If you are using Frequency = 3 mins. then 5,400 records
- ‘Status’ dropdown in Sync Definition does not currently work (feature request). If you need to ‘Pause’ or ‘Disable’ a job, please use the ‘Edit’ option on the Sync Definition
- Pause any active, periodic sync that has the same criteria as the one you want to create with the new ‘minutely’ frequency
- Do not run over 10 periodic syncs at one time (Known Issue)
- Minutely sync kickoff is subject to SFDC limitations and resources