Skip to main content
Litify/Salesforce Apex Classes

Salesforce Apex Classes that can be used in place of our standard integration to transfer information between our two systems.

Updated over 2 months ago

Process Cases

Create a Case in Case Status

Using this apex class within a flow will allow all new matters in Litify to automatically create a case in Case Status when the matter is added.

  1. Flows can be filtered so that only specific cases are added using the filtering options.

  2. Matters must have a minimum set of information to be added to Case Status. See field mapping below.

  3. Case Status utilizes Practice Areas (also called Case Types). If the Practice Area does not exist in Case Status, it will be created automatically. The stages will be configured with your implementation manager using the Case Status templates.

  4. If Cases need to be created from a different SalesForce object other than Matters, this can be configured as well.

Case Status Field

Salesforce Field

Required?

Additional Notes

Suggested Forumla

Attorney ID

Primary Users > Record ID

Yes

{!$Record.litify_pm__Principal_Attorney__r.Id}

Matter ID in Salesforce

Record ID

Yes

{!$Record.Id}

Case ID in Case Status

Any available field configured in Flows

Yes

Client facing name of the case

{!$Record.litify_pm__Display_Name__c}

Case Description

Any available field configured in Flows

No

Client facing description of the case

{!$Record.litify_pm__Description__c}

Primary Attorney

Email address

Any available email address attached to a user

Yes

{!$Record.litify_pm__Principal_Attorney__r.Email}

Practice Area ID field in Salesforce

Any available field configured in Flows

No

{!$Record.litify_pm__Case_Type__r.Id}

Practice Area Name

Any available field configured in Flows

Yes

{!$Record.litify_pm__Case_Type__r.Name}

Case Date

Any available field configured in Flows

No

{!$Record.litify_pm__Incident_date__c}

Client Id in Salesforce

Client ID

Yes

{!$Record.litify_pm__Client__r.Id}

The Client First Name

Any available field configured in Flows

Yes

{!$Record.litify_pm__Client__r.litify_pm__First_Name__c}

The Client Last Name

Any available field configured in Flows

Yes

{!$Record.litify_pm__Client__r.litify_pm__Last_Name__c}

Client Email Address

Any available email address configured in Flows

No

{!$Record.litify_pm__Client__r.litify_pm__Email__c}

The Client Cell Phone Number

Any available field configured in Flows.

Yes

{!$Record.litify_pm__Client__r.litify_pm__Phone_Mobile__c}

Case Status Name

Any available field configured in Flows.

{!$Record.litify_pm__Matter_Stage_Activity__r.Name}

Case Status ID in Salesforce

Any available field configured in Flows.

No

{!$Record.litify_pm__Matter_Stage_Activity__r.Id}

The date that the Case was closed?

Any available date field configured in Flows.

No

When this field is set, the case will be closed in Case Status

{!$Record.litify_pm__Closed_Date__c}

Base URL

Yes

Client Birth Date

Any available date field configured in Flows.

No

{!$Record.litify_pm__Client__r.litify_pm__Date_of_birth__c}

The Client SSN

Any available field configured in Flows.

No

Create new client?

True/False

No

{!$GlobalConstant.True}

List of Case Managers/ Attorneys Email Addresses

Any user email addresses

No

We will provide a formula for adding multiple email addresses

Primary Attorney First Name

Any available field configured in Flows.

No

{!$Record.litify_pm__Principal_Attorney__r.FirstName}

Primary Attorney Last Name

Any available field configured in Flows.

No

{!$Record.litify_pm__Principal_Attorney__r.LastName}

Update a Case in Case Status

When a matter is updated in Litify this will automatically updated the corresponding case in Case Status in the areas outlined below

  1. Stage Changes

    1. By default, flows will be set up so that if a stage is updated in Litify, Case Status will update to a matching stage. For example, if the stage is updated to Released from Treatment in Litify, in Case Status the case’s status shall also move to Released from Treatment. If a matching stage does not exist, the stage will remain the same in Case Status.

    2. Stage names in Litify can be mapped to different client facing stage names in Case Status. For example, if the stage is updated to Released from Treatment or Treatment Pending in Litify, update the stage in Case Status to Treatment Completed. This mapping will be configured by your Implementation Manager on the Case Status side.

  2. Other Case Updates

    1. When attorneys are added or removed from a matter in Litify, this will be reflected in the corresponding Case Status case.

    2. When paralegals are added ore removed from a matter in Litify, this will be reflected in the corresponding Case Status case.

    3. When a case description is added or updated in Litify, this will be reflected in the corresponding Case Status case.

Send a message through Case Status

Using this apex class within a flow will enable new or edited records in Litify to send a message through Case Status

  1. Flows can be filtered to only delivered messages under specific custom critera.

  2. This apex class can be used to deliver one message at a time to cases as they are updated and isn't intended to deliver messages simultaneously in bulk

  3. Below are the fields needed to create a Case Status message.

Case Status Field

Salesforce Field

Additional Notes

API Key

No

Provided by Case Status

Body

Yes

Body of the message to be delivered.

Matter ID

Yes

ID of the Case to deliver message

baseURL

No

Please Note: Message delivered using rich-text text templates, must have removed any double quotations in favor of single quotations. This can be done by first creating the template in rich-text, and then viewing it in plain text to ensure that the message transports successfully.

Create a Treatment Log in Case Status

Using this apex class within a flow will enable new or edited records in Litify to create a treatment log in Case Status

  1. Flows can be filtered so that only specific records will create treatment logs.

  2. This apex class is only a one was sync and can only be used to create treatment logs in Case Status from Litify records. There is not currently a way to sync treatment logs created in Case status back to Litify.

  3. Below are some of the fields that can be mapped in order to create a treatment log.

Case Status Field

Salesforce Field

Additional Notes

Treatment Address

No

Treatment Appointment Date

Yes

Date of the appointment

Treatment Date

Yes

Date the treatment was logged

Treatment Description

Yes

Treatment Feeling Rating

No

How the patient is feeling after treatment

Treatment Notes

No

Treatment Office Name

Yes

Treatment Provider Name

No

Doctors Name

Did this answer your question?