A new perspective on connected selling. CRM. Conversations. Your next move.Explore 10 in-depth guides ↗

Selling API developer guide

Start with a clear contract.

A practical developer guide for turning sales events into reliable workflows. Define the data, the permission, and the result before connecting a live system.

What is available in this edition?

This website includes static HTML guides, original SVG artwork, and four browser tools. There is no hosted SellingAPI.com API endpoint, account service, or credential exchange in this package. The examples below are application design examples that you can adapt to a provider-backed system.

Use the event sandbox to test how a payload might look. It never sends the event. The lead-score tool applies a visible mathematical rule, the prompt studio assembles instructions, and the conversation tool follows predefined branches.

A small, inspectable event contract

Start with the identity of the event and the identity of the record. They solve different problems: a stable event identifier can help detect a repeated delivery, while a stable lead identifier connects changes to one record. Record the schema version so consumers can interpret changes deliberately.

Illustrative event · JSON
{
  "schema_version": "1.0",
  "event_id": "evt_example_001",
  "event_type": "lead.created",
  "mode": "local_example",
  "payload": {
    "lead_id": "lead_example_001",
    "company": "Example Company",
    "owner": "Sales team",
    "contact_allowed": false
  }
}

The contact_allowed field is a simplified demonstration value. A production system needs evidence of the relevant permission, its scope, source, and updates. Treat a field supplied by a client as a claim to verify rather than automatic authority.

Agree on ownership before syncing

FieldPurposeImplementation question
event_idIdentify one eventHow are retries recognized?
lead_idIdentify the sales recordWhich system owns the identity?
ownerName the review pathWho can change ownership?
contact_allowedDemonstrate a routing conditionWhere is the underlying evidence?

Salesforce documents upserting records using an external ID. Plan the external identifier and conflict behavior before building a synchronization loop. Your field mapping should say which system wins when values disagree.

A score you can inspect

The app’s score is deliberately simple. It clamps three numeric inputs to the range 0–100, combines their weighted contributions, and rounds the total. You can inspect every part of the result; the rule does not claim to estimate a probability of purchase.

Illustrative scoring function · JavaScript
function scoreLead(fit, intent, relationship) {
  const clamp = (value) => Math.min(100, Math.max(0, Number(value) || 0));
  return Math.round(
    clamp(fit) * 0.4 +
    clamp(intent) * 0.4 +
    clamp(relationship) * 0.2
  );
}

scoreLead(75, 65, 50); // 66: illustrative score

The production connection

Authenticate on a trusted server

Keep provider secrets out of HTML and browser JavaScript. Separate user intent from the authority to act. Follow each provider’s authentication and product-access documentation.

Validate before changing records

Check incoming payload shape, permissions, record identity, and approved actions. A model-generated argument or a parsed JSON object still needs application-level validation.

Make retries observable

Record event handling results. Plan idempotency, backoff, failed-event review, and reconciliation so an interrupted workflow has a clear recovery path.

Measure the actual handoff

Test whether the right record changed, the right person could review it, and the customer received a useful next step. Keep those outcomes distinct from an API returning success.

For concrete implementation details, start with Stripe’s webhook guidance, OpenAI’s function-calling documentation, and the provider sources in each integration guide. Their APIs have different contracts; this site’s sample schema is not a replacement for those contracts.

About the static website package

All site files live in the same directory. Upload or extract them into your web server’s public folder so index.html is at the root. No Node runtime, database, package installation, or build command is required to serve this edition.

The package contains a deployment readme, a page inventory, and a verification report. Canonical URLs, structured data, and feed entries use https://sellingapi.com/. Configure that hostname and HTTPS at your hosting provider before public launch.

Make the contract concrete.

Build a sample event and inspect the result before planning a live integration.

Open event sandbox