Is there a way to create WF/Apex Trigger to trigger a button on the record.

we use Zuora for SalesForce quote when customer accept the quote sales rep get an email notification through Sertifi e-signature (which is also configured in SalesForce), then the user goes into the quote to click Send to Zuora button which will change the status of the quote from New to Sent to z-bill and eventually Zuora will receive the quote.

We want to automate the process so that when customer accept the quote then quote should be sent from salesforce to Zuora. any help would be really appreciated.

PS - Sertifi status shows pending when the quote is sent to the customer and when customer accepts it, the status will changed to Signed.

  • From your post it looks like you want to change status from Signed to Sent to z-bill, it should be possible through workflow. Check what Send to Zuora button does apart from changing status, maybe its calling some API?
    – Raul
    Jan 24, 2017 at 13:46
  • I think you can read this page which says you can create your own send to zuora process and/or bypass the details page using sendToZBilling method
    – manjit5190
    Jan 24, 2017 at 13:53
  • @ Rahul - all i want is to send the quote from SF to Zuora without manually hitting "Send to Zuora" button. I created WF to change the value in the status field which worked fine but quote is not getting sent to Zuora. i think it is calling API but Iam not a developer to understand the logic.
    – I K
    Jan 24, 2017 at 15:11
  • @Manjit - Our developer has done that bit, now the question is how to hit "SendToZBilling" button automatically based on certain field update in the system.
    – I K
    Jan 24, 2017 at 15:12
  • DML does not execute buttons. DML can (through code/process builder) invoke http callouts
    – cropredy
    Jan 24, 2017 at 17:17

1 Answer 1



Zuora managed package provides the ability to invoke the send to z-Billing programmatically, check this, you have to call this method and provide your quoteId. There are different ways to achieve the functionality, if I were to design I would do this,

  1. Introduce a new status on Quote, let say 'Sending to Zuora'. Using the same workflow rule that you already built, update the quote status to 'Sending to Zuora' whenever the quote is e-Signed

  2. Implement a new apex class to call the above mentioned managed package method with your quote Id. Note - There is some sample code in the article down below

  3. Write a trigger on Quote that will call the apex class, the condition is whenever the status is 'Sending to Zuora'.

  4. The manage package method automatically updates the status to 'Sent to z-Billing' if the call is successful, otherwise the status will remain the same and the error gets updated on the quote

  5. Build a new view to display the quote with status 'Sending to Zuora' or run a schedule job nightly (or whatever interval) to email the sales reps about the failed quotes.

I hope this helps!

  • 1
    There is no Set allow callouts - True on a trigger. do you mean to have the trigger call a future method with those settings?
    – Eric
    Feb 26, 2017 at 6:19
  • That's correct, future method with Callout = True Feb 26, 2017 at 8:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .