-
-
Case edit
-
Legal analysis with reason and legal impact score
-
Case record, Party-1, Party-2 requirements, Strategy for Party-1
-
Business analysis with reason and business impact score
-
Emotional analysis with reason and impact score
-
List of Strategies that can be created, with analysis data
-
Auto launched flow to invoke prompt and update records
Inspiration
I have seen many legal issues. Very difficult to get analysis of various strategies, opportunities, risks to take proper decisions.
What it does
The POC provided takes input of disputes, takes input of strategies. Then provides AI analysis of strategies in visual and reasoned methods.
This will help user to take decisions
How we built it
1) Prompts from promptBuilder to analyse the dispute and strategies, then score them
2) Created LWC to visualize using Chart.js
3) Used Autolaunched flow to connect LWC, Prompt and create outputs
4) Case standard object was used, with a new record type for dispute assist created
5) A custom object called strategy was created to hold strategies and data created from prompt builder
6) 3 prompts were created for Legal, Business, Emotional
7) Lightening-flow was used to trigger the flow, that will process the prompt and create outputs
Example of prompt for Business
You are a legal-business analysis assistant. Based on the inputs provided below, analyze the scenario and generate a JSON object suitable for use in a charting application.
---
📄 Case Description:
{!$Input:Case_data.Description}
🎯 Party-1 Requirement:
{!$Input:Case_data.Party1_requirement__c}
🎯 Party-2 Requirement:
{!$Input:Case_data.Party2_requirement__c}
🧠 Strategy:
{!$Input:Case_data.Strategy__r.Description__c}
---
🎯 Objective:
Generate a JSON output for a visualization system that includes the following:
1. Business Profit or Loss potential **for Party-1**, rated on a scale of 0–100.
2. For the given strategy, detect types of business aspects that impact profit or loss.
3. Mark each as either:
- `"category"`: "Profit" or "Loss"
- `"type"`: the nature of the aspect (e.g., "exclusive rights", "delayed payments")
4. Give `score` (0–100) for each type's impact.
5. Add a brief `reason` for the score.
📊 JSON Output Format:
{
"strategyName": "Strategy Name",
"businessImpacts": [
{
"score": 75,
"category": "Profit",
"type": "exclusive rights",
"reason": "Party-1 gains exclusive rights under contract with minimal investment."
},
{
"score": 50,
"category": "Loss",
"type": "long negotiation",
"reason": "Prolonged negotiations could lead to missed opportunities."
}
]
}
Note: Give output only in JSON

Challenges we ran into
1) Fine tune idea to small implementable size
2) Had issues integrating with flow
Accomplishments that we're proud of
1) I am able showcase the benefit of AI in resolving disputes
2) A solution of this type will help parties resolve disputes easily
What we learned
1) The power of agentforce for dispute resolving
2) Integrating various salesforce technologies
What's next for Dispute Resolution Assistant using Agentforce AI
I plan to make customized assistant for each domain, addressing few type of customers
I also plan to integrate with laws of each domain, to get realistic outputs
Built With
- apex
- flow
- lwc
- prompt
- salesforce
Log in or sign up for Devpost to join the conversation.