← Salesforce (REST API)

Convert SOAP XML Object to JSON with Salesforce (REST API) API

Pipedream makes it easy to connect APIs for Salesforce (REST API) and 1000+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Convert SOAP XML Object to JSON with the Salesforce (REST API) API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Create a workflow to Convert SOAP XML Object to JSON with the Salesforce (REST API) API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Convert SOAP XML Object to JSON action
    1. Connect your Salesforce (REST API) account
    2. Configure XML Soap Object
    3. Optional- Configure Extract Notifications Only
    4. Optional- Configure Fail on Error
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Convert SOAP XML Object to JSON with Salesforce (REST API) API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Salesforce (REST API)
 
Try it
Convert SOAP XML Object to JSON with Salesforce (REST API) API on New Item in Feed from RSS API
RSS + Salesforce (REST API)
 
Try it
Convert SOAP XML Object to JSON with Salesforce (REST API) API on New Message in Channel from Discord Bot API
Discord Bot + Salesforce (REST API)
 
Try it
Convert SOAP XML Object to JSON with Salesforce (REST API) API on New Submission from Typeform API
Typeform + Salesforce (REST API)
 
Try it
Convert SOAP XML Object to JSON with Salesforce (REST API) API on Custom Events from Zoom API
Zoom + Salesforce (REST API)
 
Try it

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Convert SOAP XML Object to JSON on Salesforce (REST API)
Description:Converts a SOAP XML Object received from Salesforce to JSON
Version:0.0.1
Key:salesforce_rest_api-convert-soap-xml-to-json

Code

import salesforce_rest_api from "../../salesforce_rest_api.app.mjs";
import converter from "../../../helper_functions/actions/xml-to-json/xml-to-json.mjs";

export default {
  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.1",
  type: "action",
  props: {
    salesforce_rest_api,
    xml: {
      type: "string",
      label: "XML Soap Object",
      description: "The object received from Salesforce that will be converted.",
    },
    extractNotificationOnly: {
      type: "boolean",
      label: "Extract Notifications Only",
      description: "Extracts only the notification parts from the XML. Default: `true`.",
      optional: true,
      default: true,
    },
    failOnError: {
      type: "boolean",
      label: "Fail on Error",
      description: "If should fail on error when extracting notifications. Default: `false`.",
      optional: true,
      default: false,
    },
  },
  async run({ $ }) {
    const json = await converter.run.bind({
      input: this.xml,
      compact: false,
    })({
      $,
    });

    if (!this.extractNotificationOnly) {
      return json;
    }

    try {
      const notifications = json.elements[0].elements[0].elements[0].elements
        .filter(({ name }) => name === "Notification");
      return {
        notifications,
      };
    } catch (e) {
      const errorMessage = "Successfully converted to JSON, but was unable to extract notifications";
      if (this.failOnError) {
        $.export("$summary", errorMessage); // overrides exported $summary in converter
        throw new Error(errorMessage);
      }

      $.export("$summary", `${errorMessage}. Will return the whole JSON.`);
      return json;
    }
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
Salesforce (REST API)salesforce_rest_apiappThis component uses the Salesforce (REST API) app.
XML Soap Objectxmlstring

The object received from Salesforce that will be converted.

Extract Notifications OnlyextractNotificationOnlyboolean

Extracts only the notification parts from the XML. Default: true.

Fail on ErrorfailOnErrorboolean

If should fail on error when extracting notifications. Default: false.

Authentication

Salesforce (REST API) uses OAuth authentication. When you connect your Salesforce (REST API) account, Pipedream will open a popup window where you can sign into Salesforce (REST API) and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Salesforce (REST API) API.

Pipedream requests the following authorization scopes when you connect your account:

About Salesforce (REST API)

Web services API for interacting with Salesforce

More Ways to Use Salesforce (REST API)

Triggers

New Deleted Object (Instant, of Selectable Type) from the Salesforce (REST API) API

Emit new event immediately after an object of arbitrary type (selected as an input parameter by the user) is deleted

 
Try it
New Deleted Object (of Selectable Type) from the Salesforce (REST API) API

Emit new event (at regular intervals) when an object of arbitrary type (selected as an input parameter by the user) is deleted. See the docs for more information.

 
Try it
New Object (Instant, of Selectable Type) from the Salesforce (REST API) API

Emit new event immediately after an object of arbitrary type (selected as an input parameter by the user) is created

 
Try it
New Object (of Selectable Type) from the Salesforce (REST API) API

Emit new event (at regular intervals) when an object of arbitrary type (selected as an input parameter by the user) is created. See the docs for more information.

 
Try it
New Outbound Message (Instant) from the Salesforce (REST API) API

Emit new event when a new outbound message is received in Salesforce. See Salesforce's guide on setting up Outbound Messaging. Set the Outbound Message's Endpoint URL to the endpoint of the created source. The "Send Session ID" option must be enabled for validating outbound messages from Salesforce.

 
Try it

Actions

Add Contact to Campaign with the Salesforce (REST API) API

Adds an existing contact to an existing campaign. See Event SObject and Create Record

 
Try it
Add Lead to Campaign with the Salesforce (REST API) API

Adds an existing lead to an existing campaign. See Event SObject and Create Record

 
Try it
Create Account with the Salesforce (REST API) API

Creates a Salesforce account, representing an individual account, which is an organization or person involved with your business (such as customers, competitors, and partners). See Account SObject and Create Record

 
Try it
Create Attachment with the Salesforce (REST API) API

Creates an attachment, which represents a file that a User has uploaded and attached to a parent object. See Attachment SObject and Create Record

 
Try it
Create Campaign with the Salesforce (REST API) API

Creates a marketing campaign, such as a direct mail promotion, webinar, or trade show. See Campaign SObject and Create Record

 
Try it