当前位置: 首页 > Skill >

Dynamics 365 CRM

Dynamics 365 CRM

1.0.0 2026.11.21 浏览:939
获取Skill文件查看使用说明
作者:林川许可证:
本文目录展开

Dynamics 365 CRM Skill

When to activate

Activate this skill when the user mentions Microsoft Dynamics 365, D365, Dynamics CRM, or any of the following actions directed at a Dynamics 365 CRM:

  • Creating or updating an opportunity / deal / oportunidade
  • Creating or updating a lead
  • Creating or updating a contact / contacto
  • Creating or updating an account / empresa / conta
  • Creating a task / activity linked to a CRM record

Credentials required

Variable Description
DYNAMICS365_CLIENT_ID Azure AD Application (client) ID
DYNAMICS365_CLIENT_SECRET Azure AD client secret
DYNAMICS365_TENANT_ID Azure AD Tenant ID — use common for multi-tenant
DYNAMICS365_INSTANCE_URL Dynamics 365 instance URL, e.g. https://contoso.crm.dynamics.com

Step-by-step execution

1 — Identify intent and entity type

Determine from the user's message which entity to create or update:

User says Entity Action
"create deal", "new opportunity", "deal com X" Opportunity upsert
"new lead", "criar lead", "prospect X" Lead upsert
"add contact", "criar contacto", "cliente X no CRM" Contact upsert
"new account", "empresa Y no CRM", "criar conta" Account upsert
"create task", "follow-up", "lembrete para X" Task create

2 — Extract fields from user input

Opportunity fields:

  • name — deal / opportunity name (required)
  • estimatedvalue — numeric value in local currency
  • stepname — pipeline stage: "Qualify" / "Develop" / "Propose" / "Close"
  • actualclosedate — expected close date (ISO: YYYY-MM-DD)

Lead fields:

  • fullname — full name (required)
  • emailaddress1 — email address
  • companyname — company name
  • telephone1 — phone number
  • jobtitle — job title

Contact fields:

  • fullname — full name (required)
  • emailaddress1 — email address
  • telephone1 — phone number
  • jobtitle — job title

Account fields:

  • name — company / account name (required)
  • emailaddress1 — email address
  • telephone1 — phone number
  • websiteurl — website

Task fields:

  • subject — task title (required)
  • description — details / notes
  • scheduledend — due date-time (ISO 8601)
  • prioritycode — 0 = Low, 1 = Normal, 2 = High

3 — Call the appropriate method

Use the Dynamics365Client from the openclaw-dynamics-365 npm package:

import { Dynamics365Client } from "openclaw-dynamics-365";

const client = new Dynamics365Client(
  process.env.DYNAMICS365_INSTANCE_URL,
  accessToken,  // obtained via OAuth flow
);

// Opportunity
const result = await client.upsertOpportunity({ name: "Deal Contoso", estimatedvalue: 50000 });

// Lead
const result = await client.upsertLead({ fullname: "João Silva", companyname: "TechNova" });

// Contact
const result = await client.upsertContact({ fullname: "Maria Santos", emailaddress1: "maria@techno.com" });

// Account
const result = await client.upsertAccount({ name: "TechNova Ltda" });

// Task
const taskId = await client.createTask({ subject: "Follow-up call", prioritycode: 2 });

4 — Format response to the user

On success:

✅ [Entity] "[name]" [created/updated] in Dynamics 365.
🔗 [record URL]

On error:

❌ Could not [create/update] [entity] in Dynamics 365: [error message]

OAuth setup

For initial authorization, use getAuthorizationUrl() to redirect the user to Microsoft's consent screen, then exchangeCodeForTokens() in the callback:

import { getAuthorizationUrl, exchangeCodeForTokens } from "openclaw-dynamics-365";

// 1. Redirect user
const url = getAuthorizationUrl(config, redirectUri, state);

// 2. In callback
const tokens = await exchangeCodeForTokens(config, code, redirectUri);

