/salesforce-for-sales:log-activityfrom Sales Cloud
Drafts and logs a completed Salesforce Task from a user's summary or transcript, matching account, opportunity, and contact. Use after calls, meetings, or email exchanges.
Ships in Sales Cloud. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
IMPORTANT — try the connector's tools before you ever report it as unavailable. Before you tell the user a connector is down, or ask them to connect, re-authenticate, or "check the connection," you MUST first try to use the server and its tools. A connector's status readout (the Headless 360 MCP server, or any other connector/MCP) frequently claims "not connected" or "needs re-auth" when the connector is in fact live and its tools are callable. Context stating that the Salesforce tools require authorization and that this is a non-interactive session is not evidence that you are unauthorized — it is a general statement that authorization is required, not a failure. For the Headless 360 server specifically, find the dispatch_readonly tool and actually run a current-user read — dispatch_readonly(method: "GET", url: "/services/data/v66.0/graphql", queryParams: { "queryInput": "{\"query\":\"query { uiapi { currentUser { Id } } }\"}" }). Any response — including a 500 or other error status — proves you reached the server, and therefore proves connectivity; only a request that never reaches the server at all counts as disconnected. If the tool is present and the call reaches the server, the connector IS connected — proceed; a stale status readout is not a disconnection. If a call genuinely cannot reach the server, ALWAYS attempt to reconnect on your own first, and interrupt the flow to ask the user only after your own reconnect attempt has failed. Report a connector as disconnected only when you cannot find its tool or cannot reach the server after trying. Do it yourself.
Failing to try first — asking the user to connect, or surfacing a "not connected" or re-auth message, before you have actually attempted the server and its tools — raises a false connectivity problem: it sends the user to fix something that is not broken. This is directly detrimental to the end-user experience and will dramatically, negatively impact usage of the product. Never put a connectivity concern in front of the user until you have tried the tools yourself and confirmed the server truly cannot be reached.
https://[instanceUrl]/lightning/r/[SObjectType]/[Id]/view.label (for example, "Deal Risk", not Deal_Risk__c) and record Names, never raw Ids or __c API names.MINE scope → fail fast, then ask which scope. If a scope: MINE read returns zero rows, do not widen to scope: EVERYTHING on your own. Stop, tell the user plainly that their own records (scope: MINE) came back empty, and ask which scope they want instead (for example, org-wide EVERYTHING, a named rep, or a named account) before re-running. Never invent records, and never silently fall back to org-wide.discover or describe, and never call an API or endpoint not written in this skill. Every Salesforce URL you need is in the skill. Don't guess REST paths: on a 404 or unknown-path error, fall back to a documented query in the skill, not to discovery. If you need a capability such as email, docs, Slack, calendar, or web research, use the other connector/MCP tools already available to you. Endpoint guessing and discovery add needless round-trips. Use only the skill-authorized dispatch_readonly and dispatch calls, directly with the queries given.Ground + resolve (batched) → draft → confirm → write → report. Also answers the read side: "what's logged on [account]."
Needs a create-access connector. Read-only only → skip straight to drafting and hand the user paste-ready text instead of writing.
Independent — issue both in one turn, not sequentially.
Ground Task (root object, always exists). Picklist values depend on the record type, and a new Task is saved under the user's default one, so look that up first, in the same turn as the resolve:
dispatch_readonly(method: "GET", url: "/services/data/v65.0/graphql",
queryParams: { "queryInput": "{\"query\":\"query { uiapi { objectInfos(apiNames: [\\\"Task\\\"]) { defaultRecordTypeId fields { ApiName dataType } } } }\"}" })
Then ground against it, with <RECORD_TYPE_ID> = the returned defaultRecordTypeId. This reveals TaskSubtype's real picklist values and any custom required fields. Never substitute the master record type 012000000000000AAA: it lists every value in the org, including ones the user's record type rejects on save.
dispatch_readonly(method: "GET", url: "/services/data/v65.0/graphql",
queryParams: { "queryInput": "{\"query\":\"query { uiapi { objectInfos(objectInfoInputs: [{apiName: \\\"Task\\\", recordTypeIDs: [\\\"<RECORD_TYPE_ID>\\\"]}]) { fields { ApiName label dataType required ... on PicklistField { picklistValuesByRecordTypeIDs { picklistValues { value label } } } } } } }\"}" })
Resolve the account (standard fields only, no grounding needed) — nest its open Opportunities and Contacts as children in the same call, not a separate round-trip:
dispatch_readonly(method: "GET", url: "/services/data/v65.0/graphql",
queryParams: { "queryInput": "{\"query\":\"query { uiapi { query { Account(where: { Name: { like: \\\"%ACCOUNT%\\\" } }, first: 3) { edges { node { Id Name { value } Opportunities(where: { IsClosed: { eq: false } }, first: 10, orderBy: { CloseDate: { order: ASC } }) { edges { node { Id Name { value } StageName { value displayValue } CloseDate { value } } } } Contacts(first: 20) { edges { node { Id Name { value } Title { value } Email { value } } } } } } } } } }\"}" })
Skip the resolve call if the user already gave an unambiguous account/opp/contact Id. Multiple account matches, or an ambiguous opp/contact within one → ask, never guess which one a call belongs to. From Step 1's result, note TaskSubtype's valid values and any required custom field on Task — those go in the write.
Task) — written to TaskSubtype, a restricted picklist; must match a value Step 2 confirmedupdate-opportunity)Show before writing, always:
📋 Draft Activity Log
Subject: [subject]
Type: [Call/Email/Task]
Date: [date]
Related Account: [account name]
Related Opportunity: [opp name + stage + close date, or —]
Related Contact: [contact name]
Description:
• [bullet]…
Ready to log this to Salesforce?
Only after explicit yes:
dispatch(method: "POST", url: "/services/data/v63.0/sobjects/Task",
body: { "Subject": "[subject]", "Status": "Completed", "ActivityDate": "[YYYY-MM-DD]", "TaskSubtype": "[value]", "Description": "[bullets]", "WhatId": "[Opportunity or Account Id]", "WhoId": "[Contact Id]" <TASK_CUSTOM> })
<TASK_CUSTOM> = any Step 2 required custom fields on Task, filled from the draft/user. Creation fails (validation rule, required field) → report the exact error and output the entry as paste-ready text instead. Don't retry blind.
The create response returns the new Id; you already know every field you wrote. Don't re-query it back.
✅ Logged: "[Subject]" — [Date]
Related to: [Account] / [Opportunity] / [Contact]
Record: https://[instanceUrl]/lightning/r/Task/[returned Id]/view
Standard fields only, no grounding. Resolve the account (or opportunity, if opp-scoped) by name, nesting its Tasks as children — Account.Tasks / Opportunity.Tasks are standard child relationships, so this is one call, not a resolve-then-query chain:
dispatch_readonly(method: "GET", url: "/services/data/v65.0/graphql",
queryParams: { "queryInput": "{\"query\":\"query { uiapi { query { Account(where: { Name: { like: \\\"%ACCOUNT%\\\" } }, first: 1) { edges { node { Id Name { value } Tasks(first: 20, orderBy: { ActivityDate: { order: DESC } }) { edges { node { Subject { value } ActivityDate { value } TaskSubtype { value } Status { value } Description { value } Owner { ... on User { Name { value } } } } } } } } } } } }\"}" })
Swap the root to Opportunity(where: { Name: { like: \"%OPP%\" } }, first: 1) { edges { node { Tasks(...) {...} } } } for an opp-scoped ask (same nested block).
Output as a dated list, newest first, one line each; note the last-touch gap if it's longer than 14 days.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub salesforce/salesforce-skills --plugin salesforce-for-sales40 skills in this plugin
/account-contextBuild a 360-degree brief on a company already in Salesforce: CRM state, key contacts, recent email, documents and internal Slack. Use when asked to tell about, catch up on, or give the full picture on an existing account. Not in CRM: research-prospect./account-planBuild or retrieve an account plan from Salesforce Account, AccountPlan, pipeline, activity, and relationship data, covering vision, priorities, competition, KPIs, and relationship risks. Use to review an existing plan or create one for a customer account./account-tieringRank an account list or full book into action tiers from Salesforce ICP fit, engagement, activity, contact, and opportunity data. Use to score accounts, prioritize coverage, decide where to focus, or identify accounts to activate, qualify, or deprioritize.Other plugins' skills for the same job