Salesforce CRM

Salesforce integrates with Lemnisk via an App package. When using the package to integrate Salesforce with Lemnisk, the user profile in Lemnisk will be created or updated whenever any of the following objects are updated/created in Salesforce:

  1. Leads

  2. Accounts

  3. Contacts

  4. Individual

  5. User

Package Installation

Package URL:

https://login.salesforce.com/packaging/installPackage.apexp?p0=04tHs000000JINO

Steps to Install the Package:

  • Login to your Salesforce Instance.

  • Click on the package URL provided above for installation.

  • Select Install for All Users.

  • Click on the Install or Upgrade button to upgrade from the earlier version.

Assigning permission sets

Assign permission sets to a single user:

  • From the Setup menu, enter Users in the Quick Find box and select the appropriate user.

  • Search for Permission Set Assignments and click on Edit Assignments.

  • Select the appropriate permission set (Lemnisk User Permission Set).

  • Click Save.

Assign a Permission Set to Multiple Users:

  • From the Setup menu, enter Permission Set in the Quick Find box and select the permission set (Lemnisk User Permission Set) to assign.

  • Select Manage Assignments at the top and then click Add Assignment.

  • Select the users you want to assign the selected permission set to and click Next.

  • Click Assign to assign the permission set to the users.

Update Apex Setting

  • From the Setup menu, enter Apex Settings.

  • Select the checkbox Deploy Metadata from Non-Certified Package Versions via Apex

  • Click Save.

Configure Lemnisk API

Configure Lemnisk API details in the Lemnisk API Configuration tab. Please reach out to your CSM to get the following API details.

  1. API Endpoint

  2. API Key

  3. API Pass Key

Configure Objects to Sync

You have the flexibility to select which objects from Salesforce should be synchronized with Lemnisk. Whenever a new record is created or an existing record is updated in the chosen objects, Lemnisk will be updated accordingly based on the synchronization frequency you have set.

The following objects are available for sync:

  • Lead

  • Account

  • Contact

  • Individual

  • User

Sync Interval

For each individual object, you have the option to set the synchronization interval to either the same or different values. The sync interval field can accept the following values:

  1. None: The object will not be synced to Lemnisk.

  2. Instant: The object will be synced to Lemnisk in real-time whenever the creation/updation happens.

  3. Batch: The object will be synced to Lemnisk in batch at a particular time selected by you.

Error Logs

Error Logs hold any error messages that might occur while synchronizing the objects to Lemnisk. It contains the following:

  1. Component Name

  2. Component Type

  3. Description

  4. JSON Response

  5. Method Name

  6. Object

  7. User

Life cycle of the "Is_Lem_Synced_c" field

The "Is Lem Synced" field is a Boolean field, that defaults to "false". We have created this field for all five objects: Account, Contact, Lead, Individual, and User. Upon installing our package, the field values of all records will be set to the default value of false.

  • If the user selects the Object Sync to "None":

    The 'Is_Lem_Synced_c' field remains false by default. No actions are performed when there is a change in the field or upon record insertion.

  • If the user selects Object Sync to "Instant":

    Whenever a new record is created or any changes are made to the fields, a trigger will update the 'Is_Lem_Synced_c' field to false. Subsequently, the record will be sent to the Lemnisk API. If the API response is successful, the field will be updated to true. If the response is unsuccessful, the field will remain false.

  • If the user selects Object Sync to "Batch":

    The batch process will run based on the scheduled time and process the unsynced records where 'Is_Lem_Synced_c' is false. After sending the records to the Lemnisk API, based on the API response, the Boolean field will be set to true for successful records and false for unsuccessful records.

LemniskCalloutHandler

This is a handler class for all triggers and batch classes. It dynamically sends API requests to the Lemnisk API based on the object.

Method getAllObjectRecs (LIMIT 50000)

In Salesforce, we have a governor limit to query up to 50,000 records in synchronous Apex. For batch classes, the limit is 50 million records. If we query more than 50,000 records, an error will be thrown. Therefore, to follow best practices, we have added this limit. This method is called from the trigger, and the trigger processes a maximum of 200 records. For example, if we perform a bulk update of 500 records, the trigger will run 3 times. Therefore, there will be no issues using the LIMIT.

