@segment/action-destinations 3.127.2-CHANNELS-329.3 → 3.127.3-brackets-stuff.18
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.
- package/dist/destinations/braze-cohorts/syncAudiences/index.js +3 -3
- package/dist/destinations/braze-cohorts/syncAudiences/index.js.map +1 -1
- package/dist/destinations/customerio/createUpdateObject/generated-types.d.ts +1 -1
- package/dist/destinations/customerio/createUpdateObject/index.js +5 -5
- package/dist/destinations/customerio/createUpdateObject/index.js.map +1 -1
- package/dist/destinations/customerio/createUpdatePerson/index.js +2 -2
- package/dist/destinations/customerio/createUpdatePerson/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/index.js +1 -3
- package/dist/destinations/engage-messaging-twilio/index.js.map +1 -1
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js +104 -2
- package/dist/destinations/engage-messaging-twilio/sendSms/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/index.js +1 -1
- package/dist/destinations/google-enhanced-conversions/index.js.map +1 -1
- package/dist/destinations/heap/constants.d.ts +1 -1
- package/dist/destinations/heap/constants.js +2 -2
- package/dist/destinations/heap/constants.js.map +1 -1
- package/dist/destinations/heap/index.js +1 -1
- package/dist/destinations/heap/index.js.map +1 -1
- package/dist/destinations/heap/trackEvent/generated-types.d.ts +4 -2
- package/dist/destinations/heap/trackEvent/index.js +44 -15
- package/dist/destinations/heap/trackEvent/index.js.map +1 -1
- package/dist/destinations/index.js +1 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateActivity/index.js +44 -17
- package/dist/destinations/pipedrive/createUpdateActivity/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateDeal/index.js +35 -11
- package/dist/destinations/pipedrive/createUpdateDeal/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateLead/generated-types.d.ts +3 -8
- package/dist/destinations/pipedrive/createUpdateLead/index.js +54 -27
- package/dist/destinations/pipedrive/createUpdateLead/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateNote/generated-types.d.ts +1 -1
- package/dist/destinations/pipedrive/createUpdateNote/index.js +22 -13
- package/dist/destinations/pipedrive/createUpdateNote/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdateOrganization/index.js +8 -2
- package/dist/destinations/pipedrive/createUpdateOrganization/index.js.map +1 -1
- package/dist/destinations/pipedrive/createUpdatePerson/index.js +15 -3
- package/dist/destinations/pipedrive/createUpdatePerson/index.js.map +1 -1
- package/dist/destinations/pipedrive/index.d.ts +1 -1
- package/dist/destinations/pipedrive/index.js +22 -1
- package/dist/destinations/pipedrive/index.js.map +1 -1
- package/dist/destinations/pipedrive/pipedriveApi/leads.d.ts +5 -1
- package/dist/destinations/pipedrive/pipedriveApi/leads.js.map +1 -1
- package/dist/destinations/pipedrive/pipedriveApi/notes.d.ts +1 -1
- package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.d.ts +2 -1
- package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js +7 -1
- package/dist/destinations/pipedrive/pipedriveApi/pipedrive-client.js.map +1 -1
- package/dist/destinations/saleswings/api.d.ts +35 -0
- package/dist/destinations/saleswings/api.js +19 -0
- package/dist/destinations/saleswings/api.js.map +1 -0
- package/dist/destinations/saleswings/common.d.ts +5 -0
- package/dist/destinations/saleswings/common.js +37 -0
- package/dist/destinations/saleswings/common.js.map +1 -0
- package/dist/destinations/saleswings/converter.d.ts +12 -0
- package/dist/destinations/saleswings/converter.js +34 -0
- package/dist/destinations/saleswings/converter.js.map +1 -0
- package/dist/destinations/saleswings/fields.d.ts +12 -0
- package/dist/destinations/saleswings/fields.js +102 -0
- package/dist/destinations/saleswings/fields.js.map +1 -0
- package/dist/destinations/saleswings/generated-types.d.ts +3 -0
- package/dist/destinations/{engage-messaging-twilio/sendWhatsApp → saleswings}/generated-types.js +0 -0
- package/dist/destinations/saleswings/generated-types.js.map +1 -0
- package/dist/destinations/saleswings/index.d.ts +4 -0
- package/dist/destinations/saleswings/index.js +67 -0
- package/dist/destinations/saleswings/index.js.map +1 -0
- package/dist/destinations/saleswings/submitIdentifyEvent/generated-types.d.ts +14 -0
- package/dist/destinations/saleswings/submitIdentifyEvent/generated-types.js +3 -0
- package/dist/destinations/saleswings/submitIdentifyEvent/generated-types.js.map +1 -0
- package/dist/destinations/{engage-messaging-twilio/sendWhatsApp → saleswings/submitIdentifyEvent}/index.d.ts +0 -0
- package/dist/destinations/saleswings/submitIdentifyEvent/index.js +39 -0
- package/dist/destinations/saleswings/submitIdentifyEvent/index.js.map +1 -0
- package/dist/destinations/saleswings/submitPageEvent/generated-types.d.ts +8 -0
- package/dist/destinations/saleswings/submitPageEvent/generated-types.js +3 -0
- package/dist/destinations/saleswings/submitPageEvent/generated-types.js.map +1 -0
- package/dist/destinations/saleswings/submitPageEvent/index.d.ts +5 -0
- package/dist/destinations/saleswings/submitPageEvent/index.js +35 -0
- package/dist/destinations/saleswings/submitPageEvent/index.js.map +1 -0
- package/dist/destinations/saleswings/submitScreenEvent/generated-types.d.ts +14 -0
- package/dist/destinations/saleswings/submitScreenEvent/generated-types.js +3 -0
- package/dist/destinations/saleswings/submitScreenEvent/generated-types.js.map +1 -0
- package/dist/destinations/saleswings/submitScreenEvent/index.d.ts +5 -0
- package/dist/destinations/saleswings/submitScreenEvent/index.js +42 -0
- package/dist/destinations/saleswings/submitScreenEvent/index.js.map +1 -0
- package/dist/destinations/saleswings/submitTrackEvent/generated-types.d.ts +14 -0
- package/dist/destinations/saleswings/submitTrackEvent/generated-types.js +3 -0
- package/dist/destinations/saleswings/submitTrackEvent/generated-types.js.map +1 -0
- package/dist/destinations/saleswings/submitTrackEvent/index.d.ts +5 -0
- package/dist/destinations/saleswings/submitTrackEvent/index.js +42 -0
- package/dist/destinations/saleswings/submitTrackEvent/index.js.map +1 -0
- package/dist/destinations/saleswings/testing.d.ts +10 -0
- package/dist/destinations/saleswings/testing.js +55 -0
- package/dist/destinations/saleswings/testing.js.map +1 -0
- package/package.json +4 -6
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.d.ts +0 -15
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js +0 -66
- package/dist/destinations/engage-messaging-twilio/sendSms/sms-sender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.d.ts +0 -23
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/generated-types.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js +0 -122
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/index.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.d.ts +0 -15
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js +0 -66
- package/dist/destinations/engage-messaging-twilio/sendWhatsApp/whatsapp-sender.js.map +0 -1
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.d.ts +0 -23
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js +0 -97
- package/dist/destinations/engage-messaging-twilio/utils/message-sender.js.map +0 -1
|
@@ -9,20 +9,23 @@ const fieldHandler = pipedrive_client_1.default.fieldHandler;
|
|
|
9
9
|
const action = {
|
|
10
10
|
title: 'Create or update an Activity',
|
|
11
11
|
description: "Update an Activity in Pipedrive or create one if it doesn't exist.",
|
|
12
|
-
defaultSubscription: 'type = "track"',
|
|
12
|
+
defaultSubscription: 'type = "track" and event = "Activity Upserted"',
|
|
13
13
|
fields: {
|
|
14
14
|
activity_id: {
|
|
15
15
|
label: 'Activity ID',
|
|
16
16
|
description: 'ID of Activity in Pipedrive to Update. If left empty, a new one will be created',
|
|
17
17
|
type: 'integer',
|
|
18
|
-
required: false
|
|
18
|
+
required: false,
|
|
19
|
+
default: {
|
|
20
|
+
'@path': '$.properties.activity_id'
|
|
21
|
+
}
|
|
19
22
|
},
|
|
20
23
|
person_match_field: {
|
|
21
24
|
label: 'Person match field',
|
|
22
25
|
description: 'If present, used instead of field in settings to find existing person in Pipedrive.',
|
|
23
26
|
type: 'string',
|
|
24
27
|
required: false,
|
|
25
|
-
dynamic: true
|
|
28
|
+
dynamic: true
|
|
26
29
|
},
|
|
27
30
|
person_match_value: {
|
|
28
31
|
label: 'Person match value',
|
|
@@ -38,7 +41,7 @@ const action = {
|
|
|
38
41
|
description: 'If present, used instead of field in settings to find existing organization in Pipedrive.',
|
|
39
42
|
type: 'string',
|
|
40
43
|
required: false,
|
|
41
|
-
dynamic: true
|
|
44
|
+
dynamic: true
|
|
42
45
|
},
|
|
43
46
|
organization_match_value: {
|
|
44
47
|
label: 'Organization match value',
|
|
@@ -46,7 +49,7 @@ const action = {
|
|
|
46
49
|
type: 'string',
|
|
47
50
|
required: false,
|
|
48
51
|
default: {
|
|
49
|
-
'@path': '$.
|
|
52
|
+
'@path': '$.context.groupId'
|
|
50
53
|
}
|
|
51
54
|
},
|
|
52
55
|
deal_match_field: {
|
|
@@ -54,7 +57,7 @@ const action = {
|
|
|
54
57
|
description: 'If present, used instead of field in settings to find existing deal in Pipedrive.',
|
|
55
58
|
type: 'string',
|
|
56
59
|
required: false,
|
|
57
|
-
dynamic: true
|
|
60
|
+
dynamic: true
|
|
58
61
|
},
|
|
59
62
|
deal_match_value: {
|
|
60
63
|
label: 'Deal match value',
|
|
@@ -62,56 +65,80 @@ const action = {
|
|
|
62
65
|
type: 'string',
|
|
63
66
|
required: false,
|
|
64
67
|
default: {
|
|
65
|
-
'@path': '$.
|
|
68
|
+
'@path': '$.properties.deal_id'
|
|
66
69
|
}
|
|
67
70
|
},
|
|
68
71
|
subject: {
|
|
69
72
|
label: 'Activity Subject',
|
|
70
73
|
description: 'Subject of the Activity. When value for subject is not set, it will be given a default value `Call`.',
|
|
71
74
|
type: 'string',
|
|
72
|
-
required: false
|
|
75
|
+
required: false,
|
|
76
|
+
default: {
|
|
77
|
+
'@path': '$.properties.subject'
|
|
78
|
+
}
|
|
73
79
|
},
|
|
74
80
|
type: {
|
|
75
81
|
label: 'Type',
|
|
76
82
|
description: 'Type of the Activity. This is in correlation with the key_string parameter of ActivityTypes. When value for type is not set, it will be given a default value `Call`',
|
|
77
83
|
type: 'string',
|
|
78
|
-
required: false
|
|
84
|
+
required: false,
|
|
85
|
+
default: {
|
|
86
|
+
'@path': '$.properties.type'
|
|
87
|
+
}
|
|
79
88
|
},
|
|
80
89
|
description: {
|
|
81
90
|
label: 'Description',
|
|
82
91
|
description: 'Additional details about the Activity that is synced to your external calendar. Unlike the note added to the Activity, the description is publicly visible to any guests added to the Activity.',
|
|
83
92
|
type: 'string',
|
|
84
|
-
required: false
|
|
93
|
+
required: false,
|
|
94
|
+
default: {
|
|
95
|
+
'@path': '$.properties.description'
|
|
96
|
+
}
|
|
85
97
|
},
|
|
86
98
|
note: {
|
|
87
99
|
label: 'Note',
|
|
88
|
-
description: 'Note of the Activity (HTML
|
|
100
|
+
description: 'Note of the Activity (Accepts plain text and HTML)',
|
|
89
101
|
type: 'string',
|
|
90
|
-
required: false
|
|
102
|
+
required: false,
|
|
103
|
+
default: {
|
|
104
|
+
'@path': '$.properties.note'
|
|
105
|
+
}
|
|
91
106
|
},
|
|
92
107
|
due_date: {
|
|
93
108
|
label: 'Due Date',
|
|
94
109
|
description: 'Due date of the Activity. Format: YYYY-MM-DD',
|
|
95
110
|
type: 'string',
|
|
96
|
-
required: false
|
|
111
|
+
required: false,
|
|
112
|
+
default: {
|
|
113
|
+
'@path': '$.properties.due_date'
|
|
114
|
+
}
|
|
97
115
|
},
|
|
98
116
|
due_time: {
|
|
99
117
|
label: 'Due Time',
|
|
100
|
-
description: 'Due time of the Activity
|
|
118
|
+
description: 'Due time of the Activity. Format: HH:MM',
|
|
101
119
|
type: 'string',
|
|
102
|
-
required: false
|
|
120
|
+
required: false,
|
|
121
|
+
default: {
|
|
122
|
+
'@path': '$.properties.due_time'
|
|
123
|
+
}
|
|
103
124
|
},
|
|
104
125
|
duration: {
|
|
105
126
|
label: 'Duration',
|
|
106
127
|
description: 'Duration of the Activity. Format: HH:MM',
|
|
107
128
|
type: 'string',
|
|
108
|
-
required: false
|
|
129
|
+
required: false,
|
|
130
|
+
default: {
|
|
131
|
+
'@path': '$.properties.duration'
|
|
132
|
+
}
|
|
109
133
|
},
|
|
110
134
|
done: {
|
|
111
135
|
label: 'Done',
|
|
112
136
|
description: 'Whether the Activity is done or not.',
|
|
113
137
|
type: 'boolean',
|
|
114
|
-
required: false
|
|
138
|
+
required: false,
|
|
139
|
+
default: {
|
|
140
|
+
'@path': '$.properties.done'
|
|
141
|
+
}
|
|
115
142
|
}
|
|
116
143
|
},
|
|
117
144
|
dynamicFields: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateActivity/index.ts"],"names":[],"mappings":";;;;;AAGA,2DAA2E;AAC3E,wFAA8D;AAE9D,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,oEAAoE;IACjF,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateActivity/index.ts"],"names":[],"mappings":";;;;;AAGA,2DAA2E;AAC3E,wFAA8D;AAE9D,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,8BAA8B;IACrC,WAAW,EAAE,oEAAoE;IACjF,mBAAmB,EAAE,gDAAgD;IACrE,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,iFAAiF;YAC9F,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,0BAA0B;aACpC;SACF;QACD,kBAAkB,EAAE;YAClB,KAAK,EAAE,oBAAoB;YAC3B,WAAW,E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,EAAE,OAAO,CAAC,QAAQ;YAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,SAAS,EAAE,QAAQ,IAAI,SAAS;YAChC,MAAM,EAAE,cAAc,IAAI,SAAS;YACnC,OAAO,EAAE,MAAM,IAAI,SAAS;SAC7B,CAAA;QAED,OAAO,iCAAoB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC/C,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -9,9 +9,9 @@ const actions_core_1 = require("@segment/actions-core");
|
|
|
9
9
|
const utils_1 = require("../utils");
|
|
10
10
|
const fieldHandler = pipedrive_client_1.default.fieldHandler;
|
|
11
11
|
const action = {
|
|
12
|
-
title: 'Create or
|
|
12
|
+
title: 'Create or update a Deal',
|
|
13
13
|
description: "Update a Deal in Pipedrive or create it if it doesn't exist yet.",
|
|
14
|
-
defaultSubscription: 'type = "track"',
|
|
14
|
+
defaultSubscription: 'type = "track" and event = "Deal Upserted"',
|
|
15
15
|
fields: {
|
|
16
16
|
deal_match_field: {
|
|
17
17
|
label: 'Deal match field',
|
|
@@ -26,7 +26,7 @@ const action = {
|
|
|
26
26
|
type: 'string',
|
|
27
27
|
required: false,
|
|
28
28
|
default: {
|
|
29
|
-
'@path': '$.
|
|
29
|
+
'@path': '$.properties.deal_id'
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
person_match_field: {
|
|
@@ -58,32 +58,44 @@ const action = {
|
|
|
58
58
|
type: 'string',
|
|
59
59
|
required: false,
|
|
60
60
|
default: {
|
|
61
|
-
'@path': '$.
|
|
61
|
+
'@path': '$.context.groupId'
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
title: {
|
|
65
65
|
label: 'Title',
|
|
66
66
|
description: 'Deal title (required for new Leads)',
|
|
67
67
|
type: 'string',
|
|
68
|
-
required: true
|
|
68
|
+
required: true,
|
|
69
|
+
default: {
|
|
70
|
+
'@path': '$.properties.title'
|
|
71
|
+
}
|
|
69
72
|
},
|
|
70
73
|
value: {
|
|
71
74
|
label: 'Value',
|
|
72
75
|
description: 'Value of the deal. If omitted, value will be set to 0.',
|
|
73
76
|
type: 'string',
|
|
74
|
-
required: false
|
|
77
|
+
required: false,
|
|
78
|
+
default: {
|
|
79
|
+
'@path': '$.properties.value'
|
|
80
|
+
}
|
|
75
81
|
},
|
|
76
82
|
currency: {
|
|
77
83
|
label: 'Currency',
|
|
78
84
|
description: 'Currency of the deal. Accepts a 3-character currency code. If omitted, currency will be set to the default currency of the authorized user.',
|
|
79
85
|
type: 'string',
|
|
80
|
-
required: false
|
|
86
|
+
required: false,
|
|
87
|
+
default: {
|
|
88
|
+
'@path': '$.properties.currency'
|
|
89
|
+
}
|
|
81
90
|
},
|
|
82
91
|
stage_id: {
|
|
83
92
|
label: 'Stage ID',
|
|
84
93
|
description: "The ID of a stage this Deal will be placed in a pipeline (note that you can't supply the ID of the pipeline as this will be assigned automatically based on stage_id). If omitted, the deal will be placed in the first stage of the default pipeline.",
|
|
85
94
|
type: 'number',
|
|
86
|
-
required: false
|
|
95
|
+
required: false,
|
|
96
|
+
default: {
|
|
97
|
+
'@path': '$.properties.stage_id'
|
|
98
|
+
}
|
|
87
99
|
},
|
|
88
100
|
status: {
|
|
89
101
|
label: 'Status',
|
|
@@ -101,19 +113,28 @@ const action = {
|
|
|
101
113
|
label: 'Expected Close Date',
|
|
102
114
|
description: 'The expected close date of the Deal. In ISO 8601 format: YYYY-MM-DD.',
|
|
103
115
|
type: 'string',
|
|
104
|
-
required: false
|
|
116
|
+
required: false,
|
|
117
|
+
default: {
|
|
118
|
+
'@path': '$.properties.expected_close_date'
|
|
119
|
+
}
|
|
105
120
|
},
|
|
106
121
|
probability: {
|
|
107
122
|
label: 'Success Probability',
|
|
108
123
|
description: 'Deal success probability percentage. Used/shown only when deal_probability for the pipeline of the deal is enabled.',
|
|
109
124
|
type: 'number',
|
|
110
|
-
required: false
|
|
125
|
+
required: false,
|
|
126
|
+
default: {
|
|
127
|
+
'@path': '$.properties.success_probability'
|
|
128
|
+
}
|
|
111
129
|
},
|
|
112
130
|
lost_reason: {
|
|
113
131
|
label: 'Lost Reason',
|
|
114
132
|
description: 'Optional message about why the deal was lost (to be used when status=lost)',
|
|
115
133
|
type: 'string',
|
|
116
|
-
required: false
|
|
134
|
+
required: false,
|
|
135
|
+
default: {
|
|
136
|
+
'@path': '$.properties.lost_reason'
|
|
137
|
+
}
|
|
117
138
|
},
|
|
118
139
|
visible_to: {
|
|
119
140
|
label: 'Visible To',
|
|
@@ -171,6 +192,9 @@ const action = {
|
|
|
171
192
|
if (!deal.id && !deal.person_id && !deal.org_id) {
|
|
172
193
|
throw new actions_core_1.IntegrationError('No related organization or person, unable to create deal!', 'INVALID_REQUEST_DATA', 400);
|
|
173
194
|
}
|
|
195
|
+
if (!deal.id)
|
|
196
|
+
if (payload.deal_match_field && payload.deal_match_value)
|
|
197
|
+
Object.assign(deal, { [payload.deal_match_field]: payload.deal_match_value });
|
|
174
198
|
utils_1.addCustomFieldsFromPayloadToEntity(payload, deal);
|
|
175
199
|
return deals_1.createUpdateDeal(client, deal);
|
|
176
200
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateDeal/index.ts"],"names":[],"mappings":";;;;;AAGA,wFAA8D;AAC9D,iDAA8D;AAC9D,wDAAwD;AACxD,oCAA6D;AAE7D,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,kEAAkE;IAC/E,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateDeal/index.ts"],"names":[],"mappings":";;;;;AAGA,wFAA8D;AAC9D,iDAA8D;AAC9D,wDAAwD;AACx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C,MAAM,IAAI,+BAAgB,CACxB,2DAA2D,EAC3D,sBAAsB,EACtB,GAAG,CACJ,CAAA;SACF;QACD,IAAI,CAAC,IAAI,CAAC,EAAE;YACV,IAAI,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB;gBAEtD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAA;QAEjF,0CAAkC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;QAEjD,OAAO,wBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACvC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
export interface Payload {
|
|
2
|
-
lead_id?:
|
|
2
|
+
lead_id?: string;
|
|
3
3
|
person_match_field?: string;
|
|
4
4
|
person_match_value?: string;
|
|
5
5
|
organization_match_field?: string;
|
|
6
6
|
organization_match_value?: string;
|
|
7
7
|
title: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
currency?: string;
|
|
11
|
-
};
|
|
8
|
+
amount?: number;
|
|
9
|
+
currency?: string;
|
|
12
10
|
expected_close_date?: string;
|
|
13
11
|
visible_to?: number;
|
|
14
12
|
add_time?: string | number;
|
|
15
|
-
custom_fields?: {
|
|
16
|
-
[k: string]: unknown;
|
|
17
|
-
};
|
|
18
13
|
}
|
|
@@ -6,18 +6,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const pipedrive_client_1 = __importDefault(require("../pipedriveApi/pipedrive-client"));
|
|
7
7
|
const leads_1 = require("../pipedriveApi/leads");
|
|
8
8
|
const actions_core_1 = require("@segment/actions-core");
|
|
9
|
-
const utils_1 = require("../utils");
|
|
10
9
|
const fieldHandler = pipedrive_client_1.default.fieldHandler;
|
|
11
10
|
const action = {
|
|
12
|
-
title: 'Create or
|
|
11
|
+
title: 'Create or update Lead',
|
|
13
12
|
description: "Update a Lead in Pipedrive or create it if it doesn't exist yet.",
|
|
14
13
|
defaultSubscription: 'type = "identify"',
|
|
15
14
|
fields: {
|
|
16
15
|
lead_id: {
|
|
17
16
|
label: 'Lead ID',
|
|
18
17
|
description: 'ID of Lead in Pipedrive to Update. If left empty, a new one will be created',
|
|
19
|
-
type: '
|
|
20
|
-
required: false
|
|
18
|
+
type: 'string',
|
|
19
|
+
required: false,
|
|
20
|
+
default: {
|
|
21
|
+
'@if': {
|
|
22
|
+
exists: { '@path': '$.traits.lead_id' },
|
|
23
|
+
then: { '@path': '$.traits.lead_id' },
|
|
24
|
+
else: { '@path': '$.properties.lead_id' }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
21
27
|
},
|
|
22
28
|
person_match_field: {
|
|
23
29
|
label: 'Person match field',
|
|
@@ -48,28 +54,45 @@ const action = {
|
|
|
48
54
|
type: 'string',
|
|
49
55
|
required: false,
|
|
50
56
|
default: {
|
|
51
|
-
'@path': '$.
|
|
57
|
+
'@path': '$.context.groupId'
|
|
52
58
|
}
|
|
53
59
|
},
|
|
54
60
|
title: {
|
|
55
61
|
label: 'Title',
|
|
56
62
|
description: 'The name of the Lead',
|
|
57
63
|
type: 'string',
|
|
58
|
-
required: true
|
|
64
|
+
required: true,
|
|
65
|
+
default: {
|
|
66
|
+
'@if': {
|
|
67
|
+
exists: { '@path': '$.traits.title' },
|
|
68
|
+
then: { '@path': '$.traits.title' },
|
|
69
|
+
else: { '@path': '$.properties.title' }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
59
72
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
label: 'Value',
|
|
73
|
+
amount: {
|
|
74
|
+
label: 'Amount',
|
|
63
75
|
description: 'Potential value of the lead',
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
76
|
+
type: 'number',
|
|
77
|
+
required: false,
|
|
78
|
+
default: {
|
|
79
|
+
'@if': {
|
|
80
|
+
exists: { '@path': '$.traits.amount' },
|
|
81
|
+
then: { '@path': '$.traits.amount' },
|
|
82
|
+
else: { '@path': '$.properties.amount' }
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
currency: {
|
|
87
|
+
label: 'Currency',
|
|
88
|
+
description: 'Three-letter code of the currency, e.g. USD',
|
|
89
|
+
type: 'string',
|
|
90
|
+
required: false,
|
|
91
|
+
default: {
|
|
92
|
+
'@if': {
|
|
93
|
+
exists: { '@path': '$.traits.currency' },
|
|
94
|
+
then: { '@path': '$.traits.currency' },
|
|
95
|
+
else: { '@path': '$.properties.currency' }
|
|
73
96
|
}
|
|
74
97
|
}
|
|
75
98
|
},
|
|
@@ -77,7 +100,14 @@ const action = {
|
|
|
77
100
|
label: 'Expected Close Date',
|
|
78
101
|
description: 'The date of when the Deal which will be created from the Lead is expected to be closed. In ISO 8601 format: YYYY-MM-DD.',
|
|
79
102
|
type: 'string',
|
|
80
|
-
required: false
|
|
103
|
+
required: false,
|
|
104
|
+
default: {
|
|
105
|
+
'@if': {
|
|
106
|
+
exists: { '@path': '$.traits.expected_close_date' },
|
|
107
|
+
then: { '@path': '$.traits.expected_close_date' },
|
|
108
|
+
else: { '@path': '$.properties.expected_close_date' }
|
|
109
|
+
}
|
|
110
|
+
}
|
|
81
111
|
},
|
|
82
112
|
visible_to: {
|
|
83
113
|
label: 'Visible To',
|
|
@@ -94,12 +124,6 @@ const action = {
|
|
|
94
124
|
description: 'If the lead is created, use this timestamp as the creation timestamp. Format: YYY-MM-DD HH:MM:SS',
|
|
95
125
|
type: 'datetime',
|
|
96
126
|
required: false
|
|
97
|
-
},
|
|
98
|
-
custom_fields: {
|
|
99
|
-
label: 'Custom fields',
|
|
100
|
-
description: 'New values for custom fields.',
|
|
101
|
-
type: 'object',
|
|
102
|
-
required: false
|
|
103
127
|
}
|
|
104
128
|
},
|
|
105
129
|
dynamicFields: {
|
|
@@ -114,6 +138,10 @@ const action = {
|
|
|
114
138
|
client.getId('person', personSearchField, payload.person_match_value),
|
|
115
139
|
client.getId('organization', organizationSearchField, payload.organization_match_value)
|
|
116
140
|
]);
|
|
141
|
+
const leadValue = {
|
|
142
|
+
amount: payload.amount,
|
|
143
|
+
currency: payload.currency
|
|
144
|
+
};
|
|
117
145
|
const lead = {
|
|
118
146
|
id: payload.lead_id,
|
|
119
147
|
title: payload.title,
|
|
@@ -121,13 +149,12 @@ const action = {
|
|
|
121
149
|
visible_to: payload.visible_to,
|
|
122
150
|
person_id: personId || undefined,
|
|
123
151
|
organization_id: organizationId || undefined,
|
|
124
|
-
value: payload.
|
|
152
|
+
value: payload.amount && payload.currency ? leadValue : undefined,
|
|
125
153
|
add_time: payload.add_time ? `${payload.add_time}` : undefined
|
|
126
154
|
};
|
|
127
155
|
if (!lead.id && !lead.person_id && !lead.organization_id) {
|
|
128
156
|
throw new actions_core_1.IntegrationError('No related organization or person, unable to create lead!', 'INVALID_REQUEST_DATA', 400);
|
|
129
157
|
}
|
|
130
|
-
utils_1.addCustomFieldsFromPayloadToEntity(payload, lead);
|
|
131
158
|
return leads_1.createUpdateLead(client, lead);
|
|
132
159
|
}
|
|
133
160
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateLead/index.ts"],"names":[],"mappings":";;;;;AAGA,wFAA8D;AAC9D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateLead/index.ts"],"names":[],"mappings":";;;;;AAGA,wFAA8D;AAC9D,iDAAyE;AACzE,wDAAwD;AAExD,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EAAE,kEAAkE;IAC/E,mBAAmB,EAAE,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AAU;YAC9B,SAAS,EAAE,QAAQ,IAAI,SAAS;YAChC,eAAe,EAAE,cAAc,IAAI,SAAS;YAC5C,KAAK,EAAE,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YACjE,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;SAC/D,CAAA;QAED,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YACxD,MAAM,IAAI,+BAAgB,CACxB,2DAA2D,EAC3D,sBAAsB,EACtB,GAAG,CACJ,CAAA;SACF;QAED,OAAO,wBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACvC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -8,28 +8,34 @@ const pipedrive_client_1 = __importDefault(require("../pipedriveApi/pipedrive-cl
|
|
|
8
8
|
const actions_core_1 = require("@segment/actions-core");
|
|
9
9
|
const fieldHandler = pipedrive_client_1.default.fieldHandler;
|
|
10
10
|
const action = {
|
|
11
|
-
title: 'Create or
|
|
11
|
+
title: 'Create or update a Note',
|
|
12
12
|
description: "Update a Note in Pipedrive or create it if it doesn't exist yet.",
|
|
13
|
-
defaultSubscription: 'type = "track"',
|
|
13
|
+
defaultSubscription: 'type = "track" and event = "Note Upserted"',
|
|
14
14
|
fields: {
|
|
15
15
|
note_id: {
|
|
16
16
|
label: 'Note ID',
|
|
17
17
|
description: 'ID of Note in Pipedrive to Update. If left empty, a new one will be created',
|
|
18
18
|
type: 'integer',
|
|
19
|
-
required: false
|
|
19
|
+
required: false,
|
|
20
|
+
default: {
|
|
21
|
+
'@path': '$.properties.note_id'
|
|
22
|
+
}
|
|
20
23
|
},
|
|
21
24
|
lead_id: {
|
|
22
25
|
label: 'Lead ID',
|
|
23
|
-
description: 'ID of Lead in Pipedrive to link to.
|
|
24
|
-
type: '
|
|
25
|
-
required: false
|
|
26
|
+
description: 'ID of Lead in Pipedrive to link to. One of Lead, Person, Organization or Deal must be linked!',
|
|
27
|
+
type: 'string',
|
|
28
|
+
required: false,
|
|
29
|
+
default: {
|
|
30
|
+
'@path': '$.properties.lead_id'
|
|
31
|
+
}
|
|
26
32
|
},
|
|
27
33
|
person_match_field: {
|
|
28
34
|
label: 'Person match field',
|
|
29
35
|
description: 'If present, used instead of field in settings to find existing person in Pipedrive.',
|
|
30
36
|
type: 'string',
|
|
31
37
|
required: false,
|
|
32
|
-
dynamic: true
|
|
38
|
+
dynamic: true
|
|
33
39
|
},
|
|
34
40
|
person_match_value: {
|
|
35
41
|
label: 'Person match value',
|
|
@@ -45,7 +51,7 @@ const action = {
|
|
|
45
51
|
description: 'If present, used instead of field in settings to find existing organization in Pipedrive.',
|
|
46
52
|
type: 'string',
|
|
47
53
|
required: false,
|
|
48
|
-
dynamic: true
|
|
54
|
+
dynamic: true
|
|
49
55
|
},
|
|
50
56
|
organization_match_value: {
|
|
51
57
|
label: 'Organization match value',
|
|
@@ -53,7 +59,7 @@ const action = {
|
|
|
53
59
|
type: 'string',
|
|
54
60
|
required: false,
|
|
55
61
|
default: {
|
|
56
|
-
'@path': '$.
|
|
62
|
+
'@path': '$.context.groupId'
|
|
57
63
|
}
|
|
58
64
|
},
|
|
59
65
|
deal_match_field: {
|
|
@@ -61,7 +67,7 @@ const action = {
|
|
|
61
67
|
description: 'If present, used instead of field in settings to find existing deal in Pipedrive.',
|
|
62
68
|
type: 'string',
|
|
63
69
|
required: false,
|
|
64
|
-
dynamic: true
|
|
70
|
+
dynamic: true
|
|
65
71
|
},
|
|
66
72
|
deal_match_value: {
|
|
67
73
|
label: 'Deal match value',
|
|
@@ -69,14 +75,17 @@ const action = {
|
|
|
69
75
|
type: 'string',
|
|
70
76
|
required: false,
|
|
71
77
|
default: {
|
|
72
|
-
'@path': '$.
|
|
78
|
+
'@path': '$.properties.deal_id'
|
|
73
79
|
}
|
|
74
80
|
},
|
|
75
81
|
content: {
|
|
76
82
|
label: 'Note Content',
|
|
77
|
-
description: 'Content of the note in HTML format. Subject to sanitization on the back-end.',
|
|
83
|
+
description: 'Content of the note in text or HTML format. Subject to sanitization on the back-end.',
|
|
78
84
|
type: 'string',
|
|
79
|
-
required: true
|
|
85
|
+
required: true,
|
|
86
|
+
default: {
|
|
87
|
+
'@path': '$.properties.content'
|
|
88
|
+
}
|
|
80
89
|
}
|
|
81
90
|
},
|
|
82
91
|
dynamicFields: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateNote/index.ts"],"names":[],"mappings":";;;;;AAEA,iDAAwD;AACxD,wFAA8D;AAE9D,wDAAwD;AAExD,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,kEAAkE;IAC/E,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateNote/index.ts"],"names":[],"mappings":";;;;;AAEA,iDAAwD;AACxD,wFAA8D;AAE9D,wDAAwD;AAExD,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,kEAAkE;IAC/E,mBAAmB,EAAE,4CAA4C;IACjE,MAAM,EAAE;QACN,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,6EAA6E;YAC1F,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,OAAO,EAAE,sBAAsB;aAChC;SACF;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;Y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SAAS;SAC7B,CAAA;QAED,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,EAAE;YACpG,MAAM,IAAI,+BAAgB,CACxB,kEAAkE,EAClE,sBAAsB,EACtB,GAAG,CACJ,CAAA;SACF;QAED,OAAO,kBAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACjC,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -25,14 +25,17 @@ const action = {
|
|
|
25
25
|
type: 'string',
|
|
26
26
|
required: true,
|
|
27
27
|
default: {
|
|
28
|
-
'@path': '$.
|
|
28
|
+
'@path': '$.groupId'
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
name: {
|
|
32
32
|
label: 'Organization Name',
|
|
33
33
|
description: 'Name of the organization',
|
|
34
34
|
type: 'string',
|
|
35
|
-
required: false
|
|
35
|
+
required: false,
|
|
36
|
+
default: {
|
|
37
|
+
'@path': '$.traits.name'
|
|
38
|
+
}
|
|
36
39
|
},
|
|
37
40
|
visible_to: {
|
|
38
41
|
label: 'Visible To',
|
|
@@ -68,6 +71,9 @@ const action = {
|
|
|
68
71
|
add_time: payload.add_time ? `${payload.add_time}` : undefined,
|
|
69
72
|
visible_to: payload.visible_to
|
|
70
73
|
};
|
|
74
|
+
if (!organizationId)
|
|
75
|
+
if (payload.match_field && payload.match_value)
|
|
76
|
+
Object.assign(organization, { [payload.match_field]: payload.match_value });
|
|
71
77
|
utils_1.addCustomFieldsFromPayloadToEntity(payload, organization);
|
|
72
78
|
return organizations_1.createOrUpdateOrganizationById(request, settings.domain, organizationId, organization);
|
|
73
79
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateOrganization/index.ts"],"names":[],"mappings":";;;;;AAGA,wFAA8D;AAC9D,iEAA4F;AAC5F,oCAA6D;AAE7D,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,+BAA+B;IACtC,WAAW,EAAE,2EAA2E;IACxF,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,2FAA2F;YACxG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,IAAI;SACd;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pipedrive/createUpdateOrganization/index.ts"],"names":[],"mappings":";;;;;AAGA,wFAA8D;AAC9D,iEAA4F;AAC5F,oCAA6D;AAE7D,MAAM,YAAY,GAAG,0BAAe,CAAC,YAAY,CAAA;AAEjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,+BAA+B;IACtC,WAAW,EAAE,2EAA2E;IACxF,mBAAmB,EAAE,gBAAgB;IACrC,MAAM,EAAE;QACN,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,2FAA2F;YACxG,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,IAAI;SACd;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,wCAAwC;YACrD,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,OAAO,EAAE,WAAW;aACrB;SACF;QACD,IAAI,EAAE;YAC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