Happy Business Starts Here

Partner

OnDemandSyncManager when multi Entity is activated

Hello

 

We was using a simple Zuora tenant, Now we pass to multiEntity, all works fine apart from the Ondemand Sync (The button sync data from ZBilling work fine).

 

in the last version of the manage package the class OnDemandSyncManager contains a new parameter Map<String,String> syncZuoraObjectIdByEntity that we tried to fill with multiple values or empty it and we still have the same response : 

 

(ZwSyncResult:[jobId=null, sfdcName=null, statusMessage=An error occurred during on-demand sync.  The object identified with object ID 0017E00000SFpiM does not exist. , success=false])

 

we found nothing on the knowledge. can someone help us on how it works with multi entity.

 

Regards

Tags (1)
4 REPLIES 4
Community Manager

Re: OnDemandSyncManager when multi Entity is activated

Hi @AmineBendris!

 

It looks like you're already working with one of our agents @JeanChristophe on this issue. If you could share the solution with the Community, that's be really helpful!

 

Thanks,

Lana


Lana Lee | Senior Community Manager and Strategist
"A little consideration, a little thought for others, makes all the difference." —A. A. Milne
Valued Scholar

Re: OnDemandSyncManager when multi Entity is activated

 

We are also working on multi-entity enviroment.

 

This piece of code is working good for us.

 

 

      Zuora.OnDemandSyncManager syncManager = new Zuora.OnDemandSyncManager();
      syncManager.syncObjectType = Zuora.OnDemandSyncManager.ObjectType.ZPRODUCT;      
      syncManager.syncZuoraObjectIdSet =  ; // pass zuoraIds to sync
      
      List<Zuora.SyncResult> syncResult = syncManager.sendRequest();

Hope this is helpful.

 

Community Manager

Re: OnDemandSyncManager when multi Entity is activated

Thanks for sharing @pankaj!


Lana Lee | Senior Community Manager and Strategist
"A little consideration, a little thought for others, makes all the difference." —A. A. Milne
Support SME

Re: OnDemandSyncManager when multi Entity is activated

HI Amine,

 

According to KC article https://knowledgecenter.zuora.com/CA_Commerce/I_Development_Resources/C_Component_Library/C_Global_C...,

 

syncZuoraObjectIdByEntity : A list of zuora ID's mapped to their corresponding entity ID.


So, I ran the following code to initiate an On-Demand sync for Billing Account 2c92c0f95a6b227b015a85f457566e3b

 

 

 

List<Zuora.SyncResult> syncResult = new List<Zuora.SyncResult>();

Zuora.OnDemandSyncManager syncManager = new Zuora.OnDemandSyncManager(); 
syncManager.syncObjectType = Zuora.OnDemandSyncManager.ObjectType.BILLING_ACCOUNT; 
syncManager.syncZuoraObjectIdSet = new Set<String>{'2c92c0f95a6b227b015a85f457566e3b'}; 
syncManager.emailNotificationEnabled = false; 
map<String, String> entities = new Map<String,String>();

entities.put('2c92c0f95a6b227b015a85f457566e3b','2c92c0f95a6b2281015a85e4d86d030a'); 
syncManager.syncZuoraObjectIdByEntity = entities;

System.debug('########## syncManager : ' + syncManager); 
syncResult = syncManager.sendRequest(); 
System.debug('########## result : ' + syncResult);

 

Where 2c92c0f95a6b227b015a85f457566e3b is the Zuora id of the Billing Account
and 2c92c0f95a6b2281015a85e4d86d030a is the EntityId of the Entity this Zuora Account belongs to.

 

 You can get the EntityId by running the following query on BIllingAccount Object on your salesforce org

 

SELECT Id, OwnerId, Name, IsDeleted,  zqu__EntityID__c, zqu__EntityName__c, zqu__GlobalEntityID__c, zqu__ParentEntityID__c, zqu__ZuoraId__c FROM zqu__BillingEntity__c 

 

So, in your code, your need to pass

 

entities.put('<Zuora id of a Billing Account that exists either on parent entity or the child entity >','<Entity id as you find in BillingEntity Object in zqu_EntityID_c field above , either for the parent entity or the child entity where that Billing Account exist>);
syncManager.syncZuoraObjectIdByEntity = entities;

 

Hope this helps.

 

Thank you
Doyeli






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