Skip to content

Commit

Permalink
Sync customer id for accounting also (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
openint-bot authored Feb 13, 2025
1 parent 8a8c94d commit dcb7506
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions unified/unified-accounting/unifiedAccountingLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export function unifiedAccountingLink(ctx: {
id: Id['conn']
connectorConfig: {connectorName: string}
metadata?: unknown
customerId?: string | null
}
}): Link<AnyEntityPayload, PostgresInputPayload> {
return Rx.mergeMap((op) => {
Expand Down Expand Up @@ -67,6 +68,9 @@ export function unifiedAccountingLink(ctx: {
data: {
...mapped,
connection_id: ctx.source.id, // Should this be the default somehow?
// Denormalize customer_id onto entities for now, though may be better
// to just sync connection also?
customer_id: ctx.source.customerId,
},
upsert: {
key_columns: ['connection_id', 'id'],
Expand Down

0 comments on commit dcb7506

Please sign in to comment.