How to Summarise Salesforce with Claude Code

Use EnConvert Distill to extract structured data from Salesforce Help articles into a Claude Code pipeline from up to 50 URLs in one synchronous API call

Get API key

A developer building a Claude Code pipeline over Salesforce Help or Knowledge articles needs structured article data, meaning title, body, article type, and product area, before passing it into the Claude context window. Salesforce Help articles mix the content with navigation, sidebars, and related article links, and scraping them by hand means CSS selectors that break when Salesforce updates its theme. EnConvert’s Distill endpoint takes up to 50 Salesforce article URLs and a schema defining the fields you need, and returns a results array with each URL’s data normalised to exactly that schema in one synchronous call. The developer gets structured article data ready to pass into the Claude context window, with no HTML parsing.

Example

python
import os

import anthropic
import requests

BASE_URL = "https://api.enconvert.com/v2"
headers = {
    "X-API-Key": os.environ["ENCONVERT_API_KEY"],
    "Content-Type": "application/json",
}

article_urls = [
    "https://help.salesforce.com/s/articleView?id=sf.flow_concepts.htm&type=5",
    "https://help.salesforce.com/s/articleView?id=sf.custom_object_overview.htm&type=5",
    "https://help.salesforce.com/s/articleView?id=sf.users_permissions_overview.htm&type=5",
]

# One synchronous call: no job_id, no polling, no download step
response = requests.post(
    f"{BASE_URL}/distill",
    headers=headers,
    json={
        "urls": article_urls,
        "schema": {
            "title": "The article title",
            "body": "The full article body text, excluding navigation and sidebars",
            "article_type": "Whether this is a Help documentation article or a Knowledge article",
            "product_area": "The Salesforce product or feature area the article covers",
        },
    },
    timeout=120,  # increase for larger batches
)

# Distill is available on paid plans only, and the free tier returns 402
if response.status_code == 402:
    raise RuntimeError("Distill requires a paid plan")
response.raise_for_status()

# Failed pages come back as rows with a failed status, not as errors
articles = []
for result in response.json()["results"]:
    if result["status"] != "completed":
        print(f"Skipped {result['url']}: {result['status']}")
        continue

    if result.get("render_quality", 1.0) < 0.5:
        # a low score can mean a login wall or challenge page
        print(f"Low render quality for {result['url']}: {result['render_quality']}")
        continue

    data = result.get("data") or {}  # keys match schema exactly: title, body, article_type, product_area
    articles.append(
        f"Source: {result['url']}\n"
        f"Title: {data.get('title')}\n"
        f"Type: {data.get('article_type')}\n"
        f"Product area: {data.get('product_area')}\n\n"
        f"{data.get('body')}"
    )

if not articles:
    raise RuntimeError("No Salesforce articles passed extraction checks")

# Pass the extracted data into the Claude context window
client = anthropic.Anthropic(api_key=os.environ["ANTHROPIC_API_KEY"])
message = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=4096,
    system=(
        "You answer questions about Salesforce features. Use only the articles provided, "
        "and cite the source URL for every statement you make."
    ),
    messages=[
        {
            "role": "user",
            "content": (
                "Articles:\n\n" + "\n\n---\n\n".join(articles) +
                "\n\nQuestion: Which Salesforce product areas do these articles cover, and what does each one explain?"
            ),
        }
    ],
)

for block in message.content:
    if block.type == "text":
        print(block.text)

What you get back

Distill returns a results array with one entry per URL, each holding a data object normalised to the schema’s keys, which are title, body, article_type, and product_area, regardless of the surrounding navigation or Salesforce theme. Scraping Salesforce Help pages by hand needs CSS selectors that break when Salesforce updates its theme, and passing raw page HTML into the Claude context fills the window with navigation and boilerplate that reduces answer quality.


Distill runs on paid plans only, and the free tier returns a 402 for this endpoint, so the free key covers EnConvert’s other endpoints.

Get free API key — 500 ops per month, no card required.