Happy Business Starts Here

Honor Student jmb
Honor Student

How to identify when a subscription synchronisation is done from Zuora

On Salesforce I have a Account that is synchronized with Zuora. On Zuora, when I do a subscription on this existing account, this triggered the update of Zuora__SubscriptionProductFeature__c and Zuora__Subscription__c objetcs and several API calls are made between the two solutions. This synchronization taked around 1mn to 1mn30.

 

How to identify on Salesforce that a synchronization is finished in order to launch specific action on Salesforce (Apex trigger, call)?

 

Regards

Jean-Marc

6 REPLIES 6
Valued Scholar

Re: How to identify when a subscription synchronisation is done from Zuora

I am also looking for this... let me know if you got the answer.

Zuora Support

Re: How to identify when a subscription synchronisation is done from Zuora

Hi @sub_future@jmb 

 

One way I could think of is by using the sync user which you have provided in commerce settings to verify whether the insert/ update happened in SF by the zuora sync. In your trigger add an if condition to verify whether the last modified by is sync user or not, If it is sync user then you can call your handler class to execute your code. 

If(subscription.lastmodifeiedby == 'ragahvendrakumar***@gmail.com'){

// Call your handler class 

}

 

Ex : 

sync3.jpg

As you see above is my sync user.

 

sync2.png

 

Any record that synced from zuora will have that user as Last modified by.

 

Hope this answered your question. Please let me know if you have any questions. Thanks!!

 

 






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

Valued Scholar

Re: How to identify when a subscription synchronisation is done from Zuora

@Raghav thanks for the reply.. this may not work in our situation as records keeps getting updated in SFDC... 

My question, how Zuora decides that any particular subscription or account has been sync'd to SFDC or not ?

Highlighted
Honor Student jmb
Honor Student

Re: How to identify when a subscription synchronisation is done from Zuora

Hello, unfortunately, I did not find a solution, I ask some Zuora Presales about it and they were not able to come back to me with a suitable answer. BTW, I will be glad to find or discover one.

 

What I have noticed is that it takes around 1 - 2 mn to get synchronized between SF and Zuora depending on the packages that you have installed and the objects synchronized.

 

What I did, which quite dirty, is to create an Apex Job (Job A) when a specified object is created or going to get synchronized with Zuora. The job will be fired 3mn after the beginning of the synchronization.

 

I also created another Apex job (Job B)  that kill Apex Job (Job A) once it has finished, in order to not have the Job A to get triggred when I don't need it.

 

The aim of the Apex Job (Job A) is to query the object that I wanted, in my case 

 Zuora__SubscriptionProductFeature__c which is linked to a Zuora__Subscription__c.

 

Hope this help.

 

Regards

J-M

 

 

 

 

Valued Scholar

Re: How to identify when a subscription synchronisation is done from Zuora

What we want to achieve is : generate an on-demand report of records which are not successfully sync to SFDC.

Master

Re: How to identify when a subscription synchronisation is done from Zuora