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.
- Click the Add New Notification button
- Select the custom event you created in Step 1 from Related Event dropdown
- Give the notification a name like "SaaSync Invoice Deleted"
- Check the Active box
- Under Delivery Options, check the Callout box
- In SaaSync, go to your Zuora Connection and click the vertical menu button to access your settings.
- Copy your unique Webhook URL from your settings
- Enter that URL into the Base URL field
- Add Parameters to the Callout (Note: The names must match exactly what is shown below and are case-sensitive)
- You will need to add a parameter with the value Event.Category named EventCategory
- You will need to add a parameter with the value Account.AccountNumber named AccountNumber
- You will need to add a parameter containing the Document Number
- Invoices
- Invoice.InvoiceNumber named InvoiceNumber
- Credit Memos
- CreditMemo.MemoNumber named CreditMemoNumber
- Invoices
- 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.
Comments
0 comments
Article is closed for comments.