@segment/action-destinations 3.86.0 → 3.86.1-alpha.3
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/cordial/addProductToCart/index.js +1 -1
- package/dist/destinations/cordial/addProductToCart/index.js.map +1 -1
- package/dist/destinations/cordial/index.js +1 -1
- package/dist/destinations/cordial/index.js.map +1 -1
- package/dist/destinations/cordial/removeProductFromCart/index.js.map +1 -1
- package/dist/destinations/cordial/upsertOrder/index.js +8 -8
- package/dist/destinations/cordial/upsertOrder/index.js.map +1 -1
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js +3 -2
- package/dist/destinations/google-enhanced-conversions/postConversion/index.js.map +1 -1
- package/dist/destinations/index.js +1 -0
- package/dist/destinations/index.js.map +1 -1
- package/dist/destinations/intercom/generated-types.d.ts +2 -0
- package/dist/destinations/intercom/generated-types.js +3 -0
- package/dist/destinations/intercom/generated-types.js.map +1 -0
- package/dist/destinations/intercom/groupIdentifyContact/generated-types.d.ts +14 -0
- package/dist/destinations/intercom/groupIdentifyContact/generated-types.js +3 -0
- package/dist/destinations/intercom/groupIdentifyContact/generated-types.js.map +1 -0
- package/dist/destinations/intercom/groupIdentifyContact/index.d.ts +5 -0
- package/dist/destinations/intercom/groupIdentifyContact/index.js +122 -0
- package/dist/destinations/intercom/groupIdentifyContact/index.js.map +1 -0
- package/dist/destinations/intercom/identifyContact/generated-types.d.ts +15 -0
- package/dist/destinations/intercom/identifyContact/generated-types.js +3 -0
- package/dist/destinations/intercom/identifyContact/generated-types.js.map +1 -0
- package/dist/destinations/intercom/identifyContact/index.d.ts +5 -0
- package/dist/destinations/intercom/identifyContact/index.js +153 -0
- package/dist/destinations/intercom/identifyContact/index.js.map +1 -0
- package/dist/destinations/intercom/index.d.ts +4 -0
- package/dist/destinations/intercom/index.js +37 -0
- package/dist/destinations/intercom/index.js.map +1 -0
- package/dist/destinations/pardot/generated-types.d.ts +5 -0
- package/dist/destinations/pardot/generated-types.js +3 -0
- package/dist/destinations/pardot/generated-types.js.map +1 -0
- package/dist/destinations/pardot/index.d.ts +4 -0
- package/dist/destinations/pardot/index.js +62 -0
- package/dist/destinations/pardot/index.js.map +1 -0
- package/dist/destinations/pardot/pa-operations.d.ts +17 -0
- package/dist/destinations/pardot/pa-operations.js +51 -0
- package/dist/destinations/pardot/pa-operations.js.map +1 -0
- package/dist/destinations/pardot/pa-properties.d.ts +2 -0
- package/dist/destinations/pardot/pa-properties.js +13 -0
- package/dist/destinations/pardot/pa-properties.js.map +1 -0
- package/dist/destinations/pardot/pa-type.d.ts +15 -0
- package/dist/destinations/pardot/pa-type.js +3 -0
- package/dist/destinations/pardot/pa-type.js.map +1 -0
- package/dist/destinations/pardot/prospects/generated-types.d.ts +19 -0
- package/dist/destinations/pardot/prospects/generated-types.js +3 -0
- package/dist/destinations/pardot/prospects/generated-types.js.map +1 -0
- package/dist/destinations/pardot/prospects/index.d.ts +5 -0
- package/dist/destinations/pardot/prospects/index.js +200 -0
- package/dist/destinations/pardot/prospects/index.js.map +1 -0
- package/dist/destinations/personas-messaging-sendgrid/sendEmail/generated-types.d.ts +3 -0
- package/dist/destinations/personas-messaging-sendgrid/sendEmail/index.js +47 -2
- package/dist/destinations/personas-messaging-sendgrid/sendEmail/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const prospects_1 = __importDefault(require("./prospects"));
|
|
7
|
+
const destination = {
|
|
8
|
+
name: 'Pardot (Actions)',
|
|
9
|
+
slug: 'actions-pardot',
|
|
10
|
+
mode: 'cloud',
|
|
11
|
+
authentication: {
|
|
12
|
+
scheme: 'oauth2',
|
|
13
|
+
fields: {
|
|
14
|
+
businessUnitID: {
|
|
15
|
+
label: 'Pardot Business Unit ID',
|
|
16
|
+
description: 'The Pardot Business Unit ID associated with your Pardot Account. ' +
|
|
17
|
+
'To find your Business Unit ID in Salesforce, go to **Setup** and search for `Pardot`. Your Pardot Business Unit ID is an 18-character string that starts with `0Uv`. If you cannot access the Pardot Account Setup information, ask your Salesforce Administrator to find the Pardot Business Unit ID for you.',
|
|
18
|
+
type: 'string',
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
accountID: {
|
|
22
|
+
label: 'Account ID',
|
|
23
|
+
description: 'You can find your Account ID (`piAId`) under **Marketing > Campaigns** in your [Pardot account](https://pi.pardot.com/campaign). After selecting your desired website campaign, press **View Tracking Code**. ',
|
|
24
|
+
type: 'string',
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
isSandbox: {
|
|
28
|
+
label: 'Sandbox Instance',
|
|
29
|
+
description: 'Enable to authenticate into a sandbox instance. You can log in to a sandbox by appending the sandbox name to your Salesforce username. For example, if a username for a production org is user@acme.com and the sandbox is named `test`, the username to log in to the sandbox is user@acme.com.test. If you are already authenticated, please disconnect and reconnect with your sandbox username.',
|
|
30
|
+
type: 'boolean',
|
|
31
|
+
default: false,
|
|
32
|
+
required: true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
refreshAccessToken: async (request, { auth, settings }) => {
|
|
36
|
+
const baseUrl = settings.isSandbox ? 'https://test.salesforce.com' : 'https://login.salesforce.com';
|
|
37
|
+
const res = await request(`${baseUrl}/services/oauth2/token`, {
|
|
38
|
+
method: 'POST',
|
|
39
|
+
body: new URLSearchParams({
|
|
40
|
+
refresh_token: auth.refreshToken,
|
|
41
|
+
client_id: auth.clientId,
|
|
42
|
+
client_secret: auth.clientSecret,
|
|
43
|
+
grant_type: 'refresh_token'
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
return { accessToken: res.data.access_token };
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
extendRequest({ settings, auth }) {
|
|
50
|
+
return {
|
|
51
|
+
headers: {
|
|
52
|
+
Authorization: `Bearer ${auth?.accessToken}`,
|
|
53
|
+
'Pardot-Business-Unit-Id': settings.businessUnitID
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
actions: {
|
|
58
|
+
prospects: prospects_1.default
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
exports.default = destination;
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/destinations/pardot/index.ts"],"names":[],"mappings":";;;;;AAEA,4DAAmC;AAMnC,MAAM,WAAW,GAAoC;IACnD,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,OAAO;IAEb,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE;YACN,cAAc,EAAE;gBACd,KAAK,EAAE,yBAAyB;gBAChC,WAAW,EACT,mEAAmE;oBACnE,iTAAiT;gBACnT,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,YAAY;gBACnB,WAAW,EACT,gNAAgN;gBAClN,IAAI,EAAE,QAAQ;gBACd,QAAQ,EAAE,IAAI;aACf;YACD,SAAS,EAAE;gBACT,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EACT,qYAAqY;gBACvY,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,IAAI;aACf;SACF;QACD,kBAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;YAExD,MAAM,OAAO,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,8BAA8B,CAAA;YACnG,MAAM,GAAG,GAAG,MAAM,OAAO,CAAuB,GAAG,OAAO,wBAAwB,EAAE;gBAClF,MAAM,EAAE,MAAM;gBACd,IAAI,EAAE,IAAI,eAAe,CAAC;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,SAAS,EAAE,IAAI,CAAC,QAAQ;oBACxB,aAAa,EAAE,IAAI,CAAC,YAAY;oBAChC,UAAU,EAAE,eAAe;iBAC5B,CAAC;aACH,CAAC,CAAA;YACF,OAAO,EAAE,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,CAAA;QAC/C,CAAC;KACF;IACD,aAAa,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC9B,OAAO;YACL,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,IAAI,EAAE,WAAW,EAAE;gBAC5C,yBAAyB,EAAE,QAAQ,CAAC,cAAc;aACnD;SACF,CAAA;IACH,CAAC;IAED,OAAO,EAAE;QACP,SAAS,EAAT,mBAAS;KACV;CACF,CAAA;AAED,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RequestClient } from '@segment/actions-core';
|
|
2
|
+
import type { Payload as ProspectsPayload } from './prospects/generated-types';
|
|
3
|
+
export declare const API_VERSION = "v5";
|
|
4
|
+
interface ProspectUpsertResponseData {
|
|
5
|
+
id: string;
|
|
6
|
+
email: string;
|
|
7
|
+
}
|
|
8
|
+
export default class Pardot {
|
|
9
|
+
businessUnitID: string;
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
request: RequestClient;
|
|
12
|
+
constructor(businessUnitID: string, baseUrl: string, request: RequestClient);
|
|
13
|
+
upsertRecord: (payload: ProspectsPayload) => Promise<import("@segment/actions-core").ModifiedResponse<ProspectUpsertResponseData>>;
|
|
14
|
+
private ProspectsShape;
|
|
15
|
+
private buildProspectJSON;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_VERSION = void 0;
|
|
4
|
+
exports.API_VERSION = 'v5';
|
|
5
|
+
class Pardot {
|
|
6
|
+
constructor(businessUnitID, baseUrl, request) {
|
|
7
|
+
this.upsertRecord = async (payload) => {
|
|
8
|
+
const prospect = this.buildProspectJSON(payload);
|
|
9
|
+
return this.request(`${this.baseUrl}/api/${exports.API_VERSION}/objects/prospects/do/upsertLatestByEmail`, {
|
|
10
|
+
method: 'post',
|
|
11
|
+
headers: {
|
|
12
|
+
'Content-Type': 'application/json'
|
|
13
|
+
},
|
|
14
|
+
json: {
|
|
15
|
+
matchEmail: payload.email,
|
|
16
|
+
prospect: prospect,
|
|
17
|
+
secondaryDeletedSearch: payload.secondaryDeletedSearch
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
this.ProspectsShape = (payload) => {
|
|
22
|
+
return {
|
|
23
|
+
email: payload.email,
|
|
24
|
+
firstName: payload.firstName,
|
|
25
|
+
lastName: payload.lastName,
|
|
26
|
+
salutation: payload.salutation,
|
|
27
|
+
phone: payload.phone,
|
|
28
|
+
company: payload.company,
|
|
29
|
+
jobTitle: payload.jobTitle,
|
|
30
|
+
industry: payload.industry,
|
|
31
|
+
city: payload.city,
|
|
32
|
+
state: payload.state,
|
|
33
|
+
zip: payload.zip,
|
|
34
|
+
country: payload.country,
|
|
35
|
+
website: payload.website
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
this.buildProspectJSON = (payload) => {
|
|
39
|
+
let baseShape = this.ProspectsShape(payload);
|
|
40
|
+
if (payload.customFields) {
|
|
41
|
+
baseShape = { ...baseShape, ...payload.customFields };
|
|
42
|
+
}
|
|
43
|
+
return baseShape;
|
|
44
|
+
};
|
|
45
|
+
this.businessUnitID = businessUnitID;
|
|
46
|
+
this.baseUrl = baseUrl;
|
|
47
|
+
this.request = request;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.default = Pardot;
|
|
51
|
+
//# sourceMappingURL=pa-operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pa-operations.js","sourceRoot":"","sources":["../../../src/destinations/pardot/pa-operations.ts"],"names":[],"mappings":";;;AAIa,QAAA,WAAW,GAAG,IAAI,CAAA;AAO/B,MAAqB,MAAM;IAKzB,YAAY,cAAsB,EAAE,OAAe,EAAE,OAAsB;QAM3E,iBAAY,GAAG,KAAK,EAAE,OAAyB,EAAE,EAAE;YACjD,MAAM,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAA;YAEhD,OAAO,IAAI,CAAC,OAAO,CACjB,GAAG,IAAI,CAAC,OAAO,QAAQ,mBAAW,2CAA2C,EAC7E;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE;oBACJ,UAAU,EAAE,OAAO,CAAC,KAAK;oBACzB,QAAQ,EAAE,QAAQ;oBAClB,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;iBACvD;aACF,CACF,CAAA;QACH,CAAC,CAAA;QAEO,mBAAc,GAAG,CAAC,OAAyB,EAAiB,EAAE;YACpE,OAAO;gBACL,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,UAAU,EAAE,OAAO,CAAC,UAAU;gBAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,OAAO,EAAE,OAAO,CAAC,OAAO;aACzB,CAAA;QACH,CAAC,CAAA;QAEO,sBAAiB,GAAG,CAAC,OAAyB,EAAE,EAAE;YACxD,IAAI,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;YAE5C,IAAI,OAAO,CAAC,YAAY,EAAE;gBACxB,SAAS,GAAG,EAAE,GAAG,SAAS,EAAE,GAAG,OAAO,CAAC,YAAY,EAAE,CAAA;aACtD;YAED,OAAO,SAAS,CAAA;QAClB,CAAC,CAAA;QAlDC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IACxB,CAAC;CAgDF;AAzDD,yBAyDC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customFields = void 0;
|
|
4
|
+
exports.customFields = {
|
|
5
|
+
label: 'Other Fields',
|
|
6
|
+
description: `
|
|
7
|
+
Additional prospect fields to send to Pardot.
|
|
8
|
+
Only editable fields are accepted. Please see [Pardot docs](https://developer.salesforce.com/docs/marketing/pardot/guide/prospect-v5.html#fields) for more details. On the left-hand side, input the Pardot field name. On the right-hand side, map the Segment field that contains the value.`,
|
|
9
|
+
type: 'object',
|
|
10
|
+
required: false,
|
|
11
|
+
defaultObjectUI: 'keyvalue'
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=pa-properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pa-properties.js","sourceRoot":"","sources":["../../../src/destinations/pardot/pa-properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAe;IACtC,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE;;iSAEkR;IAC/R,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,KAAK;IACf,eAAe,EAAE,UAAU;CAC5B,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare type ProspectsType = {
|
|
2
|
+
email: string;
|
|
3
|
+
firstName?: string;
|
|
4
|
+
lastName?: string;
|
|
5
|
+
salutation?: string;
|
|
6
|
+
phone?: string;
|
|
7
|
+
company?: string;
|
|
8
|
+
jobTitle?: string;
|
|
9
|
+
industry?: string;
|
|
10
|
+
city?: string;
|
|
11
|
+
state?: string;
|
|
12
|
+
zip?: string;
|
|
13
|
+
country?: string;
|
|
14
|
+
website?: string;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pa-type.js","sourceRoot":"","sources":["../../../src/destinations/pardot/pa-type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface Payload {
|
|
2
|
+
email: string;
|
|
3
|
+
firstName?: string;
|
|
4
|
+
lastName?: string;
|
|
5
|
+
salutation?: string;
|
|
6
|
+
phone?: string;
|
|
7
|
+
company?: string;
|
|
8
|
+
jobTitle?: string;
|
|
9
|
+
industry?: string;
|
|
10
|
+
city?: string;
|
|
11
|
+
state?: string;
|
|
12
|
+
zip?: string;
|
|
13
|
+
country?: string;
|
|
14
|
+
website?: string;
|
|
15
|
+
secondaryDeletedSearch: boolean;
|
|
16
|
+
customFields?: {
|
|
17
|
+
[k: string]: unknown;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generated-types.js","sourceRoot":"","sources":["../../../../src/destinations/pardot/prospects/generated-types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const actions_core_1 = require("@segment/actions-core");
|
|
7
|
+
const pa_operations_1 = __importDefault(require("../pa-operations"));
|
|
8
|
+
const pa_properties_1 = require("../pa-properties");
|
|
9
|
+
const action = {
|
|
10
|
+
title: 'Prospect',
|
|
11
|
+
description: 'Represents an opportunity, which is a sale or pending deal.',
|
|
12
|
+
fields: {
|
|
13
|
+
email: {
|
|
14
|
+
label: 'Email Address',
|
|
15
|
+
description: `The prospect's email address.
|
|
16
|
+
Used to upsert prospect. If multiple prospects have the given email, the prospect with the latest activity is updated. If there's no prospect with the given email, a prospect is created. Please note that Pardot treats email address as case sensitive and will create multiple prospects for casing differences.`,
|
|
17
|
+
type: 'string',
|
|
18
|
+
required: true,
|
|
19
|
+
default: {
|
|
20
|
+
'@if': {
|
|
21
|
+
exists: { '@path': '$.traits.email' },
|
|
22
|
+
then: { '@path': '$.traits.email' },
|
|
23
|
+
else: { '@path': '$.properties.email' }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
firstName: {
|
|
28
|
+
label: 'First Name',
|
|
29
|
+
description: "The prospect's first name.",
|
|
30
|
+
type: 'string',
|
|
31
|
+
required: false,
|
|
32
|
+
default: {
|
|
33
|
+
'@if': {
|
|
34
|
+
exists: { '@path': '$.traits.first_name' },
|
|
35
|
+
then: { '@path': '$.traits.first_name' },
|
|
36
|
+
else: { '@path': '$.properties.first_name' }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
lastName: {
|
|
41
|
+
label: 'Last Name',
|
|
42
|
+
description: "The prospect's last name.",
|
|
43
|
+
type: 'string',
|
|
44
|
+
required: false,
|
|
45
|
+
default: {
|
|
46
|
+
'@if': {
|
|
47
|
+
exists: { '@path': '$.traits.last_name' },
|
|
48
|
+
then: { '@path': '$.traits.last_name' },
|
|
49
|
+
else: { '@path': '$.properties.last_name' }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
salutation: {
|
|
54
|
+
label: 'Salutation',
|
|
55
|
+
description: "The prospect's formal prefix.",
|
|
56
|
+
type: 'string',
|
|
57
|
+
required: false
|
|
58
|
+
},
|
|
59
|
+
phone: {
|
|
60
|
+
label: 'Phone Number',
|
|
61
|
+
description: "The prospect's phone number.",
|
|
62
|
+
type: 'string',
|
|
63
|
+
required: false,
|
|
64
|
+
default: {
|
|
65
|
+
'@if': {
|
|
66
|
+
exists: { '@path': '$.traits.phone' },
|
|
67
|
+
then: { '@path': '$.traits.phone' },
|
|
68
|
+
else: { '@path': '$.properties.phone' }
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
company: {
|
|
73
|
+
label: 'Company',
|
|
74
|
+
description: "The prospect's company.",
|
|
75
|
+
type: 'string',
|
|
76
|
+
required: false,
|
|
77
|
+
default: {
|
|
78
|
+
'@if': {
|
|
79
|
+
exists: { '@path': '$.traits.company' },
|
|
80
|
+
then: { '@path': '$.traits.company' },
|
|
81
|
+
else: { '@path': '$.properties.company' }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
jobTitle: {
|
|
86
|
+
label: 'Job Title',
|
|
87
|
+
description: "The prospect's job title.",
|
|
88
|
+
type: 'string',
|
|
89
|
+
required: false,
|
|
90
|
+
default: {
|
|
91
|
+
'@if': {
|
|
92
|
+
exists: { '@path': '$.traits.title' },
|
|
93
|
+
then: { '@path': '$.traits.title' },
|
|
94
|
+
else: { '@path': '$.properties.title' }
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
industry: {
|
|
99
|
+
label: 'Industry',
|
|
100
|
+
description: "The prospect's industry.",
|
|
101
|
+
type: 'string',
|
|
102
|
+
required: false
|
|
103
|
+
},
|
|
104
|
+
city: {
|
|
105
|
+
label: 'City',
|
|
106
|
+
description: "The prospect's city.",
|
|
107
|
+
type: 'string',
|
|
108
|
+
required: false,
|
|
109
|
+
default: {
|
|
110
|
+
'@if': {
|
|
111
|
+
exists: { '@path': '$.traits.address.city' },
|
|
112
|
+
then: { '@path': '$.traits.address.city' },
|
|
113
|
+
else: { '@path': '$.properties.address.city' }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
state: {
|
|
118
|
+
label: 'State',
|
|
119
|
+
description: "The prospect's US state.",
|
|
120
|
+
type: 'string',
|
|
121
|
+
required: false,
|
|
122
|
+
default: {
|
|
123
|
+
'@if': {
|
|
124
|
+
exists: { '@path': '$.traits.address.state' },
|
|
125
|
+
then: { '@path': '$.traits.address.state' },
|
|
126
|
+
else: { '@path': '$.properties.address.state' }
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
zip: {
|
|
131
|
+
label: 'Zip Code',
|
|
132
|
+
description: "The prospect's postal code.",
|
|
133
|
+
type: 'string',
|
|
134
|
+
required: false,
|
|
135
|
+
default: {
|
|
136
|
+
'@if': {
|
|
137
|
+
exists: { '@path': '$.traits.address.postal_code' },
|
|
138
|
+
then: { '@path': '$.traits.address.postal_code' },
|
|
139
|
+
else: { '@path': '$.properties.address.postal_code' }
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
country: {
|
|
144
|
+
label: 'Country',
|
|
145
|
+
description: "The prospect's country.",
|
|
146
|
+
type: 'string',
|
|
147
|
+
required: false,
|
|
148
|
+
default: {
|
|
149
|
+
'@if': {
|
|
150
|
+
exists: { '@path': '$.traits.address.country' },
|
|
151
|
+
then: { '@path': '$.traits.address.country' },
|
|
152
|
+
else: { '@path': '$.properties.address.country' }
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
website: {
|
|
157
|
+
label: 'Website',
|
|
158
|
+
description: "The prospect's website URL.",
|
|
159
|
+
type: 'string',
|
|
160
|
+
required: false,
|
|
161
|
+
default: {
|
|
162
|
+
'@if': {
|
|
163
|
+
exists: { '@path': '$.traits.website' },
|
|
164
|
+
then: { '@path': '$.traits.website' },
|
|
165
|
+
else: { '@path': '$.properties.website' }
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
secondaryDeletedSearch: {
|
|
170
|
+
label: 'Search Deleted Prospects',
|
|
171
|
+
description: `If true, the request’s search includes deleted records. This property only affects [AMPSEA accounts](https://help.salesforce.com/s/articleView?id=sf.pardot_admin_ampsea_parent.htm&type=5).
|
|
172
|
+
If all records with a matching email address are deleted, the one with the latest activity is undeleted and updated. Otherwise, a new prospect is created.`,
|
|
173
|
+
type: 'boolean',
|
|
174
|
+
required: true,
|
|
175
|
+
default: true
|
|
176
|
+
},
|
|
177
|
+
customFields: pa_properties_1.customFields
|
|
178
|
+
},
|
|
179
|
+
perform: async (request, { settings, payload }) => {
|
|
180
|
+
const baseUrl = settings.isSandbox ? 'https://pi.demo.pardot.com' : 'https://pi.pardot.com';
|
|
181
|
+
const pa = new pa_operations_1.default(settings.businessUnitID, baseUrl, request);
|
|
182
|
+
try {
|
|
183
|
+
return await pa.upsertRecord(payload);
|
|
184
|
+
}
|
|
185
|
+
catch (err) {
|
|
186
|
+
const error = err;
|
|
187
|
+
const statusCode = error.response.status;
|
|
188
|
+
if (statusCode === 403) {
|
|
189
|
+
const data = error.response.content;
|
|
190
|
+
const invalidId = data.includes('Business Unit specified in Pardot-Business-Unit-Id header not found or inactive.');
|
|
191
|
+
if (invalidId) {
|
|
192
|
+
throw new actions_core_1.IntegrationError(`The Business Unit ID is invalid or the business unit isn't active. This error is also returned when you use the wrong instance (Production or Sandbox).`, 'INVALID_BUSINESSUNITID', 403);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
throw err;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
exports.default = action;
|
|
200
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/pardot/prospects/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAAqF;AAGrF,qEAAqC;AACrC,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AA"}
|
|
@@ -215,6 +215,30 @@ const action = {
|
|
|
215
215
|
]
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
|
+
audienceId: {
|
|
219
|
+
label: 'Audience ID',
|
|
220
|
+
type: 'string',
|
|
221
|
+
description: 'The Audience ID of the Journey Step.',
|
|
222
|
+
default: {
|
|
223
|
+
'@path': '$.context.personas.computation_id'
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
spaceId: {
|
|
227
|
+
label: 'Space ID',
|
|
228
|
+
type: 'string',
|
|
229
|
+
description: 'The Personas Space ID',
|
|
230
|
+
default: {
|
|
231
|
+
'@path': '$.context.personas.space_id'
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
projectId: {
|
|
235
|
+
label: 'Project ID',
|
|
236
|
+
type: 'string',
|
|
237
|
+
description: 'The Project ID or Destination Config Identifier to associate a Action instance.',
|
|
238
|
+
default: {
|
|
239
|
+
'@path': '$.projectId'
|
|
240
|
+
}
|
|
241
|
+
},
|
|
218
242
|
customArgs: {
|
|
219
243
|
label: 'Custom Args',
|
|
220
244
|
description: 'Additional custom args that we be passed back opaquely on webhook events',
|
|
@@ -222,16 +246,22 @@ const action = {
|
|
|
222
246
|
required: false
|
|
223
247
|
}
|
|
224
248
|
},
|
|
225
|
-
perform: async (request, { settings, payload }) => {
|
|
249
|
+
perform: async (request, { settings, payload, statsContext }) => {
|
|
250
|
+
const statsClient = statsContext?.statsClient;
|
|
251
|
+
const tags = statsContext?.tags;
|
|
252
|
+
tags?.push(`${payload.spaceId}:${payload.audienceId}:${payload.projectId}`);
|
|
226
253
|
if (!payload.send) {
|
|
254
|
+
statsClient?.incr('actions-personas-messaging-sendgrid.send-disabled', 1, tags);
|
|
227
255
|
return;
|
|
228
256
|
}
|
|
229
257
|
const emailProfile = payload?.externalIds?.find((meta) => meta.type === 'email');
|
|
230
258
|
if (!emailProfile?.subscriptionStatus ||
|
|
231
259
|
['unsubscribed', 'did not subscribed', 'false'].includes(emailProfile.subscriptionStatus)) {
|
|
260
|
+
statsClient?.incr('actions-personas-messaging-sendgrid.notsubscribed', 1, tags);
|
|
232
261
|
return;
|
|
233
262
|
}
|
|
234
263
|
else if (['subscribed', 'true'].includes(emailProfile?.subscriptionStatus)) {
|
|
264
|
+
statsClient?.incr('actions-personas-messaging-sendgrid.subscribed', 1, tags);
|
|
235
265
|
const traits = await fetchProfileTraits(request, settings, payload.userId);
|
|
236
266
|
const profile = {
|
|
237
267
|
email: emailProfile.id,
|
|
@@ -242,6 +272,7 @@ const action = {
|
|
|
242
272
|
return;
|
|
243
273
|
}
|
|
244
274
|
if (isRestrictedDomain(toEmail)) {
|
|
275
|
+
statsClient?.incr('actions-personas-messaging-sendgrid.restricted-domain', 1, tags);
|
|
245
276
|
throw new actions_core_1.IntegrationError('Emails with gmailx.com, yahoox.com, aolx.com, and hotmailx.com domains are blocked.', 'Invalid input', 400);
|
|
246
277
|
}
|
|
247
278
|
let name;
|
|
@@ -273,7 +304,7 @@ const action = {
|
|
|
273
304
|
const parsedPreviewText = await parseTemplating(payload.previewText, profile, 'Preview text');
|
|
274
305
|
parsedBodyHtml = insertEmailPreviewText(parsedBodyHtml, parsedPreviewText);
|
|
275
306
|
}
|
|
276
|
-
|
|
307
|
+
const response = await request('https://api.sendgrid.com/v3/mail/send', {
|
|
277
308
|
method: 'post',
|
|
278
309
|
headers: {
|
|
279
310
|
authorization: `Bearer ${settings.sendGridApiKey}`
|
|
@@ -321,6 +352,20 @@ const action = {
|
|
|
321
352
|
}
|
|
322
353
|
}
|
|
323
354
|
});
|
|
355
|
+
if (response.status > 200 && response.status < 300) {
|
|
356
|
+
tags?.push('2xx');
|
|
357
|
+
}
|
|
358
|
+
if (response.status > 400 && response.status < 413) {
|
|
359
|
+
tags?.push('4xx');
|
|
360
|
+
}
|
|
361
|
+
if (response.status == 429) {
|
|
362
|
+
tags?.push('429');
|
|
363
|
+
}
|
|
364
|
+
if (response.status > 500) {
|
|
365
|
+
tags?.push('5xx');
|
|
366
|
+
}
|
|
367
|
+
statsClient?.incr('actions-personas-messaging-sendgrid.response', 1, tags);
|
|
368
|
+
return response;
|
|
324
369
|
}
|
|
325
370
|
else {
|
|
326
371
|
throw new actions_core_1.IntegrationError(`Failed to process the subscription state: "${emailProfile.subscriptionStatus}"`, 'Invalid subscriptionStatus value', 400);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/personas-messaging-sendgrid/sendEmail/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0F;AAG1F,uCAA6C;AAC7C,sDAA6B;AAC7B,6CAAwC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/personas-messaging-sendgrid/sendEmail/index.ts"],"names":[],"mappings":";;;;;AAAA,wDAA0F;AAG1F,uCAA6C;AAC7C,sDAA6B;AAC7B,6CAAwC;AACxC,MAAM,MAAM,GAAG,IAAI,iBAAQ,EAAE,CAAA;AAE7B,MAAM,sBAAsB,GAAG,CAAC,IAAY,EAAE,WAAmB,EAAU,EAAE;IAC3E,MAAM,CAAC,GAAG,iBAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAG5B,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC;;QAEZ,wBAAU,CAAC,WAAW,CAAC;;;;QAIvB,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;;GAE9B,CAAC,CAAA;IAEF,OAAO,CAAC,CAAC,IAAI,EAAE,CAAA;AACjB,CAAC,CAAA;AAGD,MAAM,qBAAqB,GAAG,CAAC,WAAmB,EAAU,EAAE;IAC5D,OAAO,4BAA4B,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAA;AACrF,CAAC,CAAA;AAID,MAAM,kBAAkB,GAAG,KAAK,EAC9B,OAAkB,EAClB,QAAkB,EAClB,SAAiB,EACgB,EAAE;IACnC,IAAI;QACF,MAAM,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AAI,GAAG,EAAE;gBAC1B,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;aAClB;YACD,IAAI,QAAQ,CAAC,MAAM,GAAG,GAAG,EAAE;gBACzB,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAA;aAClB;YACD,WAAW,EAAE,IAAI,CAAC,8CAA8C,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;YAC1E,OAAO,QAAQ,CAAA;SAChB;aAAM;YACL,MAAM,IAAI,+BAAgB,CACxB,8CAA8C,YAAY,CAAC,kBAAkB,GAAG,EAChF,kCAAkC,EAClC,GAAG,CACJ,CAAA;SACF;IACH,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segment/action-destinations",
|
|
3
3
|
"description": "Destination Actions engine and definitions.",
|
|
4
|
-
"version": "3.86.
|
|
4
|
+
"version": "3.86.1-alpha.3",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/segmentio/action-destinations",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@amplitude/ua-parser-js": "^0.7.25",
|
|
40
40
|
"@segment/a1-notation": "^2.1.4",
|
|
41
|
-
"@segment/actions-core": "^3.30.
|
|
42
|
-
"@segment/actions-shared": "^1.13.
|
|
41
|
+
"@segment/actions-core": "^3.30.1-alpha.3",
|
|
42
|
+
"@segment/actions-shared": "^1.13.1-alpha.3",
|
|
43
43
|
"cheerio": "^1.0.0-rc.10",
|
|
44
44
|
"dayjs": "^1.10.7",
|
|
45
45
|
"escape-goat": "^3",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"lcov"
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "2e85b899f13811cc00fce5aba928abd545aacd3d"
|
|
69
69
|
}
|