Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

Zuora Connector

Select

The Anypoint Connector for Zuora lets you connect to the Zuora platform. The connector exposes convenient methods for taking advantage of the capabilities of Zuora, allowing you to access the entire Zuora REST API.

Prerequisites

This document assumes that you are familiar with Zuora, Mule, Anypoint Connectors, Anypoint Studio, Mule concepts, elements in a Mule flow, and Global Elements.

You need login credentials to test your connection to your target resource.

For hardware and software requirements and compatibility information, see the Connector Release Notes.

To use this connector with Maven, view the pom.xml dependency information in the Dependency Snippets in Anypoint Exchange.

What’s New in this Connector

This connector is the first release for Mule 4.

This connector only uses the REST calls to interact with Zuora and it exposes all the operations provided by Zuora’s REST API.

To Connect in Design Center

  1. Click a trigger such as an HTTP Listener or Scheduler trigger.

  2. To create a reusable configuration for the connector, you can use only Basic Authentication:

    Reusable configuration

  3. Select the plus sign to add a component.

  4. Select the connector as a component.

  5. Configure the Account Key for Retrieve multiple operation for the key of the account to be retrieved.

    Design Center Get Account configuration

Required Parameters for the Basic Auth Configuration

  • Username: Enter the Zuora username.

  • Password: Enter the corresponding password.

  • Base Path: Enter the base path of the REST api for your instance. Usually it is the /rest path.

  • Host: Enter the path to the Zuora API, for example: apisandbox-api.zuora.com)

Zuora API Configuration

To Connect in Anypoint Studio 7

You can use this connector in Anypoint Studio by first downloading it from Exchange and configuring it as needed.

To Install Connector in Studio

  1. In Anypoint Studio, click the Exchange icon in the Studio taskbar.

  2. Click Login in Anypoint Exchange.

  3. Search for this connector and click Install.

  4. Follow the prompts to install this connector.

When Studio has an update, a message displays in the lower right corner, which you can click to install the update.

To Configure in Studio

  1. Drag and drop the connector to the Studio Canvas.

  2. To create a global element for the connector, set these fields:

    • Basic Authentication:

    • username: Enter the Zuora username.

    • password: Enter the corresponding password.

    • basePath: Enter the base path of the REST api for your instance. Usually it is the /rest path.

    • host: Enter the path to the Zuora API, for example, the apisandbox-api.zuora.com host.

      Zuora Connector Configuration in Studio 7

Use Case: Retrieve Account Details for an Account

  • Listener (HTTP) - Accepts data from HTTP requests.

  • Zuora API Connector - Connects with Zuora and executes a query to retrieve the account details for the specified account ID.

  • Transform message - Outputs the results of the Get Account operation in JSON format.

    studio_use_case

Use Case: XML

Paste this XML code into Anypoint Studio to experiment with the flow described in the previous section.


         
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
xmlns:zuora-connector="http://www.mulesoft.org/schema/mule/zuora-connector"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http
http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/zuora-connector
http://www.mulesoft.org/schema/mule/zuora-connector/current/mule-zuora-connector.xsd
http://www.mulesoft.org/schema/mule/ee/core
http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd">
        <http:listener-config name="HTTP_Listener_config"
        doc:name="HTTP Listener config">
                <http:listener-connection host="localhost" port="8081" />
        </http:listener-config>
        <zuora-connector:config name="Zuora_Connector_Config"
        doc:name="Zuora Connector Config"
        property_basePath="/rest"
        property_username="${zuora.username}"
        property_password="${zuora.password}"
        property_host="apisandbox-api.zuora.com" />
        <flow name="zuora-demo-testFlow">
                <http:listener doc:name="Listener"
                config-ref="HTTP_Listener_config" path="/getAccount"/>
                <zuora-connector:get-account doc:name="Get account"
                config-ref="Zuora_Connector_Config" account-key="#[payload]"/>
                <ee:transform doc:name="Transform Message">
                        <ee:message >
                                <ee:set-payload ><![CDATA[%dw 2.0
output application/json
---
payload]]></ee:set-payload>
                        </ee:message>
                </ee:transform>
        </flow>
</mule>