Skip to content

[ENG-2914] tidy(salesforce): Support flexible batch response schema#2277

Closed
Cobalt0s wants to merge 1 commit into
cobalt0s/codec-preserve-raw-jsonfrom
cobalt0s/batch-salesforce-flex-schema
Closed

[ENG-2914] tidy(salesforce): Support flexible batch response schema#2277
Cobalt0s wants to merge 1 commit into
cobalt0s/codec-preserve-raw-jsonfrom
cobalt0s/batch-salesforce-flex-schema

Conversation

@Cobalt0s
Copy link
Copy Markdown
Contributor

@Cobalt0s Cobalt0s commented Nov 7, 2025

Description

Salesforce batch response to support a flexible and resilient schema (internal+external).

  • Introduces use of codec.RawJSON for batch items to retain both typed (where we use reference id) and raw JSON representations (pass on this data as WriteResult.Data).
  • Surfaces the raw provider payload in API responses to prevent data truncation.
  • Simplifies error decoding from a strict struct ItemError to map[string]any, as error fields are provider-specific and not consumed internally.

@linear
Copy link
Copy Markdown

linear Bot commented Nov 7, 2025

ENG-2914 Batch write MVP

Copy link
Copy Markdown
Contributor Author

Cobalt0s commented Nov 7, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Cobalt0s Cobalt0s self-assigned this Nov 7, 2025
@Cobalt0s Cobalt0s requested a review from anushat05 November 7, 2025 21:39
@Cobalt0s Cobalt0s marked this pull request as ready for review November 7, 2025 21:39
@Cobalt0s Cobalt0s force-pushed the cobalt0s/batch-salesforce-flex-schema branch from 106e448 to 954ff98 Compare November 7, 2025 22:37
@Cobalt0s Cobalt0s force-pushed the cobalt0s/codec-preserve-raw-json branch from 9af3528 to 55cd1bf Compare November 7, 2025 22:37
Comment thread providers/salesforce/internal/crm/batch/write.go
@Cobalt0s
Copy link
Copy Markdown
Contributor Author

Salesforce's BatchWrite implementation changed and uses a new endpoint for create and this solution is no longer applicable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants