@segment/action-destinations 3.104.0 → 3.104.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/destinations/actions-pardot/prospects/index.js.map +1 -1
  2. package/dist/destinations/adobe-target/adobeTarget_operations.d.ts +1 -1
  3. package/dist/destinations/adobe-target/adobeTarget_operations.js +14 -18
  4. package/dist/destinations/adobe-target/adobeTarget_operations.js.map +1 -1
  5. package/dist/destinations/amplitude/logEvent/generated-types.d.ts +21 -0
  6. package/dist/destinations/amplitude/logEvent/index.js +96 -10
  7. package/dist/destinations/amplitude/logEvent/index.js.map +1 -1
  8. package/dist/destinations/cordial/addProductToCart/index.js +1 -1
  9. package/dist/destinations/cordial/addProductToCart/index.js.map +1 -1
  10. package/dist/destinations/cordial/index.js +1 -1
  11. package/dist/destinations/cordial/index.js.map +1 -1
  12. package/dist/destinations/cordial/removeProductFromCart/index.js.map +1 -1
  13. package/dist/destinations/cordial/upsertOrder/index.js +8 -8
  14. package/dist/destinations/cordial/upsertOrder/index.js.map +1 -1
  15. package/dist/destinations/customerio/trackEvent/index.js.map +1 -1
  16. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js +4 -1
  17. package/dist/destinations/engage-messaging-sendgrid/sendEmail/index.js.map +1 -1
  18. package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
  19. package/dist/destinations/google-enhanced-conversions/constants.d.ts +1 -0
  20. package/dist/destinations/google-enhanced-conversions/constants.js +185 -0
  21. package/dist/destinations/google-enhanced-conversions/constants.js.map +1 -0
  22. package/dist/destinations/google-enhanced-conversions/functions.d.ts +3 -0
  23. package/dist/destinations/google-enhanced-conversions/functions.js +34 -0
  24. package/dist/destinations/google-enhanced-conversions/functions.js.map +1 -0
  25. package/dist/destinations/google-enhanced-conversions/generated-types.d.ts +2 -1
  26. package/dist/destinations/google-enhanced-conversions/index.js +15 -8
  27. package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
  28. package/dist/destinations/google-enhanced-conversions/postConversion/index.js +7 -1
  29. package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
  30. package/dist/destinations/google-enhanced-conversions/types.d.ts +15 -0
  31. package/dist/destinations/google-enhanced-conversions/types.js +3 -0
  32. package/dist/destinations/google-enhanced-conversions/types.js.map +1 -0
  33. package/dist/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.d.ts +11 -0
  34. package/dist/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.js +3 -0
  35. package/dist/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.js.map +1 -0
  36. package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.d.ts +5 -0
  37. package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js +106 -0
  38. package/dist/destinations/google-enhanced-conversions/uploadCallConversion/index.js.map +1 -0
  39. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.d.ts +25 -0
  40. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.js +3 -0
  41. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.js.map +1 -0
  42. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.d.ts +5 -0
  43. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js +245 -0
  44. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/index.js.map +1 -0
  45. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/types.d.ts +5 -0
  46. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/types.js +3 -0
  47. package/dist/destinations/google-enhanced-conversions/uploadClickConversion/types.js.map +1 -0
  48. package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.d.ts +20 -0
  49. package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.js +3 -0
  50. package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.js.map +1 -0
  51. package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.d.ts +5 -0
  52. package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js +269 -0
  53. package/dist/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.js.map +1 -0
  54. package/dist/destinations/index.js +1 -0
  55. package/dist/destinations/index.js.map +1 -1
  56. package/dist/destinations/intercom/identifyContact/index.js +1 -1
  57. package/dist/destinations/intercom/identifyContact/index.js.map +1 -1
  58. package/dist/destinations/mixpanel/index.js +1 -1
  59. package/dist/destinations/mixpanel/trackEvent/index.js.map +1 -1
  60. package/dist/destinations/qualtrics/triggerXflowWorkflow/index.js +1 -1
  61. package/dist/destinations/qualtrics/triggerXflowWorkflow/index.js.map +1 -1
  62. package/dist/destinations/salesforce/lead/index.js +2 -1
  63. package/dist/destinations/salesforce/lead/index.js.map +1 -1
  64. package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.d.ts +2 -0
  65. package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.js +3 -0
  66. package/dist/destinations/salesforce-marketing-cloud/contact/generated-types.js.map +1 -0
  67. package/dist/destinations/salesforce-marketing-cloud/contact/index.d.ts +5 -0
  68. package/dist/destinations/salesforce-marketing-cloud/contact/index.js +11 -0
  69. package/dist/destinations/salesforce-marketing-cloud/contact/index.js.map +1 -0
  70. package/dist/destinations/salesforce-marketing-cloud/generated-types.d.ts +2 -0
  71. package/dist/destinations/salesforce-marketing-cloud/generated-types.js +3 -0
  72. package/dist/destinations/salesforce-marketing-cloud/generated-types.js.map +1 -0
  73. package/dist/destinations/salesforce-marketing-cloud/index.d.ts +4 -0
  74. package/dist/destinations/salesforce-marketing-cloud/index.js +27 -0
  75. package/dist/destinations/salesforce-marketing-cloud/index.js.map +1 -0
  76. package/package.json +4 -4
