Skip to content

Commit ddeb063

Browse files
authored
feat: KRPTN-1082-bank-guarantee-notifications
feat: KRPTN-1082 Bank Guarantee notifications
2 parents 377c3ed + 6dc3acb commit ddeb063

13 files changed

Lines changed: 157 additions & 1 deletion

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"title": "Bank Guarantee {{#eq event.status 'BANK_REVIEW' }}status change{{/eq}}{{#eq event.status 'BANK_APPROVED' }}approved{{/eq}}{{#eq event.status 'BANK_REJECTED' }}rejected{{/eq}}{{#eq event.status 'INTERNAL_REJECTED' }}rejected{{/eq}}{{#eq event.status 'ISSUED' }}issued{{/eq}}{{#eq event.status 'EXPIRED' }}expired{{/eq}}{{#eq event.status 'CANCELLED' }}cancelled{{/eq}}",
3+
"body": "Hi {{{user.preferredName}}}, {{#eq event.status 'BANK_REVIEW'}}status for your Bank Guarantee {{event.bgReference}} has changed to bank review.{{/eq}}{{#eq event.status 'BANK_APPROVED'}}your Bank Guarantee {{event.bgReference}} is approved.{{/eq}}{{#eq event.status 'BANK_REJECTED'}}your Bank Guarantee {{event.bgReference}} is rejected.{{/eq}}{{#eq event.status 'INTERNAL_REJECTED'}}your Bank Guarantee {{event.bgReference}} is rejected during internal review.{{/eq}}{{#eq event.status 'ISSUED'}}your Bank Guarantee {{event.bgReference}} is issued.{{/eq}}{{#eq event.status 'EXPIRED'}}your Bank Guarantee {{event.bgReference}} has expired.{{/eq}}{{#eq event.status 'CANCELLED'}}your Bank Guarantee {{event.bgReference}} is cancelled.{{/eq}}"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"level": "INFO",
3+
"targetGroup": "USER",
4+
"origin": "TradeFinance"
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"eventClassName": "com.backbase.lending.tradefinance.bankguarantee.event.spec.v1.BankGuaranteeStatusUpdatedEvent",
3+
"id": "bank-guarantee-status-updated",
4+
"eventBusinessName": "Bank Guarantee Status Updated",
5+
"recipientType": "internal",
6+
"extractor": "#this['contributorsIds']",
7+
"serviceAgreementExtractor": "#this['serviceAgreementId']",
8+
"generalNotifications": [
9+
{
10+
"id": "bank-guarantee-status-updated",
11+
"name": "Bank Guarantee Status Updated",
12+
"userPreferenceEnabled": true,
13+
"manageable": false,
14+
"additionalFilterLogic": "{'BANK_REVIEW', 'BANK_APPROVED', 'BANK_REJECTED', 'INTERNAL_REJECTED', 'ISSUED', 'EXPIRED', 'CANCELLED'}.contains(#triggeredEvent['status'])",
15+
"deliveryOptions": [
16+
{
17+
"channel": "in-app-notification",
18+
"channelSettings": "/bank-guarantee-status-updated/in-app-notification/in-app_channel-settings.json",
19+
"isEnabledByDefault": true,
20+
"isManageableByUser": false,
21+
"routeInfo": {
22+
"whereTo": "bank-guarantee-view",
23+
"data": "{\"id\":\"{{event.bgId}}\"}"
24+
},
25+
"engagementTemplates": [
26+
{
27+
"path": "/bank-guarantee-status-updated/in-app-notification/en_US/engagement-template.json",
28+
"locale": "en_US"
29+
}
30+
]
31+
}
32+
]
33+
}
34+
]
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"title": "Bank Guarantee to approve",
3+
"body": "Hi {{{user.preferredName}}}, you have a new Bank Guarantee of {{event.approval.amountDetails.currencyCode}} {{formatAmount event.approval.amountDetails.amount locale}} to approve."
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"level": "INFO",
3+
"targetGroup": "USER",
4+
"origin": "TradeFinance"
5+
}

