afv-library/skills/segmenting-datacloud-api/README.md
Matthew Lieber 36f7a19206 feat: add segmenting-datacloud-api skill for REST API segment management
Adds a new skill covering the Data Cloud Connect REST API segments
endpoints via `sf api request rest`. Complements the existing
segmenting-datacloud skill (which uses the sf data360 plugin) with
full endpoint schemas, request/response examples, and error codes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-23 19:48:10 -07:00

36 lines
1.3 KiB
Markdown

# segmenting-datacloud-api
Manage Salesforce Data Cloud segments via the Connect REST API (`sf api request rest`), without requiring the `sf data360` community plugin.
## Use this skill for
- creating, updating, and deleting segments via REST API
- publishing and deactivating segments
- getting segment details and member lists
- counting segment populations
- full endpoint schema reference (request/response bodies, query params, error codes)
## Example requests
```text
"Create a Dbt segment targeting individuals who purchased in the last 30 days"
"List all active waterfall segments in my org"
"Publish segment 1sgxx00000000PpAAI"
"Get the members of my High_Value_Customers segment"
"Delete the old test segment and recreate it on accounts"
```
## Common commands
```bash
sf api request rest "/services/data/v65.0/ssot/segments" -o myorg
sf api request rest "/services/data/v65.0/ssot/segments" -X POST -H "Content-Type:application/json" -b @/tmp/segment.json -o myorg
sf api request rest "/services/data/v65.0/ssot/segments/My_Segment/actions/publish" -X POST -H "Content-Type:application/json" -b '{}' -o myorg
sf api request rest "/services/data/v65.0/ssot/segments/My_Segment/members?limit=100" -o myorg
```
## References
- [SKILL.md](SKILL.md)
- [CREDITS.md](CREDITS.md)