@@ -0,0 +1,245 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const actions_core_1 = require("@segment/actions-core");
4
+ const functions_1 = require("../functions");
5
+ const action = {
6
+ title: 'Upload Click Conversion',
7
+ description: 'Upload an offline click conversion to the Google Ads API.',
8
+ fields: {
9
+ conversion_action: {
10
+ label: 'Conversion Action ID',
11
+ description: 'The ID of the conversion action associated with this conversion. To find the Conversion Action ID, click on your conversion in Google Ads and get the value for ctId in the URL. For example, if the URL is https://ads.google.com/aw/conversions/detail?ocid=00000000&ctId=570000000, your Conversion Action ID is 570000000.',
12
+ type: 'string',
13
+ required: true,
14
+ default: ''
15
+ },
16
+ gclid: {
17
+ label: 'GCLID',
18
+ description: 'The Google click ID (gclid) associated with this conversion.',
19
+ type: 'string',
20
+ default: ''
21
+ },
22
+ gbraid: {
23
+ label: 'GBRAID',
24
+ description: 'The click identifier for clicks associated with app conversions and originating from iOS devices starting with iOS14.',
25
+ type: 'string',
26
+ default: ''
27
+ },
28
+ wbraid: {
29
+ label: 'WBRAID',
30
+ description: 'The click identifier for clicks associated with web conversions and originating from iOS devices starting with iOS14.',
31
+ type: 'string',
32
+ default: ''
33
+ },
34
+ conversion_timestamp: {
35
+ label: 'Conversion Timestamp',
36
+ description: 'The date time at which the conversion occurred. Must be after the click time. The timezone must be specified. The format is "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00".',
37
+ type: 'string',
38
+ required: true,
39
+ default: {
40
+ '@path': '$.timestamp'
41
+ }
42
+ },
43
+ email_address: {
44
+ label: 'Email Address',
45
+ description: 'Email address of the individual who triggered the conversion event. Segment will hash this value before sending to Google.',
46
+ type: 'string',
47
+ format: 'email',
48
+ default: {
49
+ '@if': {
50
+ exists: { '@path': '$.properties.email' },
51
+ then: { '@path': '$.properties.email' },
52
+ else: { '@path': '$context.traits.email' }
53
+ }
54
+ }
55
+ },
56
+ phone_number: {
57
+ label: 'Phone Number',
58
+ description: 'Phone number of the individual who triggered the conversion event, in E.164 standard format, e.g. +14150000000. Segment will hash this value before sending to Google.',
59
+ type: 'string',
60
+ default: {
61
+ '@if': {
62
+ exists: { '@path': '$.properties.phone' },
63
+ then: { '@path': '$.properties.phone' },
64
+ else: { '@path': '$context.traits.phone' }
65
+ }
66
+ }
67
+ },
68
+ order_id: {
69
+ label: 'Order ID',
70
+ description: 'The order ID associated with the conversion. An order id can only be used for one conversion per conversion action.',
71
+ type: 'string',
72
+ default: {
73
+ '@path': '$.properties.orderId'
74
+ }
75
+ },
76
+ value: {
77
+ label: 'Value',
78
+ description: 'The value of the conversion for the advertiser.',
79
+ type: 'number',
80
+ default: {
81
+ '@path': '$.properties.total'
82
+ }
83
+ },
84
+ currency: {
85
+ label: 'Currency',
86
+ description: 'Currency associated with the conversion value. This is the ISO 4217 3-character currency code.',
87
+ type: 'string',
88
+ default: {
89
+ '@path': '$.properties.currency'
90
+ }
91
+ },
92
+ conversion_environment: {
93
+ label: 'Conversion Environment',
94
+ description: 'The environment this conversion was recorded on. e.g. App or Web.',
95
+ type: 'string',
96
+ choices: [
97
+ { label: 'APP', value: 'APP' },
98
+ { label: 'WEB', value: 'WEB' },
99
+ { label: `UNSPECIFIED`, value: 'UNSPECIFIED' }
100
+ ]
101
+ },
102
+ merchant_id: {
103
+ label: 'Merchant Center ID',
104
+ description: 'The ID of the Merchant Center account where the items are uploaded.',
105
+ type: 'string',
106
+ default: ''
107
+ },
108
+ merchant_country_code: {
109
+ label: 'Merchant Center Feed Country Code',
110
+ description: 'The ISO 3166 two-character region code of the Merchant Center feed where the items are uploaded.',
111
+ type: 'string',
112
+ default: ''
113
+ },
114
+ merchant_language_code: {
115
+ label: 'Merchant Center Feed Language Code',
116
+ description: 'The ISO 639-1 language code of the Merchant Center feed where the items are uploaded.',
117
+ type: 'string',
118
+ default: ''
119
+ },
120
+ local_cost: {
121
+ label: 'Local Transaction Cost',
122
+ description: 'Sum of all transaction-level discounts, such as free shipping and coupon discounts for the whole cart.',
123
+ type: 'number',
124
+ default: ''
125
+ },
126
+ items: {
127
+ label: 'Items',
128
+ description: 'Data of the items purchased.',
129
+ type: 'object',
130
+ multiple: true,
131
+ properties: {
132
+ product_id: {
133
+ label: 'Product ID',
134
+ type: 'string',
135
+ description: 'The ID of the item sold.'
136
+ },
137
+ quantity: {
138
+ label: 'Quantity',
139
+ type: 'number',
140
+ description: 'Number of items sold.'
141
+ },
142
+ price: {
143
+ label: 'Price',
144
+ type: 'number',
145
+ description: 'Unit price excluding tax, shipping, and any transaction level discounts.'
146
+ }
147
+ },
148
+ default: {
149
+ '@arrayPath': [
150
+ '$.properties.products',
151
+ {
152
+ product_id: {
153
+ '@path': '$.product_id'
154
+ },
155
+ quantity: {
156
+ '@path': '$.quantity'
157
+ },
158
+ price: {
159
+ '@path': '$.price'
160
+ }
161
+ }
162
+ ]
163
+ }
164
+ },
165
+ custom_variables: {
166
+ label: 'Custom Variables',
167
+ description: 'The custom variables associated with this conversion. On the left-hand side, input the name of the custom variable as it appears in your Google Ads account. On the right-hand side, map the Segment field that contains the corresponding value See [Google’s documentation on how to create custom conversion variables.](https://developers.google.com/google-ads/api/docs/conversions/conversion-custom-variables) ',
168
+ type: 'object',
169
+ additionalProperties: true,
170
+ defaultObjectUI: 'keyvalue'
171
+ }
172
+ },
173
+ perform: async (request, { auth, settings, payload }) => {
174
+ if (!settings.customerId) {
175
+ throw new actions_core_1.IntegrationError('Customer id is required for this action. Please set it in destination settings.', 'Missing required fields.', 400);
176
+ }
177
+ settings.customerId = settings.customerId.replace(/[^0-9.]+/g, '');
178
+ let cartItems = [];
179
+ if (payload.items) {
180
+ cartItems = payload.items.map((product) => {
181
+ return {
182
+ productId: product.product_id,
183
+ quantity: product.quantity,
184
+ unitPrice: product.price
185
+ };
186
+ });
187
+ }
188
+ const customVariableIds = await request(`https://googleads.googleapis.com/v11/customers/${settings.customerId}/googleAds:searchStream`, {
189
+ method: 'post',
190
+ headers: {
191
+ authorization: `Bearer ${auth?.accessToken}`,
192
+ 'developer-token': `${process.env.ADWORDS_DEVELOPER_TOKEN}`
193
+ },
194
+ json: {
195
+ query: `SELECT conversion_custom_variable.id, conversion_custom_variable.name FROM conversion_custom_variable`
196
+ }
197
+ });
198
+ const request_object = {
199
+ conversionAction: `customers/${settings.customerId}/conversionActions/${payload.conversion_action}`,
200
+ conversionDateTime: payload.conversion_timestamp.replace(/T/, ' ').replace(/\..+/, '+00:00'),
201
+ gclid: payload.gclid,
202
+ gbraid: payload.gbraid,
203
+ wbraid: payload.wbraid,
204
+ orderId: payload.order_id,
205
+ conversionValue: payload.value,
206
+ currencyCode: payload.currency,
207
+ conversionEnvironment: payload.conversion_environment,
208
+ cartData: {
209
+ merchantId: payload.merchant_id,
210
+ feedCountryCode: payload.merchant_country_code,
211
+ feedLanguageCode: payload.merchant_language_code,
212
+ localTransactionCost: payload.local_cost,
213
+ items: cartItems
214
+ },
215
+ userIdentifiers: [],
216
+ customVariables: functions_1.formatCustomVariables(payload.custom_variables, customVariableIds.data[0].results)
217
+ };
218
+ if (payload.email_address) {
219
+ request_object.userIdentifiers.push({ hashedEmail: functions_1.hash(payload.email_address) });
220
+ }
221
+ if (payload.phone_number) {
222
+ request_object.userIdentifiers.push({ hashedPhoneNumber: functions_1.hash(payload.phone_number) });
223
+ }
224
+ const response = await request(`https://googleads.googleapis.com/v11/customers/${settings.customerId}:uploadClickConversions`, {
225
+ method: 'post',
226
+ headers: {
227
+ 'developer-token': `${process.env.ADWORDS_DEVELOPER_TOKEN}`
228
+ },
229
+ json: {
230
+ conversions: [request_object],
231
+ partialFailure: true
232
+ }
233
+ });
234
+ if (typeof response.data === 'object' && response.data != null) {
235
+ Object.entries(response.data).forEach(([key, value]) => {
236
+ if (key === 'partialFailureError' && value.code !== 0) {
237
+ throw new actions_core_1.IntegrationError(value.message, 'INVALID_ARGUMENT', 400);
238
+ }
239
+ });
240
+ }
241
+ return response;
242
+ }
243
+ };
244
+ exports.default = action;
245
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-enhanced-conversions/uploadClickConversion/index.ts"],"names":[],"mappings":";;AAAA,wDAA4F;AAI5F,4CAA0D;AAE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KAAK,qBAAqB,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE;oBACrD,MAAM,IAAI,+BAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,kBAAkB,EAAE,GAAG,CAAC,CAAA;iBACnE;YACH,CAAC,CAAC,CAAA;SACH;QACD,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -0,0 +1,5 @@
1
+ export interface CartItem {
2
+ productId?: string;
3
+ quantity?: number;
4
+ unitPrice?: number;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/destinations/google-enhanced-conversions/uploadClickConversion/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ export interface Payload {
2
+ conversion_action: string;
3
+ adjustment_type: string;
4
+ adjustment_timestamp: string;
5
+ order_id?: string;
6
+ gclid?: string;
7
+ conversion_timestamp?: string;
8
+ restatement_value?: number & string;
9
+ restatement_currency_code?: string;
10
+ email_address?: string;
11
+ phone_number?: string;
12
+ first_name?: string;
13
+ last_name?: string;
14
+ city?: string;
15
+ state?: string;
16
+ country?: string;
17
+ postal_code?: string;
18
+ street_address?: string;
19
+ user_agent?: string;
20
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=generated-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/google-enhanced-conversions/uploadConversionAdjustment/generated-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { ActionDefinition } from '@segment/actions-core';
2
+ import type { Settings } from '../generated-types';
3
+ import type { Payload } from './generated-types';
4
+ declare const action: ActionDefinition<Settings, Payload>;
5
+ export default action;
@@ -0,0 +1,269 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const actions_core_1 = require("@segment/actions-core");
4
+ const functions_1 = require("../functions");
5
+ const action = {
6
+ title: 'Upload Conversion Adjustment',
7
+ description: 'Upload a conversion adjustment to the Google Ads API.',
8
+ fields: {
9
+ conversion_action: {
10
+ label: 'Conversion Action ID',
11
+ description: 'The ID of the conversion action associated with this conversion. To find the Conversion Action ID, click on your conversion in Google Ads and get the value for ctId in the URL. For example, if the URL is https://ads.google.com/aw/conversions/detail?ocid=00000000&ctId=576882000, your Conversion Action ID is 576882000.',
12
+ type: 'string',
13
+ required: true,
14
+ default: ''
15
+ },
16
+ adjustment_type: {
17
+ label: 'Adjustment Type',
18
+ description: 'The adjustment type. See Google’s documentation for details on each type.',
19
+ type: 'string',
20
+ choices: [
21
+ { label: 'UNSPECIFIED', value: 'UNSPECIFIED' },
22
+ { label: 'UNKNOWN', value: 'UNKNOWN' },
23
+ { label: `RETRACTION`, value: 'RETRACTION' },
24
+ { label: 'RESTATEMENT', value: 'RESTATEMENT' },
25
+ { label: `ENHANCEMENT`, value: 'ENHANCEMENT' }
26
+ ],
27
+ required: true
28
+ },
29
+ adjustment_timestamp: {
30
+ label: 'Adjustment Timestamp',
31
+ description: 'The date time at which the adjustment occurred. Must be after the conversion_date_time. The timezone must be specified. The format is "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00".',
32
+ type: 'string',
33
+ required: true,
34
+ default: {
35
+ '@path': '$.timestamp'
36
+ }
37
+ },
38
+ order_id: {
39
+ label: 'Order ID',
40
+ description: 'The order ID of the conversion to be adjusted. If the conversion was reported with an order ID specified, that order ID must be used as the identifier here. Required for ENHANCEMENT adjustments.',
41
+ type: 'string',
42
+ default: {
43
+ '@path': '$.properties.orderId'
44
+ }
45
+ },
46
+ gclid: {
47
+ label: 'GCLID',
48
+ description: 'Google click ID associated with the original conversion for this adjustment. This is used for the GCLID Date Time Pair. Required for non-ENHANCEMENT adjustments. If adjustment is ENHANCEMENT, this value is optional but may be set in addition to the order ID.',
49
+ type: 'string',
50
+ default: ''
51
+ },
52
+ conversion_timestamp: {
53
+ label: 'Conversion Timestamp',
54
+ description: 'The date time at which the original conversion for this adjustment occurred. The timezone must be specified. The format is "yyyy-mm-dd hh:mm:ss+|-hh:mm", e.g. "2019-01-01 12:32:45-08:00". This is used for the GCLID Date Time Pair. Required for non-ENHANCEMENT adjustments. If adjustment is ENHANCEMENT, this value is optional but may be set in addition to the order ID.',
55
+ type: 'string',
56
+ default: ''
57
+ },
58
+ restatement_value: {
59
+ label: 'Restatement Value',
60
+ description: 'The restated conversion value. This is the value of the conversion after restatement. For example, to change the value of a conversion from 100 to 70, an adjusted value of 70 should be reported. Required for RESTATEMENT adjustments.',
61
+ type: 'number',
62
+ default: ''
63
+ },
64
+ restatement_currency_code: {
65
+ label: 'Restatement Currency Code',
66
+ description: 'The currency of the restated value. If not provided, then the default currency from the conversion action is used, and if that is not set then the account currency is used. This is the ISO 4217 3-character currency code e.g. USD or EUR.',
67
+ type: 'string',
68
+ default: ''
69
+ },
70
+ email_address: {
71
+ label: 'Email Address',
72
+ description: 'Email address of the individual who triggered the conversion event. Segment will hash this value before sending to Google.',
73
+ type: 'string',
74
+ format: 'email',
75
+ default: {
76
+ '@if': {
77
+ exists: { '@path': '$.properties.email' },
78
+ then: { '@path': '$.properties.email' },
79
+ else: { '@path': '$context.traits.email' }
80
+ }
81
+ }
82
+ },
83
+ phone_number: {
84
+ label: 'Phone Number',
85
+ description: 'Phone number of the individual who triggered the conversion event, in E.164 standard format, e.g. +14150000000. Segment will hash this value before sending to Google.',
86
+ type: 'string',
87
+ default: {
88
+ '@if': {
89
+ exists: { '@path': '$.properties.phone' },
90
+ then: { '@path': '$.properties.phone' },
91
+ else: { '@path': '$context.traits.phone' }
92
+ }
93
+ }
94
+ },
95
+ first_name: {
96
+ label: 'First Name',
97
+ description: 'First name of the user who performed the conversion. Segment will hash this value before sending to Google.',
98
+ type: 'string',
99
+ default: {
100
+ '@if': {
101
+ exists: { '@path': '$.properties.firstName' },
102
+ then: { '@path': '$.properties.firstName' },
103
+ else: { '@path': '$context.traits.firstName' }
104
+ }
105
+ }
106
+ },
107
+ last_name: {
108
+ label: 'Last Name',
109
+ description: 'Last name of the user who performed the conversion. Segment will hash this value before sending to Google.',
110
+ type: 'string',
111
+ default: {
112
+ '@if': {
113
+ exists: { '@path': '$.properties.lastName' },
114
+ then: { '@path': '$.properties.lastName' },
115
+ else: { '@path': '$context.traits.lastName' }
116
+ }
117
+ }
118
+ },
119
+ city: {
120
+ label: 'City',
121
+ description: 'City of the user who performed the conversion.',
122
+ type: 'string',
123
+ default: {
124
+ '@if': {
125
+ exists: { '@path': '$.properties.address.city,' },
126
+ then: { '@path': '$.properties.address.city,' },
127
+ else: { '@path': '$.context.traits.address.city' }
128
+ }
129
+ }
130
+ },
131
+ state: {
132
+ label: 'State',
133
+ description: 'State of the user who performed the conversion.',
134
+ type: 'string',
135
+ default: {
136
+ '@if': {
137
+ exists: { '@path': '$.properties.address.state,' },
138
+ then: { '@path': '$.properties.address.state,' },
139
+ else: { '@path': '$.context.traits.address.state' }
140
+ }
141
+ }
142
+ },
143
+ country: {
144
+ label: 'Country',
145
+ description: '2-letter country code in ISO-3166-1 alpha-2 of the user who performed the conversion.',
146
+ type: 'string',
147
+ default: {
148
+ '@if': {
149
+ exists: { '@path': '$.properties.address.country,' },
150
+ then: { '@path': '$.properties.address.country,' },
151
+ else: { '@path': '$.context.traits.address.country' }
152
+ }
153
+ }
154
+ },
155
+ postal_code: {
156
+ label: 'Postal Code',
157
+ description: 'Postal code of the user who performed the conversion.',
158
+ type: 'string',
159
+ default: {
160
+ '@if': {
161
+ exists: { '@path': '$.properties.address.postalCode,' },
162
+ then: { '@path': '$.properties.address.postalCode,' },
163
+ else: { '@path': '$.context.traits.address.postalCode' }
164
+ }
165
+ }
166
+ },
167
+ street_address: {
168
+ label: 'Street Address',
169
+ description: 'Street address of the user who performed the conversion. Segment will hash this value before sending to Google.',
170
+ type: 'string',
171
+ default: {
172
+ '@if': {
173
+ exists: { '@path': '$.properties.address.street,' },
174
+ then: { '@path': '$.properties.address.street,' },
175
+ else: { '@path': '$.context.traits.address.street' }
176
+ }
177
+ }
178
+ },
179
+ user_agent: {
180
+ label: 'User Agent',
181
+ description: 'The user agent to enhance the original conversion. User agent can only be specified in enhancements with user identifiers. This should match the user agent of the request that sent the original conversion so the conversion and its enhancement are either both attributed as same-device or both attributed as cross-device.',
182
+ type: 'string',
183
+ default: {
184
+ '@path': '$.context.userAgent'
185
+ }
186
+ }
187
+ },
188
+ perform: async (request, { settings, payload }) => {
189
+ if (!settings.customerId) {
190
+ throw new actions_core_1.IntegrationError('Customer id is required for this action. Please set it in destination settings.', 'Missing required fields.', 400);
191
+ }
192
+ settings.customerId = settings.customerId.replace(/[^0-9.]+/g, '');
193
+ if (payload.adjustment_type == 'ENHANCEMENT' && !payload.order_id) {
194
+ throw new actions_core_1.IntegrationError('Order id required for enhancement conversion', 'INVALID_ARGUMENT', 400);
195
+ }
196
+ else if (payload.adjustment_type != 'ENHANCEMENT') {
197
+ if (!payload.gclid) {
198
+ throw new actions_core_1.IntegrationError('Gclid required for chosen conversion type', 'INVALID_ARGUMENT', 400);
199
+ }
200
+ if (!payload.conversion_timestamp) {
201
+ throw new actions_core_1.IntegrationError('Conversion timestamp required for chosen conversion type', 'INVALID_ARGUMENT', 400);
202
+ }
203
+ if (payload.adjustment_type == 'RESTATEMENT' && !payload.restatement_value) {
204
+ throw new actions_core_1.IntegrationError('Restatement value required for restatement conversion', 'INVALID_ARGUMENT', 400);
205
+ }
206
+ }
207
+ const request_object = {
208
+ conversionAction: `customers/${settings.customerId}/conversionActions/${payload.conversion_action}`,
209
+ adjustmentType: payload.adjustment_type,
210
+ adjustmentDateTime: payload.adjustment_timestamp.replace(/T/, ' ').replace(/\..+/, '+00:00'),
211
+ orderId: payload.order_id,
212
+ gclidDateTimePair: {
213
+ gclid: payload.gclid,
214
+ conversionDateTime: payload.conversion_timestamp
215
+ },
216
+ restatementValue: {
217
+ adjustedValue: payload.restatement_value,
218
+ currencyCode: payload.restatement_currency_code
219
+ },
220
+ userIdentifiers: [],
221
+ userAgent: payload.user_agent
222
+ };
223
+ if (payload.email_address) {
224
+ request_object.userIdentifiers.push({ hashedEmail: functions_1.hash(payload.email_address) });
225
+ }
226
+ if (payload.phone_number) {
227
+ request_object.userIdentifiers.push({ hashedPhoneNumber: functions_1.hash(payload.phone_number) });
228
+ }
229
+ if (payload.first_name ||
230
+ payload.last_name ||
231
+ payload.city ||
232
+ payload.state ||
233
+ payload.country ||
234
+ payload.postal_code ||
235
+ payload.street_address) {
236
+ request_object.userIdentifiers.push({
237
+ addressInfo: {
238
+ hashedFirstName: functions_1.hash(payload.first_name),
239
+ hashedLastName: functions_1.hash(payload.last_name),
240
+ hashedStreetAddress: functions_1.hash(payload.street_address),
241
+ city: payload.city,
242
+ state: payload.state,
243
+ countryCode: payload.country,
244
+ postalCode: payload.postal_code
245
+ }
246
+ });
247
+ }
248
+ const response = await request(`https://googleads.googleapis.com/v11/customers/${settings.customerId}:uploadConversionAdjustments`, {
249
+ method: 'post',
250
+ headers: {
251
+ 'developer-token': `${process.env.ADWORDS_DEVELOPER_TOKEN}`
252
+ },
253
+ json: {
254
+ conversionAdjustments: [request_object],
255
+ partialFailure: true
256
+ }
257
+ });
258
+ if (typeof response.data === 'object' && response.data != null) {
259
+ Object.entries(response.data).forEach(([key, value]) => {
260
+ if (key === 'partialFailureError' && value.code !== 0) {
261
+ throw new actions_core_1.IntegrationError(value.message, 'INVALID_ARGUMENT', 400);
262
+ }
263
+ });
264
+ }
265
+ return response;
266
+ }
267
+ };
268
+ exports.default = action;
269
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-enhanced-conversions/uploadConversionAdjustment/index.ts"],"names":[],"mappings":";;AAAA,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KAAK,qBAAqB,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,EAAE;oBACrD,MAAM,IAAI,+BAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,kBAAkB,EAAE,GAAG,CAAC,CAAA;iBACnE;YACH,CAAC,CAAC,CAAA;SACH;QACD,OAAO,QAAQ,CAAA;IACjB,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -55,6 +55,7 @@ register('62df16e45ba0058c864a75d1', './actions-pardot');
55
55
  register('5f7dd8191ad74f868ab1fc48', './pipedrive');
56
56
  register('62e17e6f687e4a3d32d0f875', './qualtrics');
57
57
  register('61957755c4d820be968457de', './salesforce');
58
+ register('62e30bad99f1bfb98ee8ce08', './salesforce-marketing-cloud');
58
59
  register('5f7dd8e302173ff732db5cc4', './slack');
59
60
  register('6261a8b6cb4caa70e19116e8', './snap-conversions-api');
60
61
  register('6234b137d3b6404a64f2a0f0', './talon-one');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/destinations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,wDAAmD;AACnD,gDAAuB;AAWV,QAAA,YAAY,GAA0C,EAAE,CAAA;AACxD,QAAA,QAAQ,GAAsC,EAAE,CAAA;AAU7D,QAAQ,CAAC,0BAA0B,EAAE,UAAU,CAAC,CAAA;AAChD,QAAQ,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAA;AACtD,QAAQ,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAA;AACnD,QAAQ,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAA;AAC/C,QAAQ,CAAC,0BAA0B,EAAE,aAAa,CAAC,CAAA;AACnD,QAAQ,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAA;AAC/C,QAAQ,CAAC,0BAA0B,EAAE,WAAW,CAAC,CAAA;AACjD,QAAQ,CAAC,0BAA0B,EAAE,oBAAoB,CAAC,CAAA;AAC1D,QAAQ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AAW,EAAE;QAChB,OAAO,IAAI,CAAA;KACZ;IAGD,OAAO,IAAI,0BAAW,CAAC,WAAyC,CAAC,CAAA;AACnE,CAAC;AAED,SAAgB,kBAAkB,CAAC,EAAU;IAC3C,MAAM,WAAW,GAAG,gBAAQ,CAAC,EAAE,CAAC,CAAA;IAEhC,IAAI,CAAC,WAAW,EAAE,UAAU,EAAE;QAC5B,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,IAAI,0BAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAA;AAChD,CAAC;AARD,gDAQC;AAEM,KAAK,UAAU,uBAAuB,CAAC,WAAmB;IAC/D,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,uBAAuB,CAAC,WAAW,CAAC,CAAA;AAChF,CAAC;AAFD,0DAEC"}
@@ -19,7 +19,7 @@ const action = {
19
19
  },
20
20
  external_id: {
21
21
  type: 'string',
22
- description: 'A unique identifier for the contact generated outside of Intercom. External ID is required if the role is `user` and email is blank. External IDs cannot be set if the role is `lead`.',
22
+ description: 'A unique identifier for the contact generated outside Intercom. External ID is required if the role is `user` and email is blank.',
23
23
  label: 'External ID',
24
24
  default: {
25
25
  '@path': '$.userId'
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/intercom/identifyContact/index.ts"],"names":[],"mappings":";;AAAA,wDAAuF;AAEvF,kCAAyE;AAGzE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,wCAAwC;IACrD,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,gEAAgE;YAC7E,KAAK,EAAE,MAAM;YACb,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;gBAChC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,E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"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/intercom/identifyContact/index.ts"],"names":[],"mappings":";;AAAA,wDAAuF;AAEvF,kCAAyE;AAGzE,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,wCAAwC;IACrD,mBAAmB,EAAE,mBAAmB;IACxC,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,gEAAgE;YAC7E,KAAK,EAAE,MAAM;YACb,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;gBAChC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;aACjC;SACF;QACD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,mIAAmI;YACrI,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE;gBACP,OAAO,EAAE,UAAU;aACpB;SACF;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,gGAAgG;YAC7G,KAAK,EAAE,eAAe;YACtB,MAAM,EAAE,OAAO;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,gBAAgB;aAC1B;SACF;QACD,KAAK,EAAE;YACL,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,6BAA6B;YAC1C,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,gBAAgB;aAC1B;SACF;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qBAAqB;YAClC,KAAK,EAAE,MAAM;YACb,OAAO,EAAE;gBACP,OAAO,EAAE,eAAe;aACzB;SACF;QACD,MAAM,EAAE;YACN,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,kDAAkD;YAC/D,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gB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