Logo van Next Best Action Engine

Next Best Action Engine

Organisatie
microsoft
next-best-action-engine

Analyzes an opportunity's current state and engagement history, compares against won deals, and recommends the most effective next action with reasoning. Use when user asks "what should I do next on this deal", "next steps for this opportunity", "how do I move this deal forward", "what's the best action for this opp", "deal coaching", or "opportunity next action".

Overzicht

Uitgevermicrosoft
Repositorydataverse-business-skills
Skillnaamnext-best-action-engine
Sterren
52
Forks
9
Meegeleverde bestanden
Alleen instructies
LicentieMIT
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Compleet zonder extra bestanden

    Alles wat het model nodig heeft, staat in de instructies — geen extra bestanden om te synchroniseren.

  • Open source

    Gepubliceerd door microsoft op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Next Best Action Engine in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/microsoft/dataverse-business-skills/tree/main/skills/next-best-action-engine
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/microsoft/dataverse-business-skills.git /tmp/dataverse-business-skills
mkdir -p .claude/skills
cp -r /tmp/dataverse-business-skills/skills/next-best-action-engine .claude/skills/next-best-action-engine
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Next Best Action Engine in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Next Best Action Engine automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Next Best Action Engine niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

Next Best Action Engine

Sales reps often wonder "What should I do next on this deal?" This skill provides data-driven recommendations by analyzing the current opportunity state and comparing it to successful deals at the same stage, identifying what actions led to wins and recommending the most impactful next step.

Instructions

Step 1: Retrieve Opportunity Context

When user asks "What should I do next on the [Opportunity Name] opportunity?":

1.1 Get Opportunity Details:

SELECT opportunityid, name, customerid, accountid, contactid, estimatedvalue,
       estimatedclosedate, salesstage, stepname, closeprobability,
       budgetstatus, need, purchasetimeframe, purchaseprocess, decisionmaker,
       description, currentsituation, customerneed, customerpainpoints,
       proposedsolution, msdyn_opportunityscore, msdyn_forecastcategory,
       createdon, modifiedon, ownerid, statecode
FROM opportunity
WHERE opportunityid = '[opportunity_id]'

1.2 Get Account Information:

SELECT accountid, name, industrycode, numberofemployees, revenue,
       telephone1, emailaddress1, websiteurl, primarycontactid
FROM account
WHERE accountid = '[accountid from opportunity]'

1.3 Get Related Contacts:

SELECT contactid, fullname, jobtitle, emailaddress1, telephone1,
       accountrolecode, msdyn_decisioninfluencetag
FROM contact
WHERE accountid = '[accountid]'
Step 2: Analyze Activity History

2.1 Get All Activities:

SELECT activityid, activitytypecode, subject, description,
       createdon, actualstart, actualend, statecode, statuscode,
       prioritycode, ownerid
FROM activitypointer
WHERE regardingobjectid = '[opportunityid]'
ORDER BY createdon DESC

2.2 Categorize Activities:

Activity TypeCodeEngagement Level
Meeting/AppointmentappointmentHigh
Phone CallphonecallHigh
EmailemailMedium
TasktaskLow (internal)

2.3 Calculate Engagement Metrics:

Activity Summary:
- Total Activities: [count]
- Last 30 Days: [count]
- Activity Types: [breakdown]
- Last Activity: [date and type]
- Days Since Last Activity: [N]

Engagement Trend:
- Week 1: [count]
- Week 2: [count]
- Week 3: [count]
- Week 4: [count]
- Trend: [Increasing/Stable/Declining]

2.4 Analyze Activity Content: Look for key themes in activity descriptions and subjects:

  • Competitor mentions
  • Objection indicators
  • Positive signals ("interested", "excited", "moving forward")
  • Negative signals ("concern", "budget freeze", "competitor")
  • Stakeholder engagement (who was involved)
Step 3: Assess Stakeholder Engagement

3.1 Map Stakeholder Involvement:

