Sync Account Number form Salesforce to Zuora when Creating a new Billing Account

Reply
Highlighted
adam Support Team

Support Team

Support Team
Posts: 131
Registered: ‎04-04-2016
Accepted Solution

Sync Account Number form Salesforce to Zuora when Creating a new Billing Account

How to sync the Salesforce Account number to Zuora when creating a new Billing Account



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

adam Support Team

Support Team

Support Team
Posts: 131
Registered: ‎04-04-2016

Re: Sync Account Number form Salesforce to Zuora when Creating a new Billing Account

Versions prior to Orders, do not sync the Salesforce standard Account Number field to the Zuora standard AccountNumber field when creating the Account in Zuora.

 

To do this in versions prior to Orders, the easiest approach is to use a trigger to update the Account Number, after the Quote has been inserted.

 

1. get the Salesforce Account Number from using the quote id

 

select id, zqu__ZuoraAccountID__c from zqu__quote__c where id='a1y38000002pjvt'

2 . make the callout

 

then make a callout to update the Account in Zuora, this example is with OrderBuilder

 

see: https://knowledgecenter.zuora.com/CA_Commerce/I_Development_Resources/B_Order_Builder/D_Programming_...

 

Zuora.zApi zApiInstance = new Zuora.zApi();

Zuora.zApi.LoginResult result = zApiInstance.zlogin();

Zuora.zObject acc = new Zuora.zObject('Account');

acc.setValue('Id','2c92a0ff5c63e3b3015ca83e8be80470'); //an existing account
acc.setValue('AccountNumber','CTG99999');

List<Zuora.zObject> objs = new List<Zuora.zObject> {acc};
List<Zuora.zApi.SaveResult> results = zApiInstance.zupdate(objs);

 



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √