Happy Business Starts Here

"Do not email invoices with 0 Invoice Total" in API and ZQuote

Leo
Support SME
Support SME

"Do not email invoices with 0 Invoice Total" in API and ZQuote

Question or Problem Statement:
Noticed there is a setting when doing a bill run there is an option that says "Do not email invoices with 0 Invoice Total" - Is there a way to have this when doing amendments/quotes from ZQuote?
 
Solution:
If you were using email notification "Invoice Posted | Invoice Posted via API"  to send invoices by API or a quote was sent, you can disable this email notification then create your own custom event trigger. For example, "Email invoices when Invoice Total>0", and then create a new email notification with this custom event trigger.
 
You will need to use Postman(https://www.postman.com/downloads/) to call the tenant, then create the custom event trigger, then create an email template for the event trigger, and then enable the email notification with that event trigger and email template. Also, Bearer token must be generated. 

A few videos for your reference:
1. Generate Bearer token with Postman.
https://drive.google.com/file/d/1x7HClxwEqTZFoCUBYaNAI8MjcXgrzPo1/view
Doc: Authentication
https://knowledgecenter.zuora.com/Central_Platform/API/AB_Aggregate_Query_API/AA_AQuA_API_Introducti...

2. Create a custom event trigger.
https://drive.google.com/file/d/1TRLyZzfS-6lTHBkbMpnf1dVj628tz5g0/view

3. Creare a new email template, enable the email notification with the event trigger and email template.
https://drive.google.com/file/d/1Fj1yv8pKxrpa_GDxUYNrkiR7Lf34TNt9/view
 
The below is a sample code, you should see: When Invoice Total>0, email send. When Invoice Total=0, email does not send. 
Post: https://rest.apisandbox.zuora.com/events/event-triggers

Request:
{
  "active": true,
  "baseObject": "Invoice",
"condition": "changeType == 'INSERT' && Invoice.Source == 'API' && Invoice.Status == 'Posted' && Invoice.Amount > 0.00",
  "description": "Trigger an event when an invoice is posted with amount over via API",
  "eventType": {
    "description": "An invoice is posted with amount over 0 via API",
    "displayName": "Invoice Amount Over 0 Post via API",
    "name": "Invoice-Amount-Over-0-Post-via-API"
  }
}

Response:
{
    "id": "6f1c21d4098b4ac19d21f854426445ba",
    "baseObject": "Invoice",
    "condition": "changeType == 'INSERT' && Invoice.Source == 'API' && Invoice.Status == 'Posted' && Invoice.Amount > 0.00",
    "description": "Trigger an event when an invoice is posted with amount over via API",
    "eventType": {
        "name": "Invoice-Amount-Over-0-Post-via-API",
        "displayName": "Invoice Amount Over 0 Post via API",
        "description": "An invoice is posted with amount over 0 via API",
        "namespace": "user.notification"
    },
    "active": true
}
 
1.png
 
 
 






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