For each contact at the account, determine:
- Last interaction date
- Interaction count
- Role (Decision Maker, Influencer, Champion, Blocker, User)
- Engagement level (High/Medium/Low/None)

3.2 Identify Stakeholder Gaps:

Check for missing stakeholder engagement:
- Economic Buyer (C-level/VP): [Engaged? Y/N]
- Technical Evaluator: [Engaged? Y/N]
- End User: [Engaged? Y/N]
- Procurement: [Engaged? Y/N] (for late-stage deals)
- Champion: [Identified? Y/N]

Recommended stakeholders to engage: [List]

3.3 Analyze Contact Roles:

SELECT c.contactid, c.fullname, c.jobtitle, c.accountrolecode,
       c.msdyn_decisioninfluencetag
FROM contact c
WHERE c.accountid = '[accountid]'

Map job titles to buying roles:

  • CEO, CFO, VP → Economic Buyer
  • Director, Manager → Influencer/Champion
  • Engineer, Analyst → Technical Evaluator/User
Step 4: Find Similar Won Opportunities

Important: Dataverse SQL Limitations Dataverse SQL does NOT support: subqueries, DATEADD(), GETUTCDATE(), HAVING, DISTINCT, UNION, CASE. Calculate date filters programmatically (e.g., '2024-03-01' for 2 years ago).

4.1 Query Successful Deals:

SELECT opportunityid, name, accountid, estimatedvalue, actualvalue,
       salesstage, actualclosedate, createdon,
       budgetstatus, need, purchasetimeframe
FROM opportunity
WHERE statecode = 1
AND actualclosedate > '2024-03-01'

To get industry from related account, use a JOIN:

SELECT o.opportunityid, o.name, o.estimatedvalue, a.industrycode, a.numberofemployees
FROM opportunity o
JOIN account a ON o.accountid = a.accountid
WHERE o.statecode = 1
AND o.actualclosedate > '2024-03-01'

4.2 Define Similarity Criteria:

FactorWeightMatching Logic
Deal Size25%Similar estimated value (±30%)
Industry20%Same industry code
Sales Stage20%Currently in same stage
Company Size15%Similar employee count
Qualification20%Similar BANT profile

4.3 Score Similarity: For each won deal, calculate similarity to current opportunity:

similarity_score = (
  size_match_score * 0.25 +
  industry_match_score * 0.20 +
  stage_match_score * 0.20 +
  company_match_score * 0.15 +
  qualification_match_score * 0.20
)

Select top 5-10 most similar won opportunities.

Step 5: Analyze Winning Patterns

5.1 Activity Pattern Analysis: For each similar won deal, get activity history:

SELECT activitytypecode, COUNT(*) as count, 
       MIN(createdon) as first_activity,
       MAX(createdon) as last_activity
FROM activitypointer
WHERE regardingobjectid = '[won_opportunity_id]'
GROUP BY activitytypecode

5.2 Identify Stage-Specific Success Actions: For deals that were in the same stage:

Calculate for each similar won deal at this stage:
- What activity type came next?
- How long did they spend in this stage?
- What was the outcome?
- Which stakeholders were engaged?

5.3 Build Action Recommendations: Aggregate patterns from successful deals:

When similar deals were in [Current Stage]:
- 75% had a demo/presentation next
- 60% engaged the economic buyer
- 50% sent a proposal within 2 weeks
- Average time in stage: 14 days
Step 6: Generate Recommendations

6.1 Primary Recommendation Engine:

Based on opportunity state and winning patterns, recommend:

If Stage = Qualify:

Priority Actions:
1. Complete qualification (BANT gaps identified)
2. Identify and engage decision maker
3. Schedule discovery meeting
4. Understand competitive landscape

If Stage = Develop:

Priority Actions:
1. Demonstrate product/solution fit
2. Expand stakeholder map
3. Address technical requirements
4. Build internal champion

If Stage = Propose:

Priority Actions:
1. Present formal proposal
2. Handle objections
3. Engage procurement/legal
4. Negotiate terms

If Stage = Close:

