Skip to content

Commit fca0829

Browse files
authored
Add batch_size to identify fields in Drip (Actions) (#2932)
* Add batch_sixe to identify fields in Drip (Actions) * Use MultiStatusResponse in performBatch function on Drip (Actions) identify action * Fix default to allow being passed under traits * Set batch size default to 1000 and disable input methods * Revert changes to performBatch * Switch performBatch back to synchronous
1 parent 2a62f19 commit fca0829

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

packages/destination-actions/src/destinations/drip/identify/generated-types.ts

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/destination-actions/src/destinations/drip/identify/index.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,18 @@ const action: ActionDefinition<Settings, Payload> = {
9898
required: false,
9999
type: 'string',
100100
default: { '@path': '$.context.timezone' }
101+
},
102+
batch_size: {
103+
label: 'Batch Size',
104+
disabledInputMethods: ['variable', 'function', 'enrichment'],
105+
description:
106+
'Maximum number of events to include in each batch. Actual batch sizes may be lower. Max size must be between 1 and 1000 inclusive.',
107+
type: 'integer',
108+
required: false,
109+
unsafe_hidden: true,
110+
default: 1000,
111+
minimum: 1,
112+
maximum: 1000
101113
}
102114
},
103115
perform: (request, { settings, payload }) => {
@@ -107,10 +119,11 @@ const action: ActionDefinition<Settings, Payload> = {
107119
})
108120
},
109121
performBatch: (request, { settings, payload }) => {
110-
const subs = payload.map(person)
122+
const subscribers = payload.map(person)
123+
111124
return request(`https://api.getdrip.com/v2/${settings.accountId}/subscribers/batches`, {
112125
method: 'POST',
113-
json: { batches: [{ subscribers: subs }] }
126+
json: { batches: [{ subscribers }] }
114127
})
115128
}
116129
}

0 commit comments

Comments
 (0)