SafetyDataSheetAPI is a product of Dscvry. Explore Dscvry →

Integration

Salesforce SDS Workflow Pattern

Keep the extraction call outside Salesforce, store the result in a custom object, and use a review step for anything uncertain.

Last updated: 2026-10-24

What this page is. An integration pattern, not a product. We do not ship or claim a certified connector for this platform; the API is a REST service that takes a multipart PDF upload, so any integration layer that can send multipart requests and read JSON can use it.

Put the multipart call in middleware

The API needs a multipart/form-data upload of the PDF. That is awkward to build inside Salesforce: in Apex you assemble the multipart body by hand, and synchronous callouts are bound by heap and request size limits (check the current Apex limits). The simpler pattern is a small service or integration platform that receives the file, calls the API, and then writes the JSON result to Salesforce through its REST API.

A data model to start from

Field on a custom object (for example SDS_Extraction__c)Holds
Request_Id__c (unique external ID)The API's request_id, so reruns upsert instead of duplicating.
Confidence__c (number)confidence_score.
Status__c (picklist)Staged, In review, Approved, Rejected.
Warnings__c (long text)The warnings list.
Product__c (lookup)The related product, once matched.
PayloadThe JSON itself, as a file or long text.

A Long Text Area field holds at most 131,072 characters, and a full extraction can be larger than that. Store the JSON as a file attached to the record, and copy the few values you report on (product name, UN number, hazard statements) into their own fields.

A review flow

  1. The middleware writes each extraction with Status__c = Staged, upserting on Request_Id__c.
  2. A record-triggered flow sets In review when Warnings__c is not empty or Confidence__c is below your threshold, and assigns it to a queue.
  3. A reviewer compares the record with the source PDF and approves or rejects it.
  4. Approved records update the product and notify the owner.

Practical points

  • Keep the API key in the middleware's secret store, not in Salesforce metadata.
  • Use an Idempotency-Key for bulk submissions so a retry does not create a second job.
  • Webhooks need a public HTTPS callback_url, so a middleware endpoint is the natural receiver. Verify the X-Webhook-Signature before trusting a payload.
  • Concentrations such as 95-100 are strings, so parse them before they reach a number field.

How you get access: the free sample upload on the homepage needs no key, the self-serve plan issues an API key after signup, and enterprise customers get a dedicated deployment with its own base URL. See pricing.

FAQ

Is there a Salesforce package?

No. We publish a REST API and an OpenAPI contract. This page describes a pattern you build with middleware and your own objects.

Can Apex call the API directly?

It can make the HTTPS call, but the multipart body must be assembled by hand and callouts have size limits, so most teams use middleware for the upload.

How do we stop duplicate records?

Make Request_Id__c a unique external ID and upsert on it, and use an idempotency key for bulk submissions.

Related pages

Want to see it on your own document? Try a sample SDS or request an implementation plan.