Priority Actions:
1. Finalize contract details
2. Get verbal commitment
3. Process signatures
4. Address last-minute concerns

6.2 Specific Action Recommendation:

Based on analysis, provide ONE primary next action:

NEXT BEST ACTION RECOMMENDATION
════════════════════════════════════════════════════

OPPORTUNITY: [Name]
CURRENT STAGE: [Stage]
TIME IN STAGE: [X days]
HEALTH SCORE: [X/100]

════════════════════════════════════════════════════
RECOMMENDED NEXT ACTION
════════════════════════════════════════════════════

📌 [SPECIFIC ACTION]

Example: "Schedule a meeting with Sarah Chen (VP Operations) to present ROI analysis"

WHY THIS ACTION:
• Similar won deals had [X% higher close rate] when economic buyer was engaged at this stage
• Sarah Chen is the VP Operations and likely economic buyer (not yet engaged)
• You've had 4 interactions with technical team but none with leadership
• Competitive intelligence suggests prospect is evaluating alternatives

WHAT SUCCESSFUL DEALS DID:
• 78% of similar won deals engaged executive sponsor before Propose stage
• Average of 2.3 executive meetings before close
• Deals with VP+ engagement closed 40% faster

HOW TO EXECUTE:
1. Ask your champion [Contact Name] for an introduction to Sarah Chen
2. Prepare executive-level ROI summary (attach template)
3. Propose 30-minute business value discussion
4. Bring in your sales leader for executive alignment

TALKING POINTS:
• Business outcomes achieved by [Similar Customer in same industry]
• ROI: [X]% improvement in [metric] over [timeframe]
• Risk of inaction: [competitive/market pressure point]

SUGGESTED TIMELINE:
• Reach out to champion: Today
• Executive meeting: Within 1 week
• This will enable: Moving to [Next Stage] in 2 weeks

6.3 Alternative Actions:

ALTERNATIVE ACTIONS (if primary not feasible):
════════════════════════════════════════════════════

Option B: Schedule Technical Deep-Dive
• If champion unavailable, continue building technical consensus
• Request meeting with IT/Engineering stakeholders
• Demonstrate integration capabilities

Option C: Send Case Study
• If scheduling difficult, send relevant customer success story
• Focus on [Industry] case study showing [specific outcome]
• Request follow-up call to discuss applicability
Step 7: Create Activity Record

Offer to create the recommended activity:

If Recommending a Meeting:

Use create_record with tablename: appointment
{
  "subject": "[Generated meeting subject]",
  "description": "[Context and talking points]",
  "regardingobjectid": "[opportunityid]",
  "scheduledstart": "[suggested datetime]",
  "scheduledend": "[end datetime]",
  "requiredattendees": "[contact ids]",
  "location": "[virtual/in-person]"
}

If Recommending a Call:

Use create_record with tablename: phonecall
{
  "subject": "[Generated call subject]",
  "description": "[Context and talking points]",
  "regardingobjectid": "[opportunityid]",
  "phonenumber": "[contact phone]",
  "to": "[contact id]",
  "scheduledstart": "[suggested datetime]"
}

If Recommending a Task:

Use create_record with tablename: task
{
  "subject": "[Task description]",
  "description": "[Details and context]",
  "regardingobjectid": "[opportunityid]",
  "scheduledend": "[due date]",
  "prioritycode": 2
}

Output Format Summary

════════════════════════════════════════════════════
NEXT BEST ACTION ANALYSIS: [Opportunity Name]
════════════════════════════════════════════════════

CURRENT STATE:
• Stage: [Stage]
• Value: [$X]
• Close Date: [Date]
• Time in Stage: [X days]
• Last Activity: [X days ago] - [Type]
• Engagement Trend: [Increasing/Declining/Stable]

QUALIFICATION STATUS:
• Budget: [✓/⚠/✗] [Status]
• Authority: [✓/⚠/✗] [Decision maker identified?]
• Need: [✓/⚠/✗] [Status]
• Timeline: [✓/⚠/✗] [Status]

