Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "salesforce_rest_api-add-contact-to-campaign",
name: "Add Contact to Campaign",
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)",
version: "0.1.1",
version: "0.1.2",
type: "action",
props: {
salesforce,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "salesforce_rest_api-add-lead-to-campaign",
name: "Add Lead to Campaign",
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)",
version: "0.1.1",
version: "0.1.2",
type: "action",
props: {
salesforce,
Expand Down
19 changes: 19 additions & 0 deletions components/salesforce_rest_api/actions/common/knowledge.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import app from "../../salesforce_rest_api.app.mjs";

export default {
props: {
app,
// eslint-disable-next-line pipedream/props-label, pipedream/props-description
info: {
type: "alert",
alertType: "info",
content: "Please keep in mind that Salesforce Knowledge is available for an additional cost in: Professional Enterprise, Performance, and Developer Editions. For more information, contact your Salesforce representative. [See the documentation](https://help.salesforce.com/s/articleView?id=service.knowledge_map.htm&type=5)",
},
language: {
type: "string",
label: "Language",
description: "The language code. Defaults to `en-US`.",
optional: true,
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
key: "salesforce_rest_api-convert-soap-xml-to-json",
name: "Convert SOAP XML Object to JSON",
description: "Converts a SOAP XML Object received from Salesforce to JSON",
version: "0.0.7",
version: "0.0.8",
type: "action",
props: {
salesforce_rest_api,
infoBox: {

Check warning on line 12 in components/salesforce_rest_api/actions/convert-soap-xml-to-json/convert-soap-xml-to-json.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop infoBox must have a description. See https://pipedream.com/docs/components/guidelines/#props

Check warning on line 12 in components/salesforce_rest_api/actions/convert-soap-xml-to-json/convert-soap-xml-to-json.mjs

View workflow job for this annotation

GitHub Actions / Lint Code Base

Component prop infoBox must have a label. See https://pipedream.com/docs/components/guidelines/#props
type: "alert",
alertType: "info",
content: `This action is useful in conjunction with Salesforce Flow Builder, and is primarily used if Instant triggers are not working for your use case.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
key: "salesforce_rest_api-create-account",
name: "Create Account",
description: `Creates a Salesforce account. [See the documentation](${docsLink})`,
version: "0.3.2",
version: "0.3.3",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "salesforce_rest_api-create-accounts-batch",
name: "Create Accounts (Batch)",
description: "Create multiple Accounts in Salesforce using Bulk API 2.0. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_understanding_bulk2_ingest.htm)",
version: "0.0.1",
version: "0.0.2",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
key: "salesforce_rest_api-create-attachment",
name: "Create Attachment",
description: `Creates an Attachment on a parent object. [See the documentation](${docsLink})`,
version: "0.5.2",
version: "0.5.3",
type: "action",
props,
async run({ $ }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
key: "salesforce_rest_api-create-campaign",
name: "Create Campaign",
description: `Creates a marketing campaign. [See the documentation](${docsLink})`,
version: "0.3.2",
version: "0.3.3",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
key: "salesforce_rest_api-create-case",
name: "Create Case",
description: `Creates a Case, which represents a customer issue or problem. [See the documentation](${docsLink})`,
version: "0.3.2",
version: "0.3.3",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
key: "salesforce_rest_api-create-casecomment",
name: "Create Case Comment",
description: `Creates a Case Comment on a selected Case. [See the documentation](${docsLink})`,
version: "0.3.2",
version: "0.3.3",
type: "action",
props,
async run({ $ }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
key: "salesforce_rest_api-create-contact",
name: "Create Contact",
description: `Creates a contact. [See the documentation](${docsLink})`,
version: "0.3.2",
version: "0.3.3",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
key: "salesforce_rest_api-create-content-note",
name: "Create Content Note",
description: `Creates a content note. [See the documentation](${docsLink}) and [Set Up Notes](https://help.salesforce.com/s/articleView?id=sales.notes_admin_setup.htm&type=5).`,
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
...contentNoteProps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
key: "salesforce_rest_api-create-event",
name: "Create Event",
description: `Creates an event. [See the documentation](${docsLink})`,
version: "0.3.2",
version: "0.3.3",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
key: "salesforce_rest_api-create-lead",
name: "Create Lead",
description: `Creates a lead. [See the documentation](${docsLink})`,
version: "0.3.2",
version: "0.3.3",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
key: "salesforce_rest_api-create-note",
name: "Create Note",
description: `Creates a note. [See the documentation](${docsLink})`,
version: "0.3.2",
version: "0.3.3",
type: "action",
props,
async run({ $ }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
key: "salesforce_rest_api-create-opportunities-batch",
name: "Create Opportunities (Batch)",
description: "Create multiple Opportunities in Salesforce using Bulk API 2.0. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_understanding_bulk2_ingest.htm)",
version: "0.0.1",
version: "0.0.2",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
key: "salesforce_rest_api-create-opportunity",
name: "Create Opportunity",
description: `Creates an opportunity. [See the documentation](${docsLink})`,
version: "0.3.2",
version: "0.3.3",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
key: "salesforce_rest_api-create-record",
name: "Create Record",
description: "Create a record of a given object. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_create.htm)",
version: "0.3.2",
version: "0.3.3",
type: "action",
props: {
salesforce,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
key: "salesforce_rest_api-create-task",
name: "Create Task",
description: `Creates a task. [See the documentation](${docsLink})`,
version: "0.4.2",
version: "0.4.3",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
key: "salesforce_rest_api-create-user",
name: "Create User",
description: `Creates a Salesforce user. [See the documentation](${docsLink})`,
version: "0.1.2",
version: "0.1.3",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "salesforce_rest_api-delete-opportunity",
name: "Delete Opportunity",
description: "Deletes an opportunity. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_delete_record.htm)",
version: "0.3.1",
version: "0.3.2",
type: "action",
props: {
salesforce,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
name: "Delete Record",
description:
"Deletes an existing record in an object. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_retrieve_delete.htm)",
version: "0.2.1",
version: "0.2.2",
type: "action",
props: {
salesforce,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
name: "Find Records",
description:
"Retrieves selected fields for some or all records of a selected object. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)",
version: "0.2.1",
version: "0.2.2",
type: "action",
props: {
salesforce,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "salesforce_rest_api-get-case",
name: "Get Case",
description: "Retrieves a case by its ID. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
salesforce,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import common from "../common/knowledge.mjs";

export default {
...common,
key: "salesforce_rest_api-get-knowledge-articles",
name: "Get Knowledge Articles",
description: "Get a page of online articles for the given language and category through either search or query. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.knowledge_dev.meta/knowledge_dev/sforce_api_rest_retrieve_article_list.htm)",
version: "0.0.1",
type: "action",
props: {
...common.props,
q: {
type: "string",
label: "Search Term",
description: "Performs an SOSL search. If this property is not set, an SOQL query runs. The characters `?` and `*` are used for wildcard searches. The characters `(`, `)`, and `\"` are used for complex search terms. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_sosl_find.htm).",
optional: true,
},
channel: {
type: "string",
label: "Channel",
description: "Where articles are visible (App, Pkb, Csp, Prm).",
optional: true,
options: [
{
label: "Internal Knowledge App",
value: "App",
},
{
label: "Public Knowledge Base",
value: "Pkb",
},
{
label: "Customer Portal",
value: "Csp",
},
{
label: "Partner Portal",
value: "Prm",
},
],
},
categories: {
type: "string",
label: "Categories",
description: "This should be a map in json format `{\"group1\": \"category1\", \"group2\": \"category2\", ...}`. It must be unique in each group:category pair, otherwise you get `ARGUMENT_OBJECT_PARSE_ERROR`. There is a limit of three data category conditions, otherwise you get `INVALID_FILTER_VALUE`.",
optional: true,
},
queryMethod: {
type: "string",
label: "Query Method",
description: "Only valid when categories are specified, defaults to `ABOVE_OR_BELOW`.",
optional: true,
options: [
"AT",
"BELOW",
"ABOVE",
"ABOVE_OR_BELOW",
],
},
sort: {
type: "string",
label: "Sort By",
description: "Field to sort results by. Defaults to `LastPublishedDate` for query and relevance for search",
optional: true,
options: [
"LastPublishedDate",
"CreatedDate",
"Title",
"ViewScore",
],
},
},
async run({ $ }) {
const {
app,
q,
channel,
language,
categories,
queryMethod,
sort,
} = this;

const items = await app.paginate({
resultsKey: "articles",
requester: app.getKnowledgeArticles,
requesterArgs: {
$,
headers: {
...app._makeRequestHeaders(),
"Accept": "application/json",
"Accept-Language": language || "en-US",
},
params: {
q,
channel,
categories,
queryMethod,
sort,
},
},
});

$.export("$summary", `Successfully fetched \`${items.length}\` articles`);

return items;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import common from "../common/knowledge.mjs";

export default {
...common,
key: "salesforce_rest_api-get-knowledge-data-category-groups",
name: "Get Knowledge Data Category Groups",
description: "Fetch data category groups visible to the current user. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.knowledge_dev.meta/knowledge_dev/resources_knowledge_support_dcgroups.htm)",
version: "0.0.1",
type: "action",
props: {
...common.props,
topCategoriesOnly: {
type: "boolean",
label: "Top Categories Only",
description: "Return only top-level categories if `true`, entire tree if `false`.",
optional: true,
},
},
async run({ $ }) {
const {
app,
topCategoriesOnly,
language,
} = this;

const response = await app.getKnowledgeDataCategoryGroups({
$,
params: {
sObjectName: "KnowledgeArticleVersion",
topCategoriesOnly,
},
headers: {
...app._makeRequestHeaders(),
"Accept": "application/json",
"Accept-Language": language || "en-US",
},
});

$.export("$summary", `Successfully fetched \`${response.categoryGroups?.length || 0}\` data category groups`);
return response;
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "salesforce_rest_api-get-user",
name: "Get User",
description: "Retrieves a user by their ID. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
salesforce,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
key: "salesforce_rest_api-insert-blob-data",
name: "Insert Blob Data",
description: "Inserts blob data in Salesforce standard objects. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.228.0.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm)",
version: "0.2.9",
version: "0.2.10",
type: "action",
props: {
salesforce,
Expand Down
Loading
Loading