The AdvoLogix Conflict Check feature provides a rich set of extensibility options for initiating Conflict Checks. The Flow Builder action allows organizations to Conflict Check automation within the visual workflow designer while our Apex class supports a wide variety of custom integration solutions by allowing organizations to create new Conflict Checks in a wide variety of ways.
You can initiate and associate a conflict check with any standard or custom Salesforce object (such as Accounts or Contacts) by providing a context record ID.
Automating Conflict Checks with Flow Builder
The following technique has been developed to provide organizations with the ability to automatically create a document from within the Flow Builder.
To use this class in Flow Builder, follow these steps as highlighted below:
- Go to Setup | Create | Workflows Approvals | Flow Builder, and Create a New Process and click Add Action.
- Select Action Type as Apex. Enter Action Name. This is your way of identifying the action in the list of actions.
- Select Initiate Conflict Check as Apex Class.
- Enter the field name for the Search Term field.
- Optionally, click Add Row, and select Description field. Provide a description for identifying the Conflict Check later.
- Optionally, click Add Row, and select Matter ID field. Select the Matter ID as the reference field from the field picker dialog.
- Optionally, Click Add Row, and select Context Record ID field. Enter or reference the record ID from any object (for example, Account ID, Contact ID, or Matter ID) to which the conflict check results should be attached and saved
- Click Save.
Invoking a Conflict Check Via Code
The following Apex method can be used to initiate a new Conflict Check via custom coding. Please be aware this method requires knowledge of Force.com best practices and as always we suggest testing your code in the Sandbox.
Syntax:
ConflictSearchService.InputWrapper input = new ConflictSearchService.InputWrapper();
input.searchTerm = '@searchTerm';
input.description = '@description';
input.matterId = '@matterId';
input.contextRecordId = '@contextRecordId';
List<ConflictSearchService.ResultWrapper> results = ConflictSearchService.executeSearch(
new List<ConflictSearchService.InputWrapper>{ input }
);
Parameters:
@searchTerm
Required. The Search Term value for which Conflict Check should be initiated for.
@description
Optional. The Description for identifying the Conflict Check internally.
@matterId
Optional. The Matter ID we want to associate the Conflict Check with.
@contextRecordId
Optional. The record ID of any standard or custom Salesforce object (for example, Account ID or Contact ID) to associate and save the conflict check to.
Result:
The method returns a List<ConflictSearchService.ResultWrapper> containing:
body- Status message describing the job status or error details.status- String value of 'TRUE' for success (job queued) or 'FALSE' for failure.
Example:
Basic Search
ApexConflictSearchService.InputWrapper input = new ConflictSearchService.InputWrapper();
input.searchTerm = '(John OR Jane) AND Smith';
List<ConflictSearchService.ResultWrapper> results = ConflictSearchService.executeSearch(
new List<ConflictSearchService.InputWrapper>{ input }
);
Search with Context Record ID
ApexConflictSearchService.InputWrapper input = new ConflictSearchService.InputWrapper();
input.searchTerm = '(John OR Jane) AND Smith';
input.description = 'John Smith Account Check';
input.contextRecordId = '0011J00001ABCdeUAH';
List<ConflictSearchService.ResultWrapper> results = ConflictSearchService.executeSearch(
new List<ConflictSearchService.InputWrapper>{ input }
);
Bulk Execution (Multiple Inputs)
ApexList<ConflictSearchService.InputWrapper> inputList = new List<ConflictSearchService.InputWrapper>();
ConflictSearchService.InputWrapper input1 = new ConflictSearchService.InputWrapper();
input1.searchTerm = 'Acme Corp';
input1.contextRecordId = '0011J00001ABCdeUAH';
inputList.add(input1);
ConflictSearchService.InputWrapper input2 = new ConflictSearchService.InputWrapper();
input2.searchTerm = 'Wayne Enterprises';
input2.description = 'Intake Intake Conflict Check';
inputList.add(input2);
List<ConflictSearchService.ResultWrapper> results = ConflictSearchService.executeSearch(inputList);