STAKEHOLDER MAP:
• Economic Buyer: [Name or "Not engaged"]
• Champion: [Name or "Not identified"]
• Technical: [Name or "Engaged/Not engaged"]
• Users: [Status]

COMPETITIVE CONTEXT:
• Competitors: [Mentioned/None detected]
• Risk Level: [Low/Medium/High]

════════════════════════════════════════════════════
🎯 RECOMMENDED NEXT ACTION
════════════════════════════════════════════════════

[Specific action with reasoning]

BASED ON:
• [X] similar won deals analyzed
• Success pattern: [Key insight]
• Risk mitigation: [What this prevents]

EXECUTION STEPS:
1. [Step 1]
2. [Step 2]
3. [Step 3]

EXPECTED OUTCOME:
• [What this should achieve]
• Target timeline: [X days]

════════════════════════════════════════════════════

Shall I create this activity for you? [Yes/No]

Dataverse Tables Used

TablePurpose
opportunityCurrent opportunity and similar won deals
accountCustomer context
contactStakeholder information
activitypointerActivity history analysis
appointmentCreate recommended meetings
phonecallCreate recommended calls
taskCreate recommended tasks
emailCreate recommended emails

Key Fields Reference

opportunity:

  • salesstage (CHOICE) - Qualify(0), Develop(1), Propose(2), Close(3)
  • stepname (NVARCHAR) - Current business process step
  • estimatedvalue (MONEY) - Deal size for matching
  • actualvalue (MONEY) - Actual revenue (closed deals)
  • estimatedclosedate (DATE) - Expected close date
  • actualclosedate (DATE) - When deal closed (won/lost deals)
  • closeprobability (INT) - Win probability percentage (0-100)
  • budgetstatus (CHOICE) - No Budget(0), May Buy(1), Can Buy(2), Will Buy(3)
  • need (CHOICE) - Must have(0), Should have(1), Good to have(2), No need(3)
  • purchasetimeframe (CHOICE) - Immediate(0), This Quarter(1), Next Quarter(2), This Year(3), Unknown(4)
  • msdyn_opportunityscore (INT) - AI predictive score (0-100)
  • msdyn_opportunitygrade (CHOICE) - Grade A(0), B(1), C(2), D(3)
  • msdyn_scorereasons (MULTILINE TEXT) - JSON with scoring factors
  • msdyn_similaropportunities (MULTILINE TEXT) - Similar deals data
  • statecode (STATE) - Open(0), Won(1), Lost(2)
  • statuscode (STATUS) - In Progress(1), On Hold(2) [Open]; Won(3) [Won]; Canceled(4), Out-Sold(5) [Lost]

activitypointer:

  • activitytypecode (NVARCHAR) - phonecall, email, appointment, task
  • createdon (DATETIME) - Activity timestamp
  • actualstart, actualend (DATETIME) - Actual activity times
  • regardingobjectid (LOOKUP) - Polymorphic link to opportunity
  • statecode (STATE) - Open(0), Completed(1), Canceled(2), Scheduled(3-appointments)

contact:

  • accountrolecode (CHOICE) - Decision Maker(1), Employee(2), Influencer(3)
  • msdyn_decisioninfluencetag (CHOICE) - Decision maker(0), Influencer(1), Blocker(2), Unknown(3)
  • jobtitle (NVARCHAR) - For role inference
  • accountid (LOOKUP → account) - Parent account relationship

msdyn_opportunitykpiitem (Sales Insights - Relationship Analytics):

  • msdyn_relationshiphealthscorevalue (INT) - Health score (0-100)
  • msdyn_relationshiphealthscorestate (CHOICE) - Good(0), Fair(1), Poor(2)
  • msdyn_emailssent, msdyn_emailsreceived (INT) - Email counts
  • msdyn_phonecallsmade, msdyn_phonecallsreceived (INT) - Call counts
  • msdyn_meetingssent (INT) - Meeting counts

Next Best Action Categories