collections/business/general-notifications/event-general-notifications/pending-approval/event-general-notifications.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,31 @@
195195
]
196196
}
197197
]
198+
},
199+
{
200+
"id": "bank-guarantee-to-approve",
201+
"name": "Bank Guarantee To Approve",
202+
"userPreferenceEnabled": true,
203+
"manageable": false,
204+
"additionalFilterLogic": "#triggeredEvent['approval']['resource'] == 'Bank Guarantee' && #triggeredEvent['approval']['function'] == 'Bank Guarantee - Application'",
205+
"deliveryOptions": [
206+
{
207+
"channel": "in-app-notification",
208+
"channelSettings": "/bank-guarantee-to-approve/in-app-notification/in-app_channel-settings.json",
209+
"isEnabledByDefault": true,
210+
"isManageableByUser": false,
211+
"routeInfo": {
212+
"whereTo": "bank-guarantee-approve-view",
213+
"data": "{\"id\":\"{{event.approval.itemId}}\"}"
214+
},
215+
"engagementTemplates": [
216+
{
217+
"path": "/bank-guarantee-to-approve/in-app-notification/en_US/engagement-template.json",
218+
"locale": "en_US"
219+
}
220+
]
221+
}
222+
]
198223
}
199224
]
200225
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"title": "Bank Guarantee {{#eq event.status 'BANK_REVIEW' }}status change{{/eq}}{{#eq event.status 'BANK_APPROVED' }}approved{{/eq}}{{#eq event.status 'BANK_REJECTED' }}rejected{{/eq}}{{#eq event.status 'INTERNAL_REJECTED' }}rejected{{/eq}}{{#eq event.status 'ISSUED' }}issued{{/eq}}{{#eq event.status 'EXPIRED' }}expired{{/eq}}{{#eq event.status 'CANCELLED' }}cancelled{{/eq}}",
3+
"body": "Hi {{{user.preferredName}}}, {{#eq event.status 'BANK_REVIEW'}}status for your Bank Guarantee {{event.bgReference}} has changed to bank review.{{/eq}}{{#eq event.status 'BANK_APPROVED'}}your Bank Guarantee {{event.bgReference}} is approved.{{/eq}}{{#eq event.status 'BANK_REJECTED'}}your Bank Guarantee {{event.bgReference}} is rejected.{{/eq}}{{#eq event.status 'INTERNAL_REJECTED'}}your Bank Guarantee {{event.bgReference}} is rejected during internal review.{{/eq}}{{#eq event.status 'ISSUED'}}your Bank Guarantee {{event.bgReference}} is issued.{{/eq}}{{#eq event.status 'EXPIRED'}}your Bank Guarantee {{event.bgReference}} has expired.{{/eq}}{{#eq event.status 'CANCELLED'}}your Bank Guarantee {{event.bgReference}} is cancelled.{{/eq}}"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"level": "INFO",
3+
"targetGroup": "USER",
4+
"origin": "TradeFinance"
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"eventClassName": "com.backbase.lending.tradefinance.bankguarantee.event.spec.v1.BankGuaranteeStatusUpdatedEvent",
3+
"id": "bank-guarantee-status-updated",
4+
"eventBusinessName": "Bank Guarantee Status Updated",
5+
"recipientType": "internal",
6+
"extractor": "#this['contributorsIds']",
7+
"serviceAgreementExtractor": "#this['serviceAgreementId']",
8+
"generalNotifications": [
9+
{
10+
"id": "bank-guarantee-status-updated",
11+
"name": "Bank Guarantee Status Updated",
12+
"userPreferenceEnabled": true,
13+
"manageable": false,
14+
"additionalFilterLogic": "{'BANK_REVIEW', 'BANK_APPROVED', 'BANK_REJECTED', 'INTERNAL_REJECTED', 'ISSUED', 'EXPIRED', 'CANCELLED'}.contains(#triggeredEvent['status'])",
15+
"deliveryOptions": [
16+
{
17+
"channel": "in-app-notification",
18+
"channelSettings": "/bank-guarantee-status-updated/in-app-notification/in-app_channel-settings.json",
19+
"isEnabledByDefault": true,
20+
"isManageableByUser": false,
21+
"routeInfo": {
22+
"whereTo": "bank-guarantee-view",
23+
"data": "{\"id\":\"{{event.bgId}}\"}"
24+
},
25+
"engagementTemplates": [
26+
{
27+
"path": "/bank-guarantee-status-updated/in-app-notification/en_US/engagement-template.json",
28+
"locale": "en_US"
29+
}
30+
]
31+
}
32+
]
33+
}
34+
]
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"title": "Bank Guarantee to approve",
3+
"body": "Hi {{{user.preferredName}}}, you have a new Bank Guarantee of {{event.approval.amountDetails.currencyCode}} {{formatAmount event.approval.amountDetails.amount locale}} to approve."
4+
}

0 commit comments

Comments
 (0)