Happy Business Starts Here

How to trigger credit balance change email notification?

Highlighted
Support SME

How to trigger credit balance change email notification?

I want to trigger an email notification when there is credit balance changing happens.

How to do that?

 

 

 

 






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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Support SME

Re: How to trigger credit balance change email notification?

Here is a very simple test of using Customized Notification with Workflow to trigger credit balance change email notification.

The reason not using email in billing service tenant is because many important merge fields(like CreditBalanceAdjustment.Amount) are not supported by the email notification template but supported by notification callout.

And this is a test for the environments which don't have Invoice Settlement enabled.

 

1. Create Event Trigger

https://www.zuora.com/developer/api-reference/#operation/POST_EventTrigger

 

POST https://rest.apisandbox.zuora.com/events/event-triggers
{
"baseObject": "CreditBalanceAdjustment",
"condition": "changeType == 'INSERT'",
"description": "Trigger an event when CreditBalance is created",
"eventType": {
"name": "CreditBalanceAdjustmentCreated",
"displayName": "CBA Created",
"description": "CBA Created"
},
"active": true
}

 

 

2. Create Notification

1) login to your billing service tenant, goto Billing Settings > Setup Profiles, Notifications and Email Templates

2) select the Communication Profile you'd like to add the notification and click add new notification

3) select the event trigger name you just created in 1 in the dropdown list of Related Event

4) check on Active, check on Callout, then add callout parameters as below and save

Screen Shot 2019-06-23 at 6.06.23 AM.png

(we could put a dummy value for the password and the Base URL here for now)

 

3. Create Workflow

I'll skip the general steps to use workflow and please visit our Knowledge Center to get a more detailed instruction: https://knowledgecenter.zuora.com/CE_Workflow

1) Open your Workflow application, create a new workflow instance

2) Go to the SETTINGS tab and configure the Mapped Input Fields and Params as below

(please make sure the order of them is the same as the order of callout parameters in your billing service tenant)

Screen Shot 2019-06-23 at 6.16.00 AM.png

3) Then in the same setting page, copy the URL and password from the Callout Config section after clicking the Show credentials button.

Screen Shot 2019-06-23 at 4.51.53 AM.png

4) Pasting theURL and password back to your callout setting in your billing services tenant(the ones we used a dummy value).

5) Go back to the tab of WORKFLOW, click the plus sign, then On StartNotifications > Email

6) In the Address tab, configure as how you need the email addresses to be

7) In the Body tab, customize your template using the input parameters. Below is an example of the email body:

Screen Shot 2019-06-23 at 6.22.31 AM.png

8) Give this step a name at the top of the popup and save it. 

 

4. Test

1) login to your billing service tenant, create/find a customer account

2) make sure the customer account is in the Communication Profile where you created the notification

3) click the button process a payment 

4) fill in the required info to create a payment, make sure the payment is applied to the account instead of any invoice

5) after the payment is created, go to the customer account page and check the Callout History (from Event Triggers) tab at the bottom of the page

Screen Shot 2019-06-23 at 6.30.12 AM.png

6) goto your Workflow instance to check the RUN HISTORY tab

Screen Shot 2019-06-23 at 6.36.42 AM.png

7) check your email 

Screen Shot 2019-06-23 at 6.37.35 AM.png

 






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

View solution in original post

1 REPLY 1
Highlighted
Support SME

Re: How to trigger credit balance change email notification?

Here is a very simple test of using Customized Notification with Workflow to trigger credit balance change email notification.

The reason not using email in billing service tenant is because many important merge fields(like CreditBalanceAdjustment.Amount) are not supported by the email notification template but supported by notification callout.

And this is a test for the environments which don't have Invoice Settlement enabled.

 

1. Create Event Trigger

https://www.zuora.com/developer/api-reference/#operation/POST_EventTrigger

 

POST https://rest.apisandbox.zuora.com/events/event-triggers
{
"baseObject": "CreditBalanceAdjustment",
"condition": "changeType == 'INSERT'",
"description": "Trigger an event when CreditBalance is created",
"eventType": {
"name": "CreditBalanceAdjustmentCreated",
"displayName": "CBA Created",
"description": "CBA Created"
},
"active": true
}

 

 

2. Create Notification

1) login to your billing service tenant, goto Billing Settings > Setup Profiles, Notifications and Email Templates

2) select the Communication Profile you'd like to add the notification and click add new notification

3) select the event trigger name you just created in 1 in the dropdown list of Related Event

4) check on Active, check on Callout, then add callout parameters as below and save

Screen Shot 2019-06-23 at 6.06.23 AM.png

(we could put a dummy value for the password and the Base URL here for now)

 

3. Create Workflow

I'll skip the general steps to use workflow and please visit our Knowledge Center to get a more detailed instruction: https://knowledgecenter.zuora.com/CE_Workflow

1) Open your Workflow application, create a new workflow instance

2) Go to the SETTINGS tab and configure the Mapped Input Fields and Params as below

(please make sure the order of them is the same as the order of callout parameters in your billing service tenant)

Screen Shot 2019-06-23 at 6.16.00 AM.png

3) Then in the same setting page, copy the URL and password from the Callout Config section after clicking the Show credentials button.

Screen Shot 2019-06-23 at 4.51.53 AM.png

4) Pasting theURL and password back to your callout setting in your billing services tenant(the ones we used a dummy value).

5) Go back to the tab of WORKFLOW, click the plus sign, then On StartNotifications > Email

6) In the Address tab, configure as how you need the email addresses to be

7) In the Body tab, customize your template using the input parameters. Below is an example of the email body:

Screen Shot 2019-06-23 at 6.22.31 AM.png

8) Give this step a name at the top of the popup and save it. 

 

4. Test

1) login to your billing service tenant, create/find a customer account

2) make sure the customer account is in the Communication Profile where you created the notification

3) click the button process a payment 

4) fill in the required info to create a payment, make sure the payment is applied to the account instead of any invoice

5) after the payment is created, go to the customer account page and check the Callout History (from Event Triggers) tab at the bottom of the page

Screen Shot 2019-06-23 at 6.30.12 AM.png

6) goto your Workflow instance to check the RUN HISTORY tab

Screen Shot 2019-06-23 at 6.36.42 AM.png

7) check your email 

Screen Shot 2019-06-23 at 6.37.35 AM.png

 






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

View solution in original post