StageTop ActionsTrigger Conditions
QualifyDiscovery call, DemoNew lead, incomplete BANT
DevelopTechnical deep-dive, Proof of conceptRequirements gathering needed
ProposeProposal presentation, ROI reviewSolution validated
CloseContract review, Executive alignmentVerbal commitment obtained

Success Metrics to Track

  • Time to next stage after action taken
  • Win rate correlation with action types
  • Average activities by stage for won vs lost
  • Stakeholder engagement depth at each stage

Examples

Example 1: Stalled Deal Recommendation

User says: "What should I do next on the Contoso Enterprise deal?"

Actions:

  1. Retrieve opportunity details and activity history
  2. Identify current stage (Propose) and last activity (14 days ago)
  3. Compare to won deals - identify missing stakeholder engagement
  4. Generate prioritized recommendation

Result:

NEXT BEST ACTION: Schedule Executive Alignment Meeting

CURRENT SITUATION:
- Stage: Propose (14 days, above average)
- Last Activity: Email sent 14 days ago
- Missing: No C-level engagement identified

WHY THIS ACTION:
- Won deals at this stage had 85% executive engagement
- Economic buyer (CFO) not yet contacted
- Similar deals that stalled here won after exec meeting

SUGGESTED APPROACH:
"Hi [Champion], I'd like to connect with [CFO Name] to discuss how our solution aligns with your strategic priorities. Could you facilitate an introduction?"

Example 2: Early Stage Deal Coaching

User says: "How do I move the Fabrikam deal forward?"

Actions:

  1. Analyze current qualification status
  2. Identify BANT gaps
  3. Recommend discovery activities

Result:

NEXT BEST ACTION: Schedule Discovery Call

GAPS IDENTIFIED:
- Budget: Not confirmed
- Timeline: Unknown

RECOMMENDED QUESTIONS:
1. "What's your budget range for this initiative?"
2. "When do you need a solution in place?"

SCHEDULE: Suggested times sent to contact

Example 3: Close Stage Acceleration

User says: "What's blocking the Alpine deal from closing?"

Actions:

  1. Analyze close stage opportunity
  2. Check for missing elements vs. won deals
  3. Identify potential blockers

Result:

POTENTIAL BLOCKERS IDENTIFIED:
1. No legal contact engaged (90% of won deals had legal by now)
2. Procurement not in activity history
3. Close date is Friday but no contract sent

RECOMMENDED ACTIONS:
1. Request introduction to procurement contact
2. Send contract for review today
3. Offer implementation timeline to address concerns

Troubleshooting

Error: Opportunity not found

Cause: Invalid opportunity ID or deal has been closed Solution:

  • Search by opportunity name instead
  • Check statecode to see if deal is already won/lost
  • Verify user has access to the record

Error: No similar won deals found

Cause: Unique deal characteristics or limited history Solution:

  • Expand matching criteria (industry, size range)
  • Use generic stage-based best practices
  • Increase date range for historical comparison

Error: Activity history incomplete

Cause: Activities not linked to opportunity Solution:

  • Query activities for related account as well
  • Check team member activities (not just owner)
  • Advise user on proper activity linking

Veelgestelde vragen

Wat doet de AI-skill Next Best Action Engine?

Analyzes an opportunity's current state and engagement history, compares against won deals, and recommends the most effective next action with reasoning. Use when user asks "what should I do next on this deal", "next steps for this opportunity", "how do I move this deal forward", "what's the best action for this opp", "deal coaching", or "opportunity next action".

Waarom Next Best Action Engine gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Next Best Action Engine bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Next Best Action Engine in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/microsoft/dataverse-business-skills/tree/main/skills/next-best-action-engine. TypingMind leest het bestand SKILL.md en installeert het als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Next Best Action Engine gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Next Best Action Engine gebruiken?

Zoveel als je wilt. Je kunt Next Best Action Engine gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Next Best Action Engine gratis?

Ja. Deze skill is door microsoft op GitHub gepubliceerd onder de licentie MIT. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