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.0",
version: "0.1.1",
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.0",
version: "0.1.1",
type: "action",
props: {
salesforce,
Expand Down
86 changes: 86 additions & 0 deletions components/salesforce_rest_api/actions/common/batch-operation.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import {
ConfigurationError,
getFileStream,
} from "@pipedream/platform";
import app from "../../salesforce_rest_api.app.mjs";

export default {
props: {
app,
csvFilePath: {
type: "string",
label: "CSV File Path Or URL",
description: "The path to the CSV file to process. Provide a path to a file in the `/tmp` directory (for example, `/tmp/data.csv`). If a URL is provided, the file will be downloaded to the `/tmp` directory. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_prepare_data.htm)",
},
syncDir: {
type: "dir",
accessMode: "read",
sync: true,
},
},
methods: {
getObject() {
throw new ConfigurationError("getObject method not implemented");
},
getOperation() {
throw new ConfigurationError("getOperation method not implemented");
},
getSummary() {
throw new ConfigurationError("getSummary method not implemented");
},
async processBulkOperation({
object, operation, csvData, externalIdFieldName, ...args
} = {}) {
const { app } = this;
const job = await app.createBulkJob({
...args,
data: {
object,
operation,
externalIdFieldName,
},
});

await app.uploadBulkJobData({
...args,
jobId: job.id,
data: csvData,
});

await app.patchBulkJob({
...args,
jobId: job.id,
data: {
state: "UploadComplete",
},
});

return app.getBulkJobInfo({
...args,
jobId: job.id,
});
},
},
async run({ $ }) {
const {
processBulkOperation,
getObject,
getOperation,
getSummary,
csvFilePath,
} = this;

const csvData = await getFileStream(csvFilePath);

const result = await processBulkOperation({
$,
object: getObject(),
operation: getOperation(),
csvData,
});

$.export("$summary", getSummary());

return result;
},
};
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.6",
version: "0.0.7",
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.1",
version: "0.3.2",
type: "action",
methods: {
...common.methods,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import common from "../common/batch-operation.mjs";

export default {
...common,
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",
type: "action",
methods: {
...common.methods,
getObject() {
return "Account";
},
getOperation() {
return "insert";
},
getSummary() {
return "Successfully created Accounts";
},
},
};
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.1",
version: "0.5.2",
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.1",
version: "0.3.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-case",
name: "Create Case",
description: `Creates a Case, which represents a customer issue or problem. [See the documentation](${docsLink})`,
version: "0.3.1",
version: "0.3.2",
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.1",
version: "0.3.2",
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.1",
version: "0.3.2",
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.1",
version: "0.0.2",
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.1",
version: "0.3.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-lead",
name: "Create Lead",
description: `Creates a lead. [See the documentation](${docsLink})`,
version: "0.3.1",
version: "0.3.2",
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.1",
version: "0.3.2",
type: "action",
props,
async run({ $ }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import common from "../common/batch-operation.mjs";

export default {
...common,
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",
type: "action",
methods: {
...common.methods,
getObject() {
return "Opportunity";
},
getOperation() {
return "insert";
},
getSummary() {
return "Successfully created Opportunities";
},
},
};
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.1",
version: "0.3.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-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.1",
version: "0.3.2",
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.1",
version: "0.4.2",
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.1",
version: "0.1.2",
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.0",
version: "0.3.1",
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.0",
version: "0.2.1",
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.0",
version: "0.2.1",
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.1",
version: "0.0.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-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.1",
version: "0.0.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-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.8",
version: "0.2.9",
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-list-case-comments",
name: "List Case Comments",
description: "Lists all comments for a case. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)",
version: "0.0.1",
version: "0.0.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-list-email-messages",
name: "List Email Messages",
description: "Lists all email messages for a case. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_get_field_values.htm)",
version: "0.0.1",
version: "0.0.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-list-email-templates",
name: "List Email Templates",
description: "Lists all email templates. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_emailtemplate.htm)",
version: "0.0.1",
version: "0.0.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-list-knowledge-articles",
name: "List Knowledge Articles",
description: "Lists all knowledge articles. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_knowledgearticle.htm)",
version: "0.0.1",
version: "0.0.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: "Post a Message to Chatter Feed",
description:
"Post a feed item in Chatter. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/quickreference_post_feed_item.htm)",
version: "0.1.0",
version: "0.1.1",
type: "action",
props: {
salesforce,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
name: "Search Object Records",
description:
"Searches for records in an object using a parameterized search. [See the documentation](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_search_parameterized_get.htm)",
version: "0.0.2",
version: "0.0.3",
type: "action",
props: {
salesforce,
infoBox: {

Check warning on line 12 in components/salesforce_rest_api/actions/search-string/search-string.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/search-string/search-string.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: "If you need a more flexible search, consider using the **SOQL Search** or **SOSL Search** actions instead.",
Expand Down
Loading
Loading