Application and Document Notifications - ALBIS-GROUP/LeaseKitSDK-JS GitHub Wiki
Description
This function of the ALBIS LeaseKit lets users receive the changes to the status of a leasing application and documents of the application. It uses AWS queuing services to make sure the notification of a change will be delivered or in case of a persisting error a failure notification email will be sent.
Functionality
Save a leasing application and continuously receive updates of its status to be able to act upon it automatically.
Calling saveApplication
- Any corporate data center wanting to create an Application in Albis Portal integrates with LeaseKit SDK. By providing necessary payload for
saveApplicationmethod new leasing application can be created. - Execute
albis.saveApplicationfrom LeaseKit SDK - Resource
saveApplicationJSON object payload example:
request:
{
[...]
"receiverEndpoint": "company.com/endpoint/shop2",
"receiverFailEmails": "['[email protected]', '[email protected]']",
"receiverToken": "056961c2-341f-44cc-bc4d-02f7bf9d9c81",
[...]
}
response:
{
"jsonrpc": "2.0",
"result": 271385,
"id": "2020-09-14T15:31:47.946Z",
"receiverToken": "056961c2-341f-44cc-bc4d-02f7bf9d9c81"
}
To enable notifications to be delivered to the receiver endpoint a receiverEndpoint needs to be provided. When it is passed in the payload the JSON object post will be sent.
By placing receiverToken in the payload the notification payload will contain it to validate the notification - it is the same that is passed in the saveApplication. If receiverToken is not passed or is empty then it will be generated and returned with the response of saveApplication.
Application and Document notification update
- Alibis portal API triggers application and document updates in the form of notifications. It uses AWS delivery service to do the job. It only sends the notification when necessary parameters were provided in the saveApplication LeaseKit SDK method.
- Notification service will handover the notification status and deliver it to the receiver endpoint.
- The Shop 1 receiver endpoint will get JSON object payload example:
{
"subjectName":"App status change",
"applicationNo":"271385",
"message":{
"vertr_app":{
"eing":"2020-09-27",
"status":{
"Statusupdate":"sample text"
}
}
},
"messageSubject":"Status update for application",
"messageNo":"022ce81c-e870-11ea-9091-f01898e8246f",
"messageDateTime":"2020-09-27T14:17:15",
"receiverEndpoint":"https://company.com/endpoint/shop1",
"receiverToken":"056961c2-341f-44cc-bc4d-02f7bf9d9c81",
"failEmails":[
"[email protected]",
"[email protected]"
]
}
- When the notification cannot be delivered to the receiver endpoint the fail email will be sent to all emails provided in
failEmailsabout the problem. It only sends the emails when necessary parameters were provided in the saveApplication LeaseKit SDK method.