This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Create in Zuora SOAP
Overview
The following operations allow you to work with "create". Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with "create", see Sample configuration.
Operation | Description |
---|---|
Creates one or more zobjects of a specific type. | |
generate | Generates an on demand invoice for a specific customer. |
subscribe | Creates subscription requests. |
Operation details
This section provides details on the operations.
Create
The create
operation is used to create one or more objects of a specific type in Zuora.
<zuorasoap.create> <zobjects>{$ctx:zobjects}</zobjects> <useSingleTransaction>{$ctx:useSingleTransaction}</useSingleTransaction> </zuorasoap.create>
Properties
zobjects:
One or more records that need to be added. Contains an array of record objects.useSingleTransaction
: Specifies whether Zuora will create and activate an InvoiceItemAdjustment or Amendment within a single API call.
Sample request
Following is a sample SOAP request that can be handled by the create
operation.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="wso2.connector.zuora"> <soapenv:Header/> <soapenv:Body> <urn:apiUrl>https://apisandbox.zuora.com/apps/services/a/74.0</urn:apiUrl> <urn:username>zuora@wso2.com</urn:username> <urn:password>Zuora#123</urn:password> <urn1:zObjects xmlns:urn1="http://api.zuora.com/" type="Account"> <urn1:zObject> <AccountNumber>12345321</AccountNumber> <AutoPay>false</AutoPay> <Batch>Batch1</Batch> <BillCycleDay>1</BillCycleDay> <Currency>USD</Currency> <Name>ACME</Name> <PaymentTerm>Due Upon Receipt</PaymentTerm> <Status>Draft</Status> </urn1:zObject> </urn1:zObjects> </soapenv:Body> </soapenv:Envelope>
Related Zuora documentation
https://knowledgecenter.zuora.com/DC_Developers/SOAP_API/E_SOAP_API_Calls/create_call
Generate
The generate
operation can be used to generate an on demand invoice for a specific customer.
<zuorasoap.generate> <zobjects>{$ctx:zobjects}</zobjects> </zuorasoap.generate>
Properties
zobjects:
An array of one or more objects of type zObject.
Sample request
Following is a sample SOAP request that can be handled by the generate operation.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="wso2.connector.zuora"> <soapenv:Header/> <soapenv:Body> <urn:apiUrl>https://apisandbox.zuora.com/apps/services/a/74.0</urn:apiUrl> <urn:username>zuora@wso2.com</urn:username> <urn:password>Zuora#123</urn:password> <urn1:zObjects xmlns:urn1="http://api.zuora.com/" type="Account"> <urn1:zObject> <AccountId>2c92c0f9528db6aa015292b0f7e915fa</AccountId> <IncludesOneTime>True</IncludesOneTime> <IncludesRecurring>True</IncludesRecurring> <IncludesUsage>True</IncludesUsage> <InvoiceDate>2016-07-07</InvoiceDate> <TargetDate>2016-07-07</TargetDate> </urn1:zObject> </urn1:zObjects> </soapenv:Body> </soapenv:Envelope>
Related Zuora documentation
https://knowledgecenter.zuora.com/DC_Developers/SOAP_API/E_SOAP_API_Calls/generate_call
Subscribe
The subscribe
operation can be used to create subscription requests.
<zuorasoap.subscribe> <zobjects>{$ctx:zobjects}</zobjects> </zuorasoap.subscribe>
Properties
zobjects:
An array of one or more objects of type subscribe.
Sample request
Following is a sample SOAP request that can be handled by the subscribe operation.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="wso2.connector.zuora"> <soapenv:Header/> <soapenv:Body> <urn:apiUrl>https://apisandbox.zuora.com/apps/services/a/74.0</urn:apiUrl> <urn:username>zuora@wso2.com</urn:username> <urn:password>Zuora#123</urn:password> <urn1:zObjects xmlns:urn1="http://api.zuora.com/" type="Account"> <ns1:subscribes xmlns:ns1="http://api.zuora.com/"> <ns1:Account xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:Account"> <ns2:AccountNumber>t-1230661730921</ns2:AccountNumber> <ns2:AllowInvoiceEdit>true</ns2:AllowInvoiceEdit> <ns2:AutoPay>false</ns2:AutoPay> <ns2:Batch>Batch1</ns2:Batch> <ns2:BillCycleDay>1</ns2:BillCycleDay> <ns2:CrmId>SFDC-1230661730921</ns2:CrmId> <ns2:Currency>USD</ns2:Currency> <ns2:CustomerServiceRepName>CSR Dude</ns2:CustomerServiceRepName> <ns2:Name>SomeAccount1230661730921</ns2:Name> <ns2:PaymentTerm>Due Upon Receipt</ns2:PaymentTerm> <ns2:PurchaseOrderNumber>PO-1230661730921</ns2:PurchaseOrderNumber> <ns2:SalesRepName>Sales Dude</ns2:SalesRepName> <ns2:Status>Draft</ns2:Status> </ns1:Account> <ns1:PaymentMethod xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:PaymentMethod"> <ns2:CreditCardAddress1>52 Vexford Lane</ns2:CreditCardAddress1> <ns2:CreditCardCity>Anaheim</ns2:CreditCardCity> <ns2:CreditCardCountry>United States</ns2:CreditCardCountry> <ns2:CreditCardExpirationMonth>1</ns2:CreditCardExpirationMonth> <ns2:CreditCardExpirationYear>2009</ns2:CreditCardExpirationYear> <ns2:CreditCardHolderName>Firstly Lastly</ns2:CreditCardHolderName> <ns2:CreditCardNumber>4959911773775979</ns2:CreditCardNumber> <ns2:CreditCardPostalCode>92808</ns2:CreditCardPostalCode> <ns2:CreditCardState>California</ns2:CreditCardState> <ns2:CreditCardType>Visa</ns2:CreditCardType> <ns2:Type>CreditCard</ns2:Type> </ns1:PaymentMethod> <ns1:BillToContact xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:Contact"> <ns2:Address1>52 Vexford Lane</ns2:Address1> <ns2:City>Anaheim</ns2:City> <ns2:Country>United States</ns2:Country> <ns2:FirstName>Firstly1230661733359</ns2:FirstName> <ns2:LastName>Secondly1230661733359</ns2:LastName> <ns2:PostalCode>92808</ns2:PostalCode> <ns2:State>California</ns2:State> <ns2:WorkEmail>contact@test.com</ns2:WorkEmail> <ns2:WorkPhone>4152225151</ns2:WorkPhone> </ns1:BillToContact> <ns1:SubscribeOptions> <ns1:GenerateInvoice>false</ns1:GenerateInvoice> <ns1:ProcessPayments>false</ns1:ProcessPayments> </ns1:SubscribeOptions> <ns1:SubscriptionData> <ns1:Subscription xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:Subscription"> <ns2:AutoRenew>false</ns2:AutoRenew> <ns2:ContractAcceptanceDate>2008-12-30T10:28:53.359-08:00</ns2:ContractAcceptanceDate> <ns2:ContractEffectiveDate>2008-12-30T10:28:53.359-08:00</ns2:ContractEffectiveDate> <ns2:InitialTerm>12</ns2:InitialTerm> <ns2:Name>SomeSubscription1230661733359</ns2:Name> <ns2:RenewalTerm>12</ns2:RenewalTerm> <ns2:ServiceActivationDate>2008-12-30T10:28:53.359-08:00</ns2:ServiceActivationDate> <ns2:TermStartDate>2008-12-30T10:28:53.359-08:00</ns2:TermStartDate> <ns2:Version>1</ns2:Version> </ns1:Subscription> <ns1:RatePlanData> <ns1:RatePlan xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:RatePlan"> <ns2:ProductRatePlanId>402828d31e89279a011e8927c3630037</ns2:ProductRatePlanId> </ns1:RatePlan> <ns1:RatePlanCharge xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:RatePlanCharge"> <ns2:Id>402828d31e89279a011e8927c690003a</ns2:Id> <ns2:Name>charge1230661731671</ns2:Name> <ns2:ProductRatePlanChargeId>402828d31e89279a011e8927c690003a</ns2:ProductRatePlanChargeId> </ns1:RatePlanCharge> </ns1:RatePlanData> </ns1:SubscriptionData> </ns1:subscribes> </urn1:zObjects> </soapenv:Body> </soapenv:Envelope>
Related Zuora documentation
https://knowledgecenter.zuora.com/DC_Developers/SOAP_API/E_SOAP_API_Calls/subscribe_call
Sample configuration
Following is a sample proxy service that illustrates how to connect to Zuora with the init
operation and use the create
operation. The sample request for this proxy can be found in create sample request. You can use this sample as a template for using other operations in this category.
<?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="create" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <property xmlns:ns="wso2.connector.zuora" name="apiUrl" expression="//ns:apiUrl/text()"/> <property xmlns:ns="wso2.connector.zuora" name="username" expression="//ns:username/text()"/> <property xmlns:ns="wso2.connector.zuora" name="password" expression="//ns:password/text()"/> <property xmlns:ns1="http://api.zuora.com/" name="zobjects" expression="//ns1:zObjects"/> <zuorasoap.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <username>{$ctx:username}</username> <password>{$ctx:password}</password> </zuorasoap.init> <zuorasoap.create> <zobjects>{$ctx:zobjects}</zobjects> </zuorasoap.create> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>