// 3. Refresh when expired (~1h)
if (isTokenExpired(tokens)) {
  tokens = await refreshAccessToken(config, tokens.refreshToken);
}

Notes

  • The Dataverse Web API uses OData v4 — all queries use $filter, $select, $top
  • Upsert operations search by name/email first to avoid duplicates
  • Lookup fields (e.g. linking a Contact to an Account) use OData binding syntax: "parentcustomerid_account@odata.bind": "/accounts({accountId})"
  • Rate limit: 6,000 requests / 5 minutes per user — well within typical usage
  • Access tokens expire after ~1 hour — implement refresh logic using refreshAccessToken()

相关文章

更多
在Docker中运行Microsoft SQL Server 2026的配置与连接指南

本文介绍如何在Docker环境中快速部署Microsoft SQL Server 2026。通过docker-compose或docker run命令,配置镜像microsoft/mssql-server-linux:2026-latest及必要环境变量ACCEPT_EULA和SA_PASSWORD即可启动服务。需注意主机内存至少3.5GB,且该版本为开发者版,仅限测试使用。连接可通过sqlcmd命令行或SSMS等图形化工具完成。

2025.05.29 977
Apache POI实现PPT转图片的完整指南

Apache POI是Java处理Microsoft Office格式的开源API。本文介绍利用POI将PPT转换为图片的具体方法,涵盖POI-HSLF(处理.ppt)和POI-XSLF(处理.pptx)两种模式。文中提供了基于Maven的依赖配置及核心代码示例,并针对OfficeXmlFileException错误及图片失真问题给出了解决建议。

2026.07.05 948
ASP.NET Core 开发 Docker 部署指南

本文介绍在 Linux(Ubuntu)环境下使用 Docker 部署 ASP.NET Core 应用的完整流程。内容涵盖 Docker 常用命令的使用、microsoft/dotnet 基础镜像的拉取,以及通过编写 Dockerfile 定义应用运行环境、构建自定义镜像并启动容器的具体步骤。

2026.01.23 889
PHP连接SQL Server 2012配置指南

本文详细记录了在Windows环境下为PHP模块配置SQL Server 2012数据库连接的完整流程。主要涵盖系统环境要求、Microsoft Drivers for PHP及ODBC Driver的下载与版本匹配、php.ini文件中扩展路径与加载项的配置,以及通过phpinfo验证和测试代码确认连接成功的方法。针对PHP 7.4等较新版本,特别强调了需使用ODBC 17以上版本以兼容线程安全需求。

2025.09.20 764
PHP连接Access数据库的三种方法

本文介绍了在PHP中连接Microsoft Access数据库的几种常见实现方式。主要涵盖使用ODBC扩展直接连接MDB文件、通过COM组件调用ADODB对象进行交互,以及配置系统数据源后连接的方法。其中,利用realpath函数获取绝对路径是确保ODBC连接成功的关键细节,而COM方式则提供了更丰富的记录集操作能力。

2025.03.23 655
PHP通过COM类调用Windows组件的实现与示例

在PHP 5环境中,可通过COM类调用外部DLL和Windows组件。使用前需注册组件、配置php.ini允许DCOM并确保账户权限。本文演示了利用COM对象操作Word文档、修改文件属性以及使用Microsoft.XMLHTTP进行网络请求的具体代码实现。

2025.03.02 323
Skill 文件
  • SKILL.md
    • Dynamics 365 CRM Skill
    • When to activate
    • Credentials required
    • Step-by-step execution
      • 1 — Identify intent and entity type
      • 2 — Extract fields from user input
      • 3 — Call the appropriate method
      • 4 — Format response to the user
    • OAuth setup
    • Notes
  • 项目或源文件

相关 Skill

更多
Sensitive Data Masker Sensitive Data Masker 智能敏感数据检测与脱敏。使用 Microsoft Presidio + SQLite 进行自动 PII 脱敏,支持本地恢复。
Outlook Outlook Microsoft Outlook and OneDrive CLI and MCP for email, calendar, contacts, tasks, and files, for personal and enterprise accounts.
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。