afv-library/skills/data360-prepare/examples/ingestion-api
2026-06-26 12:21:51 +00:00
..
.env.example feat: Release Skills Renaming by domain first convention @W-23187998@ 2026-06-26 12:21:51 +00:00
README.md feat: Release Skills Renaming by domain first convention @W-23187998@ 2026-06-26 12:21:51 +00:00
send-data.py feat: Release Skills Renaming by domain first convention @W-23187998@ 2026-06-26 12:21:51 +00:00

Ingestion API example

This folder contains a minimal, public-safe example for sending records into Salesforce Data Cloud through the Ingestion API.

What this example assumes

Before running send-data.py, complete the connect/prepare setup steps:

  1. create an Ingestion API connector
  2. upload the schema with sf data360 connection schema-upsert
  3. create the corresponding data stream in the UI if your org requires that step

Related connector definitions live in:

Prerequisites

pip install PyJWT cryptography requests

Setup

cd skills/data360-prepare/examples/ingestion-api
cp .env.example .env
# edit .env with your values
python3 send-data.py

Environment variables

  • CONSUMER_KEY — external client app consumer key
  • CONSUMER_SECRET — external client app consumer secret if your auth flow needs it
  • SF_USERNAME — Salesforce username used for JWT auth
  • SF_LOGIN_URL — login host such as https://login.salesforce.com
  • TENANT_URL — Data Cloud tenant URL such as https://<tenant>.c360a.salesforce.com
  • PRIVATE_KEY_FILE — path to the JWT private key
  • CONNECTOR_NAME — Ingestion API connector name
  • OBJECT_NAME — uploaded schema object name

Notes

  • auth is a staged flow: JWT → Salesforce token → Data Cloud token
  • the ingestion endpoint uses the Data Cloud tenant URL, not the Salesforce instance URL
  • 202 means the payload was accepted for processing
  • validation failures often appear in the Problem Records DLO family