FAQ

  1. Method When Salesforce goes for maintenance, what happens to instant flow during the maintenance period? There is no impact on the scheduled jobs, batch, scheduled, long-running transactions, or bulk API jobs prior to the maintenance. Salesforce will queue all jobs and process them once the maintenance is complete.

  2. What happens when a user is onboarded after the Lemnisk App installation?

    When a new user is onboarded, they have to be given the 'Lemnisk User Permission Set'

  3. What is in the 'Lemnisk User Permission Set'?

    The 'Lemnisk User Permission Set' has the following

    • Assigned Apps:

      Immensitas.Lemnisk (Immensitas__Lemnisk)

    • Object Settings:

      • Accounts - Read, Edit

      Is Lem Synced- Read, Edit

      • Contacts - Read, Edit

        Is Lem Synced- Read, Edit

      • Error Logs - Read, Create, Edit, Delete

        Component Name - Read, Edit

        Component Type - Read, Edit

        Description - Read, Edit

        JSON Response - Read, Edit

        Method Name - Read, Edit

        Object - Read, Edit

        Owner - Read, Edit

        User - Read, Edit

      • Individuals - Read, Edit

        Is Lem Synced - Read, Edit

      • Leads – Read, Edit

        Is Lem Synced - Read, Edit

      • Log Error Events – Read, Create

      • Lemnisk App Admin Configuration – Available, Visible

    • Apex Class Access:

      • Immensitas.AccountTrigger_Test

      • Immensitas.AuthorizationController

      • Immensitas.AuthorizationController_Test

      • Immensitas.ContactTrigger_Test

      • Immensitas.CRUDAndFLSCheckController

      • Immensitas.ErrorHandler

      • Immensitas.ErrorHandler_Test

      • Immensitas.IndividualTrigger_Test

      • Immensitas.LeadTrigger_Test

      • Immensitas.LemniskAPIService

      • Immensitas.LemniskCalloutHandler

      • Immensitas.LemniskMockHttpResponseGenerator

      • Immensitas.MakeCalloutQueuableJob

      • Immensitas.ObjectToSyncController

      • Immensitas.ObjectToSyncController_Test

      • Immensitas.ObjectToSyncScheduler

      • Immensitas.ObjectToSyncScheduler_Test

      • Immensitas.SendDataToLemnisk_Batch

      • Immensitas.TestClassUtil

      • Immensitas.UserTrigger_Test

    • Custom Metadata Types:

      • Immensitas.Lemnisk API Setting

      • Immensitas.Object Configuration

  4. Will this App be published in the Salesforce AppExchange?

    Yes, we are working with AppExchange Business Development team at Salesforce on the listing. Once the security reviews are over, we will let you know!

Q1. Method When Salesforce goes for maintenance, what happens to instant flow during the maintenance period? There is no impact on the scheduled jobs, batch, scheduled, long-running transactions, or bulk API jobs prior to the maintenance. Salesforce will queue all jobs and process them once the maintenance is complete.

Q2. What happens when a user is onboarded after the Lemnisk App installation?

When a new user is onboarded, they have to be given the 'Lemnisk User Permission Set'

Q3. What is in the 'Lemnisk User Permission Set'?

The 'Lemnisk User Permission Set' has the following

  1. Assigned Apps:

Immensitas.Lemnisk (Immensitas__Lemnisk)

  1. Object Settings:

  • Accounts - Read, Edit

Is Lem Synced- Read, Edit

  • Contacts - Read, Edit

    Is Lem Synced- Read, Edit

  • Error Logs - Read, Create, Edit, Delete

    Component Name - Read, Edit

    Component Type - Read, Edit

    Description - Read, Edit

    JSON Response - Read, Edit

    Method Name - Read, Edit

    Object - Read, Edit

    Owner - Read, Edit

    User - Read, Edit

  • Individuals - Read, Edit

    Is Lem Synced - Read, Edit

  • Leads – Read, Edit

    Is Lem Synced - Read, Edit

  • Log Error Events – Read, Create

  • Admin Configuration – Available, Visible

  1. Apex Class Access:

  • Immensitas.AccountTrigger_Test

  • Immensitas.AuthorizationController

  • Immensitas.AuthorizationController_Test

  • Immensitas.ContactTrigger_Test

  • Immensitas.CRUDAndFLSCheckController

  • Immensitas.ErrorHandler

  • Immensitas.ErrorHandler_Test

  • Immensitas.IndividualTrigger_Test

  • Immensitas.LeadTrigger_Test

  • Immensitas.LemniskAPIService

  • Immensitas.LemniskCalloutHandler

  • Immensitas.LemniskMockHttpResponseGenerator

  • Immensitas.MakeCalloutQueuableJob

  • Immensitas.ObjectToSyncController

  • Immensitas.ObjectToSyncController_Test

  • Immensitas.ObjectToSyncScheduler

  • Immensitas.ObjectToSyncScheduler_Test

  • Immensitas.SendDataToLemnisk_Batch

  • Immensitas.TestClassUtil

  • Immensitas.UserTrigger_Test

  1. Custom Metadata Types:

  • Immensitas.Lemnisk API Setting

  • Immensitas.Object Configuration

Q4. Will this App be published in the Salesforce AppExchange?

Yes, we are working with AppExchange Business Development team at Salesforce on the listing. Once the security reviews are over, we will let you know!

Last updated