Notifying SaaSync of invoices & credit memos that have been deleted from Zuora

Note: This requires administrative privileges in Zuora, an understanding of Zuora's API, and an OAuth user in order to generate a Bearer Token.

When using Zuora, you may delete invoices or credit memos for a variety of reasons. While we recommend that you cancel them in Zuora, we realize that sometimes it's a better approach to delete them altogether. 

 

By default, Zuora does not have a way of notifying SaaSync when this has happened. This will lead to deleted items being retained in the systems we have already synced them to. We can, however, support callout notifications from Zuora as long as you have setup custom events for invoice and credit memo deletions. Here is how to enable this functionality:

 

Step 1: Create Custom Events

You will need to create a custom event trigger using the Event Triggers API for both Invoice and CreditMemo baseObject types. The changeType should be set to DELETE.

 

Invoice Example:

POST https://rest.zuora.com/events/event-triggers Content-Type: application/json
Authorization: Bearer {bearer_token} { "active": true, "baseObject": "Invoice", "condition": "changeType == 'DELETE'", "description": "Triggers an event when an invoice has been deleted.", "eventType": { "description": "An invoice has been deleted", "displayName": "Invoice Deleted", "name": "InvoiceDeleted" } }

Credit Memo Example:

POST https://rest.zuora.com/events/event-triggers Content-Type: application/json
Authorization: Bearer {bearer_token} { "active": true, "baseObject": "CreditMemo", "condition": "changeType == 'DELETE'", "description": "Triggers an event when a credit memo has been deleted.", "eventType": { "description": "A credit memo has been deleted", "displayName": "Credit Memo Deleted", "name": "CreditMemoDeleted" } }

 

Step 2: Configure Callout Notifications

Once you have both of the custom events created, you will need to create callout notifications for both objects to send webhooks to SaaSync whenever the event is triggered. You can access your billing notifications here or by going to the user menu at the top right and selecting Billing > Setup Profiles, Notifications and Email Templates.

 

  1. Click the Add New Notification buttonAdd new notification in Zuora
  2. Select the custom event you created in Step 1 from Related Event dropdownAdd new notification related event
  3. Give the notification a name like "SaaSync Invoice Deleted"
  4. Check the Active box
  5. Under Delivery Options, check the Callout boxDelivery options - Callout
  6. In SaaSync, go to your Zuora Connection and click the vertical menu button to access your settings.
    SaaSync Zuora Settings
  7. Copy your unique Webhook URL from your settingsSaaSync webhook URL
  8. Enter that URL into the Base URL fieldCallout Base URL
  9. Add Parameters to the Callout (Note: The names must match exactly what is shown below and are case-sensitive)
    1. You will need to add a parameter with the value Event.Category named EventCategory
    2. You will need to add a parameter with the value Account.AccountNumber named AccountNumber
    3. You will need to add a parameter containing the Document Number
      1. Invoices
        1. Invoice.InvoiceNumber named InvoiceNumberInvoice add parameter
      2. Credit Memos
        1. CreditMemo.MemoNumber named CreditMemoNumberCredit Memo add parameter
  10. Finally, click Add New Notification to set the notification live

 

Once you have set up both callouts, SaaSync will be notified that an item has been deleted and will remove it from any system the item has been synced to.

Still need help? Contact Us Contact Us