@pipedream/salesforce_rest_api 1.12.1 → 1.13.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.
- package/actions/add-contact-to-campaign/add-contact-to-campaign.mjs +1 -1
- package/actions/add-lead-to-campaign/add-lead-to-campaign.mjs +1 -1
- package/actions/get-current-user/get-current-user.mjs +34 -0
- package/common/constants.mjs +19 -0
- package/package.json +3 -3
- package/sources/case-updated-instant/case-updated-instant.mjs +1 -1
- package/sources/common/common-feed.mjs +179 -0
- package/sources/common/common-new-record.mjs +1 -1
- package/sources/email-template-updated-instant/email-template-updated-instant.mjs +1 -1
- package/sources/knowledge-article-updated-instant/knowledge-article-updated-instant.mjs +1 -1
- package/sources/new-case-instant/new-case-instant.mjs +1 -1
- package/sources/new-email-template-instant/new-email-template-instant.mjs +1 -1
- package/sources/new-feed-comment/new-feed-comment.mjs +36 -0
- package/sources/new-feed-item/new-feed-item.mjs +36 -0
- package/sources/new-knowledge-article-instant/new-knowledge-article-instant.mjs +1 -1
- package/sources/new-record-instant/new-record-instant.mjs +1 -1
- package/sources/record-deleted-instant/record-deleted-instant.mjs +1 -1
- package/sources/record-updated-instant/record-updated-instant.mjs +1 -1
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "salesforce_rest_api-add-contact-to-campaign",
|
|
6
6
|
name: "Add Contact to Campaign",
|
|
7
7
|
description: "Adds an existing contact to an existing campaign. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_campaignmember.htm)",
|
|
8
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.5",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "salesforce_rest_api-add-lead-to-campaign",
|
|
6
6
|
name: "Add Lead to Campaign",
|
|
7
7
|
description: "Adds an existing lead to an existing campaign. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.228.0.object_reference.meta/object_reference/sforce_api_objects_campaignmember.htm)",
|
|
8
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.5",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
11
11
|
openWorldHint: true,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import salesforce from "../../salesforce_rest_api.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "salesforce_rest_api-get-current-user",
|
|
5
|
+
name: "Get Current User",
|
|
6
|
+
description: "Returns the authenticated Salesforce user's ID, name, email, and organization ID. Call this first when the user says 'my leads', 'my opportunities', 'my cases', or any first-person query. Use `user_id` as the OwnerId filter in **SOQL Search** (e.g. `WHERE OwnerId = '{user_id}'`) and `organization_id` to construct Salesforce UI URLs. [See the documentation](https://help.salesforce.com/s/articleView?id=sf.remoteaccess_using_userinfo_endpoint.htm).",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
salesforce,
|
|
16
|
+
},
|
|
17
|
+
async run({ $ }) {
|
|
18
|
+
const user = await this.salesforce.getUserInfo(this.salesforce._authToken());
|
|
19
|
+
|
|
20
|
+
const summaryName = user.name || user.email || user.user_id;
|
|
21
|
+
$.export("$summary", `Retrieved user ${summaryName}`);
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
user_id: user.user_id,
|
|
25
|
+
name: user.name,
|
|
26
|
+
email: user.email,
|
|
27
|
+
organization_id: user.organization_id,
|
|
28
|
+
username: user.preferred_username,
|
|
29
|
+
profile: user.profile,
|
|
30
|
+
locale: user.locale,
|
|
31
|
+
zoneinfo: user.zoneinfo,
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
};
|
package/common/constants.mjs
CHANGED
|
@@ -32,9 +32,28 @@ export default {
|
|
|
32
32
|
CONTACT: "Contact",
|
|
33
33
|
CAMPAIGN_MEMBER: "CampaignMember",
|
|
34
34
|
LEAD: "Lead",
|
|
35
|
+
FEED_ITEM: "FeedItem",
|
|
36
|
+
FEED_COMMENT: "FeedComment",
|
|
35
37
|
},
|
|
36
38
|
FIELD_NAME: {
|
|
37
39
|
CREATED_DATE: "CreatedDate",
|
|
38
40
|
LAST_MODIFIED_DATE: "LastModifiedDate",
|
|
39
41
|
},
|
|
42
|
+
FEED_ITEM_MIN_FIELDS: Object.freeze([
|
|
43
|
+
"Id",
|
|
44
|
+
"Type",
|
|
45
|
+
"Body",
|
|
46
|
+
"ParentId",
|
|
47
|
+
"CreatedById",
|
|
48
|
+
"CreatedDate",
|
|
49
|
+
]),
|
|
50
|
+
FEED_COMMENT_MIN_FIELDS: Object.freeze([
|
|
51
|
+
"Id",
|
|
52
|
+
"CommentBody",
|
|
53
|
+
"ParentId",
|
|
54
|
+
"FeedItemId",
|
|
55
|
+
"CreatedById",
|
|
56
|
+
"CreatedDate",
|
|
57
|
+
]),
|
|
58
|
+
DEPLOY_HISTORICAL_LIMIT: 25,
|
|
40
59
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipedream/salesforce_rest_api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Pipedream Salesforce (REST API) Components",
|
|
5
5
|
"main": "salesforce_rest_api.app.mjs",
|
|
6
6
|
"keywords": [
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@pipedream/platform": "^3.1.1",
|
|
14
|
-
"fast-xml-parser": "^5.
|
|
14
|
+
"fast-xml-parser": "^5.7.0",
|
|
15
15
|
"handlebars": "^4.7.9",
|
|
16
|
-
"lodash": "^4.
|
|
16
|
+
"lodash": "^4.18.1",
|
|
17
17
|
"lodash-es": "^4.18.1",
|
|
18
18
|
"salesforce-webhooks": "^1.1.11",
|
|
19
19
|
"uuid": "^9.0.1"
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "Case Updated (Instant, of Selectable Type)",
|
|
8
8
|
key: "salesforce_rest_api-case-updated-instant",
|
|
9
9
|
description: "Emit new event when a case is updated. [See the documentation](https://sforce.co/3yPSJZy)",
|
|
10
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.9",
|
|
11
11
|
props: {
|
|
12
12
|
salesforce: common.props.salesforce,
|
|
13
13
|
db: "$.service.db",
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
|
|
2
|
+
import common from "./common-new-record.mjs";
|
|
3
|
+
import constants from "../../common/constants.mjs";
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
DEPLOY_HISTORICAL_LIMIT,
|
|
7
|
+
FIELD_NAME,
|
|
8
|
+
} = constants;
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
...common,
|
|
12
|
+
props: {
|
|
13
|
+
salesforce: common.props.salesforce,
|
|
14
|
+
db: "$.service.db",
|
|
15
|
+
http: {
|
|
16
|
+
type: "$.interface.http",
|
|
17
|
+
customResponse: true,
|
|
18
|
+
},
|
|
19
|
+
timer: {
|
|
20
|
+
type: "$.interface.timer",
|
|
21
|
+
description: "The timer is only used as a fallback if instant event delivery (webhook) is not available.",
|
|
22
|
+
default: {
|
|
23
|
+
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
parentObjectType: {
|
|
27
|
+
type: "string",
|
|
28
|
+
label: "Parent Object Type",
|
|
29
|
+
description: "Optional. The Salesforce SObject API name of the parent record to filter by, e.g. `Case` or `Opportunity`. When set, appends `AND Parent.Type = '<value>'` to the SOQL WHERE clause (traversal of the polymorphic `ParentId`). Leave blank to emit events on any parent object.",
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
excludeSelf: {
|
|
33
|
+
type: "boolean",
|
|
34
|
+
label: "Exclude Self",
|
|
35
|
+
description: "Optional. When `true`, appends `AND CreatedById != '<authenticatedUserId>'` to filter out events created by the connected user. The user ID is resolved at runtime via the userinfo endpoint and cached in db.",
|
|
36
|
+
optional: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
hooks: {
|
|
40
|
+
...common.hooks,
|
|
41
|
+
async deploy() {
|
|
42
|
+
const objectType = this.getObjectType();
|
|
43
|
+
const nameField = await this.salesforce.getNameFieldForObjectType(objectType);
|
|
44
|
+
this.setNameField(nameField);
|
|
45
|
+
|
|
46
|
+
const extraConditions = await this._buildExtraConditions();
|
|
47
|
+
const { records } = await this.query({
|
|
48
|
+
query: `SELECT Id FROM ${objectType} WHERE Id != null ${extraConditions} ORDER BY CreatedDate DESC LIMIT ${DEPLOY_HISTORICAL_LIMIT}`,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// Emit oldest-first so historical events are delivered chronologically,
|
|
52
|
+
// matching the timer polling path.
|
|
53
|
+
for (const record of [
|
|
54
|
+
...records,
|
|
55
|
+
].reverse()) {
|
|
56
|
+
const object = await this.salesforce.getSObject(objectType, record.Id);
|
|
57
|
+
const event = {
|
|
58
|
+
body: {
|
|
59
|
+
"New": object,
|
|
60
|
+
"UserId": record.Id,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
await this.processWebhookEvent(event);
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
...common.methods,
|
|
69
|
+
getMinFields() {
|
|
70
|
+
throw new Error("getMinFields is not implemented");
|
|
71
|
+
},
|
|
72
|
+
_getAuthenticatedUserId() {
|
|
73
|
+
return this.db.get("authenticatedUserId");
|
|
74
|
+
},
|
|
75
|
+
_setAuthenticatedUserId(userId) {
|
|
76
|
+
this.db.set("authenticatedUserId", userId);
|
|
77
|
+
},
|
|
78
|
+
async _resolveAuthenticatedUserId() {
|
|
79
|
+
let userId = this._getAuthenticatedUserId();
|
|
80
|
+
if (!userId) {
|
|
81
|
+
const userInfo = await this.salesforce.getUserInfo(this.salesforce._authToken());
|
|
82
|
+
userId = userInfo.user_id;
|
|
83
|
+
this._setAuthenticatedUserId(userId);
|
|
84
|
+
}
|
|
85
|
+
return userId;
|
|
86
|
+
},
|
|
87
|
+
async _buildExtraConditions() {
|
|
88
|
+
const conditions = [];
|
|
89
|
+
if (this.parentObjectType) {
|
|
90
|
+
conditions.push(`AND Parent.Type = '${this.parentObjectType}'`);
|
|
91
|
+
}
|
|
92
|
+
if (this.excludeSelf) {
|
|
93
|
+
const userId = await this._resolveAuthenticatedUserId();
|
|
94
|
+
conditions.push(`AND CreatedById != '${userId}'`);
|
|
95
|
+
}
|
|
96
|
+
return conditions.join(" ");
|
|
97
|
+
},
|
|
98
|
+
async processWebhookEvent(event) {
|
|
99
|
+
// Instant/webhook deliveries can't filter on Parent.Type (the pushed
|
|
100
|
+
// payload has ParentId but not the parent's object type), so
|
|
101
|
+
// parentObjectType is only enforced on the polling/deploy SOQL queries.
|
|
102
|
+
// excludeSelf is enforced here to prevent self-trigger loops.
|
|
103
|
+
if (this.excludeSelf) {
|
|
104
|
+
const userId = await this._resolveAuthenticatedUserId();
|
|
105
|
+
if (event.body?.New?.CreatedById === userId) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const meta = this.generateWebhookMeta(event);
|
|
110
|
+
this.$emit(event.body, meta);
|
|
111
|
+
},
|
|
112
|
+
async processTimerEvent(eventData) {
|
|
113
|
+
const {
|
|
114
|
+
startTimestamp,
|
|
115
|
+
endTimestamp,
|
|
116
|
+
} = eventData;
|
|
117
|
+
|
|
118
|
+
const fieldName = this.getNameField();
|
|
119
|
+
let columns = this.getObjectTypeColumns();
|
|
120
|
+
if (!columns.length) {
|
|
121
|
+
columns = [
|
|
122
|
+
...this.getMinFields(),
|
|
123
|
+
];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const extraConditions = await this._buildExtraConditions();
|
|
127
|
+
const objectType = this.getObjectType();
|
|
128
|
+
const dateFieldName = FIELD_NAME.CREATED_DATE;
|
|
129
|
+
|
|
130
|
+
const events = await this.paginate({
|
|
131
|
+
fn: ({
|
|
132
|
+
limit,
|
|
133
|
+
offset,
|
|
134
|
+
}) => this.query({
|
|
135
|
+
query: `
|
|
136
|
+
SELECT ${columns.join(", ")}
|
|
137
|
+
FROM ${objectType}
|
|
138
|
+
WHERE ${dateFieldName} > ${startTimestamp}
|
|
139
|
+
AND ${dateFieldName} <= ${endTimestamp}
|
|
140
|
+
${extraConditions}
|
|
141
|
+
ORDER BY ${dateFieldName} DESC
|
|
142
|
+
LIMIT ${limit} OFFSET ${offset}
|
|
143
|
+
`,
|
|
144
|
+
}),
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
const [
|
|
148
|
+
latestEvent,
|
|
149
|
+
] = events;
|
|
150
|
+
|
|
151
|
+
let latestDateCovered = new Date(latestEvent?.CreatedDate || endTimestamp);
|
|
152
|
+
if (isNaN(latestDateCovered.getMilliseconds())) {
|
|
153
|
+
latestDateCovered = new Date();
|
|
154
|
+
}
|
|
155
|
+
latestDateCovered.setSeconds(0);
|
|
156
|
+
this.setLatestDateCovered(latestDateCovered.toISOString());
|
|
157
|
+
|
|
158
|
+
Array.from(events)
|
|
159
|
+
.reverse()
|
|
160
|
+
.forEach((item) => {
|
|
161
|
+
const meta = this.generateTimerMeta(item, fieldName);
|
|
162
|
+
this.$emit(item, meta);
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
async timerActivateHook() {
|
|
166
|
+
let columns;
|
|
167
|
+
try {
|
|
168
|
+
const { fields } = await this.getObjectTypeDescription(this.getObjectType());
|
|
169
|
+
columns = fields.map(({ name }) => name);
|
|
170
|
+
} catch (err) {
|
|
171
|
+
console.log(`Error fetching ${this.getObjectType()} description, falling back to minimum fields:`, err);
|
|
172
|
+
columns = [
|
|
173
|
+
...this.getMinFields(),
|
|
174
|
+
];
|
|
175
|
+
}
|
|
176
|
+
this.setObjectTypeColumns(columns);
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
};
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "Email Template Updated (Instant, of Selectable Type)",
|
|
8
8
|
key: "salesforce_rest_api-email-template-updated-instant",
|
|
9
9
|
description: "Emit new event when an email template is updated. [See the documentation](https://sforce.co/3yPSJZy)",
|
|
10
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.9",
|
|
11
11
|
props: {
|
|
12
12
|
salesforce: common.props.salesforce,
|
|
13
13
|
db: "$.service.db",
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "Knowledge Article Updated (Instant, of Selectable Type)",
|
|
8
8
|
key: "salesforce_rest_api-knowledge-article-updated-instant",
|
|
9
9
|
description: "Emit new event when a knowledge article is updated. [See the documentation](https://sforce.co/3yPSJZy)",
|
|
10
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.9",
|
|
11
11
|
props: {
|
|
12
12
|
salesforce: common.props.salesforce,
|
|
13
13
|
db: "$.service.db",
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "New Case (Instant, of Selectable Type)",
|
|
8
8
|
key: "salesforce_rest_api-new-case-instant",
|
|
9
9
|
description: "Emit new event when a case is created. [See the documentation](https://sforce.co/3yPSJZy)",
|
|
10
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.9",
|
|
11
11
|
props: {
|
|
12
12
|
salesforce: common.props.salesforce,
|
|
13
13
|
db: "$.service.db",
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "New Email Template (Instant, of Selectable Type)",
|
|
8
8
|
key: "salesforce_rest_api-new-email-template-instant",
|
|
9
9
|
description: "Emit new event when an email template is created. [See the documentation](https://sforce.co/3yPSJZy)",
|
|
10
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.9",
|
|
11
11
|
props: {
|
|
12
12
|
salesforce: common.props.salesforce,
|
|
13
13
|
db: "$.service.db",
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import common from "../common/common-feed.mjs";
|
|
2
|
+
import constants from "../../common/constants.mjs";
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
FEED_COMMENT_MIN_FIELDS,
|
|
6
|
+
OBJECT_TYPE,
|
|
7
|
+
} = constants;
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
...common,
|
|
11
|
+
type: "source",
|
|
12
|
+
name: "New Chatter Feed Comment (Instant or Polling)",
|
|
13
|
+
key: "salesforce_rest_api-new-feed-comment",
|
|
14
|
+
description: "Emit new events for each Chatter FeedComment (reply) created in Salesforce, polling `FeedComment` via SOQL on `CreatedDate`. Use this to react to comments on Chatter posts, since Chatter activity does not update the parent record's `LastModifiedDate`. The payload includes both `ParentId` (a polymorphic reference to the feed's parent - either a record feed, e.g. a Case ID starting with `500`, or a User feed) and `FeedItemId` (the ID of the FeedItem the comment belongs to) - these are distinct fields; do not confuse them. Set `parentObjectType` to a parent object API name (e.g. `Case`) to append `AND Parent.Type = '<value>'` to the SOQL WHERE clause. Set `excludeSelf` to `true` to drop comments authored by the connected integration user. Note: querying FeedComment without a parent filter requires the `View All Data` permission on the connected user. Attempts instant delivery via webhook and falls back to timer polling automatically. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_feedcomment.htm)",
|
|
15
|
+
version: "0.0.1",
|
|
16
|
+
props: {
|
|
17
|
+
...common.props,
|
|
18
|
+
parentObjectType: {
|
|
19
|
+
...common.props.parentObjectType,
|
|
20
|
+
description: "Optional. The Salesforce SObject API name of the parent business record to filter by, e.g. `Case`. When set, appends `AND Parent.Type = '<value>'` to the SOQL WHERE clause (traversal of the polymorphic `FeedComment.ParentId`). Leave blank to emit comments on any parent object (requires `View All Data` permission).",
|
|
21
|
+
},
|
|
22
|
+
excludeSelf: {
|
|
23
|
+
...common.props.excludeSelf,
|
|
24
|
+
description: "Optional. When `true`, appends `AND CreatedById != '<authenticatedUserId>'` to filter out comments created by the connected user. The user ID is resolved at runtime via the userinfo endpoint and cached in db.",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
methods: {
|
|
28
|
+
...common.methods,
|
|
29
|
+
getObjectType() {
|
|
30
|
+
return OBJECT_TYPE.FEED_COMMENT;
|
|
31
|
+
},
|
|
32
|
+
getMinFields() {
|
|
33
|
+
return FEED_COMMENT_MIN_FIELDS;
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import common from "../common/common-feed.mjs";
|
|
2
|
+
import constants from "../../common/constants.mjs";
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
FEED_ITEM_MIN_FIELDS,
|
|
6
|
+
OBJECT_TYPE,
|
|
7
|
+
} = constants;
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
...common,
|
|
11
|
+
type: "source",
|
|
12
|
+
name: "New Chatter Feed Item (Instant or Polling)",
|
|
13
|
+
key: "salesforce_rest_api-new-feed-item",
|
|
14
|
+
description: "Emit new events for each Chatter FeedItem (post) created in Salesforce, polling `FeedItem` via SOQL on `CreatedDate`. Use this to react to Chatter posts on Cases and other records, since Chatter activity does not update the parent record's `LastModifiedDate` (so **New Record (Instant, of Selectable Type)** and **New Case (Instant, of Selectable Type)** never emit for it). Set `parentObjectType` to the parent object's API name (e.g. `Case`, `Opportunity`) to only emit posts whose parent record is of that type. Set `excludeSelf` to `true` to drop posts authored by the connected integration user. Note: `Body` is null for system-generated post types (e.g. `TrackedChange`). Attempts instant delivery via webhook and falls back to timer polling automatically when the Streaming API does not support this object. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_feeditem.htm)",
|
|
15
|
+
version: "0.0.1",
|
|
16
|
+
props: {
|
|
17
|
+
...common.props,
|
|
18
|
+
parentObjectType: {
|
|
19
|
+
...common.props.parentObjectType,
|
|
20
|
+
description: "Optional. The Salesforce SObject API name of the parent record to filter by, e.g. `Case` or `Opportunity`. When set, appends `AND Parent.Type = '<value>'` to the SOQL WHERE clause (traversal of the polymorphic `FeedItem.ParentId`). Leave blank to emit posts on any parent object.",
|
|
21
|
+
},
|
|
22
|
+
excludeSelf: {
|
|
23
|
+
...common.props.excludeSelf,
|
|
24
|
+
description: "Optional. When `true`, appends `AND CreatedById != '<authenticatedUserId>'` to filter out posts created by the connected user. The user ID is resolved at runtime via the userinfo endpoint and cached in db.",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
methods: {
|
|
28
|
+
...common.methods,
|
|
29
|
+
getObjectType() {
|
|
30
|
+
return OBJECT_TYPE.FEED_ITEM;
|
|
31
|
+
},
|
|
32
|
+
getMinFields() {
|
|
33
|
+
return FEED_ITEM_MIN_FIELDS;
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "New Knowledge Article (Instant, of Selectable Type)",
|
|
8
8
|
key: "salesforce_rest_api-new-knowledge-article-instant",
|
|
9
9
|
description: "Emit new event when a knowledge article is created. [See the documentation](https://sforce.co/3yPSJZy)",
|
|
10
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.9",
|
|
11
11
|
props: {
|
|
12
12
|
salesforce: common.props.salesforce,
|
|
13
13
|
db: "$.service.db",
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "New Record (Instant, of Selectable Type)",
|
|
7
7
|
key: "salesforce_rest_api-new-record-instant",
|
|
8
8
|
description: "Emit new event when a record of the selected object type is created. [See the documentation](https://sforce.co/3yPSJZy)",
|
|
9
|
-
version: "0.2.
|
|
9
|
+
version: "0.2.9",
|
|
10
10
|
props: {
|
|
11
11
|
...common.props,
|
|
12
12
|
fieldsToObtain: {
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "New Deleted Record (Instant, of Selectable Type)",
|
|
8
8
|
key: "salesforce_rest_api-record-deleted-instant",
|
|
9
9
|
description: "Emit new event when a record of the selected object type is deleted. [See the documentation](https://sforce.co/3msDDEE)",
|
|
10
|
-
version: "0.1.
|
|
10
|
+
version: "0.1.8",
|
|
11
11
|
methods: {
|
|
12
12
|
...common.methods,
|
|
13
13
|
generateWebhookMeta(data) {
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "New Updated Record (Instant, of Selectable Type)",
|
|
8
8
|
key: "salesforce_rest_api-record-updated-instant",
|
|
9
9
|
description: "Emit new event when a record of the selected type is updated. [See the documentation](https://sforce.co/3yPSJZy)",
|
|
10
|
-
version: "0.2.
|
|
10
|
+
version: "0.2.9",
|
|
11
11
|
props: {
|
|
12
12
|
...common.props,
|
|
13
13
|
fields: {
|