Technical Design Documentation
DIGITAL LEADS TO BOOKING MANAGEMENT PHASE 1 2023
Ticket No
Project Manager Roizal Simanullang
Requestor Roizal Simanullang
Document No
Document Version 1.0
Created By Haiqal Muhamad Alfarisi
Created Date 2022-12-13
Updated By Haiqal Muhamad Alfarisi
Updated Date 2022-12-13
Technical Design -DLBM- Ver. 1.0
Table of Contents
Table of Contents.......................................................................................................................................................2
1 Document Author..............................................................................................................................................3
2 Document Approval...........................................................................................................................................3
3 Revision History.................................................................................................................................................3
4 Introduction.......................................................................................................................................................4
5 Technical Flow....................................................................................................................................................4
5.1 FIFADA Integration...................................................................................................................................4
5.1.1 Flowable Process......................................................................................................................................4
5.1.2 API FIFADA Add Leads..............................................................................................................................5
5.2 Robocall Integration.................................................................................................................................6
5.2.1 API Send to Robocall.................................................................................................................................6
5.2.2 API Receive Follow-up Result from Robocall...........................................................................................8
5.2.3 Determination of Follow-up Result from Robocall................................................................................10
5.3 Whatsapp BOT Integration.....................................................................................................................11
5.3.1 API Send to Whatsapp BOT....................................................................................................................11
5.3.2 API Receive From Whatsapp BOT...........................................................................................................13
5.4 Followup Digital Leads Engine................................................................................................................14
6 Data Model.......................................................................................................................................................16
6.1.1 DL_TRN_FOLLOWUP_BOT_HDR.............................................................................................................16
6.1.2 DL_TRN_FOLLOWUP_ROBOCALL............................................................................................................16
6.1.3 DL_TRN_FOLLOWUP_WABOT................................................................................................................17
6.1.4 DL_TRN_ROBOCALL_INFO......................................................................................................................17
6.1.5 DL_TRN_WABOT_INFO...........................................................................................................................18
7 Entity Relationship Diagram............................................................................................................................18
PT. Federal International Finance - 2
Technical Design -DLBM- Ver. 1.0
1 Document Author
No Name Position / Role
1 Haiqal Muhamad Alfarisi System Analyst
2 Document Approval
No Name Position / Role Sign
1 Achmad Yumna Sain Department Head Customer
Application & MIS
2 Haiqal Muhammad Alfarisi System Analyst
3 Revision History
Version Date Author Change Summary
1.0 13-12-2022 Haiqal Muhamad Alfarisi
PT. Federal International Finance - 3
Technical Design -DLBM- Ver. 1.0
4 Introduction
Digital Leads are develop about increasing productivity, speeding up the
Leads process, and knowing customer interest in the products offered by FIF, Digital
Leads has added a process of confirming customer interest through Robots with
Robocall and Whatsapp BOT features. The process changed several technical
flows both external (FIFADA) and internal (Flowable Digital Leads Engine).
5 Technical Flow
5.1 FIFADA Integration
Integration with the E-Form Customer (FIFADA) is adding information used
as a decision by the Digital Leads Engine. First, FIFADA users and the Digital
Leads Team can decide which channels do not need to be followed up by the
BOT feature, then is to read the options the customer wants to follow up with
Robocall or WA.
5.1.1 Flowable Process.
1.1 Digital Leads Engine Flowable
Checking BOT follow-up is carried out after the Digital Leads Engine has
finished Scoring. Leads that are eliminated or terminated by the Engine
will not go through the “Check Autofollowup” process. There are 4
possibilities that will be processed by the Digital Leads Engine.
1. If FIFADA decides Auto Interest, it will go to the Autofollowup flow
and continue to the “Set Cust Data” service task.
PT. Federal International Finance - 4
Technical Design -DLBM- Ver. 1.0
2. If FIFADA decides not to have Auto Interest, then check the follow-up
by BOT option from the Customer. If “CallBy” is CALL, then proceed
to the "Robocall" service task process.
3. If “CallBy” is WA, then proceed to the "Whatsapp BOT" service
task process.
4. If the Digital Leads user performs a manual resolve for Leads that
have errors, then it will check whether the Leads have been followed
up by BOT or not to resolve double followups and the Leads will
immediately stop (End Process).
5.1.2 API FIFADA Add Leads.
This API to submit Leads from FIFADA to Digital Leads provided by
Digital Leads Teams.
Swagger = [Link]
Additional Fields API
Name Field Mandator Type Description
y
byPass Yes Varchar(1) “1” = If the leads go through the
normal flow, leads will be scored
and will be followed up by Call/WA.
“2” = If the leads don’t need to be
followed up by Call/WA (Auto
Interested) and will go directly to
the channel app (FM Connect/FM
Sales)
“3” = If the leads don’t need to be
Followed up by Call/WA (Auto
Interested) and will go directly to E-
Form Internal (Created Tasklist).
callBy Yes Varchar(10) WA = If the customer will be
followed up via Whatsapp.
CALL = If the customer will be
followed up via Phone Call
isWaPhone Yes Varchar(1) - Y/N = If the first mobphone is registered
1 on Whatsapp
isWaPhone Yes Varchar(1) - Y/N = If the second mobphone is
2 registered on Whatsapp
Request Example.
"followupData": {
"callBy": "CALL",
"byPass": “2”,
"isWaPhone1": "Y",
PT. Federal International Finance
"isWaPhone2": "N" - 5
},
Technical Design -DLBM- Ver. 1.0
5.2 Robocall Integration
Digital Leads Engine will integrate with Robocall Wiz AI to send Leads
that must be followed up. Information about the API Key and Secret Key can be
seen on the Wiz AI Dashboard. All Call processes and history are stored in
One Task ID which will be used in Production.
5.2.1 API Send to Robocall.
This API is used to send Leads to Robocalls. Authorization is obtained
from the sha256mac Encryption process by generating secretKey and
BodyJson (Code in Gitlab).
o URL = [Link]
o Method Format : POST
o Headers
Key Value
Content-Type application/json
Authorization Signature Key from Encrpyt
PT. Federal International Finance - 6
Technical Design -DLBM- Ver. 1.0
sha256mac
Nonce Random Alphanumeric
Timestamps Generate Timestamps Sysdate
o Body Request
Name Field Mandator Type Description
y
callTaskId Yes Long Check Active Task ID from Dashboard
name Yes String Customer Name
phone Yes String Customer Mobphone
Product Yes String Customer Product (Masking Data)
Platform Yes String Description of Source Origin
Submit_dat Yes Date Created Date Leads
e
Contact ID Yes String Random Alphanumeric (Robocall ID)
o Request Example
{
"callTaskId": 438602979403072800,
"customerInfoList": [
{
"name": "AMARAH ROIZAL",
"phone": "082368688095",
"contactId": "2eQD1WYMHuk5L3q3",
"properties": {
"Name_PERSON_NAME": "AMARAH ROIZAL",
"Gender": "Bapak",
"Product": "Motor Baru",
"Platform": "MOXA",
"Submit_DATE": "2022-12-12"
}
}
]
}
PT. Federal International Finance - 7
Technical Design -DLBM- Ver. 1.0
5.2.2 API Receive Follow-up Result from Robocall.
The process of receiving follow-up results from Robocalls uses the
Callback API system. So Robocall will asynchronously make calls to
customers and record information from Call ID to Dialog, and all of that is
wrapped into one Body API. Digital Leads only sets up one API to
accommodate the process. The endpoint is registered in the Wiz API
Dashboard as an API Callback from Digital Leads.
o URL : [Link]
o Method Format : POST
o Headers
Key Value
Content-Type application/json
Authorization NULL
PT. Federal International Finance - 8
Technical Design -DLBM- Ver. 1.0
o Request Example
{
"callCode": "200",
"callCodeType": "1",
"callDuration": 47,
"callTaskId": 438602979403072800,
"dialogDetail": [
{
"role": "robot",
"text": "Halo selamat pagi saya dari FIFGROUP apakah benar saya berbicara dengan Bapak ROIZAL?
},
{
"role": "customer",
"text": "benar"
},
{
"role": "robot",
"text": "Apakah benar melakukan pengajuan pinjaman kredit Motor Baru melalui MOXA"
},
{
"role": "customer",
"text": "iya benar"
},
{
"role": "robot",
"text": "Baik. Apakah bersedia jika pengajuannya kami proses lebih lanjut?"
},
{
"role": "customer",
"text": "bersedia"
},
{
"role": "robot",
"text": "Baik terima kasih atas Konfirmasinya. pengajuannya akan diproses oleh PIC cabang kami dan
akan dihubungi kembali, Mohon ditunggu teleponnya. Terima kasih."
}
],
"dialogRound": 7,
"dialogueAudioUrl":
PT. Federal "/v2/task/readAudio", -
International Finance 9
"dialogueId": 1452,
"dialogueName": "FIF Loan Verification",
Technical Design -DLBM- Ver. 1.0
"tags": [
{
"tagName": "Registration Status",
"tagValue": "Will Continue",
"timestamp": "1670211005"
},
{
"tagName": "FIF",
"tagValue": "Correct PIC",
"timestamp": "1670210990"
},
{
"tagName": "FIF",
"tagValue": "Yes Apply",
"timestamp": "1670210999"
}
],
"transferStatus": "0",
"whetherComplete": "1"
}
5.2.3 Determination of Follow-up Result from Robocall.
Based on the Payload API Received Followup Result example from
Robocall, follow-up result information can be obtained from the JSON tags
key. Each conversation will bring up a new tag which consists of tagName
and tagValue. Digital Leads will create a roadmap for getting results based
on the List Tags.
PT. Federal International Finance - 10
Technical Design -DLBM- Ver. 1.0
5.3 Whatsapp BOT Integration.
Digital Leads Engine will integrate with Whatsapp BOT 3Dolphins to
send leads that must be followed up. The process of sending leads to the
Whatsapp BOT environment through Broker Microservices that runs on the
FIF Server. Digital Leads will send information to the Broker then it will be
followed by hitting the Whatsapp broadcast API.
PT. Federal International Finance - 11
Technical Design -DLBM- Ver. 1.0
5.3.1 API Send to Whatsapp BOT.
Payload Design API
Name Field Mandator Type (Length Description
y Recommendatio
n)
callBy Yes Varchar (5) WA = If the customer will be
followed up via Whatsapp.
CALL = If the customer will be
followed up via Robocall and
Switched to WA.
templateId Yes Varchar - Template ID from Whatsapp
BOT.
phoneNo Yes Varchar (15) - Mobile phone Customer
leadsId Yes Varchar (50) - Leads ID Digital Leads (Generate UUID)
personNam Yes Varchar (100) - Customer Name
e
gender Yes Varchar (10) - Customer Sex ( M : Bapak, F : Ibu)
product Yes Varchar (30) - Product selected by Customer.
Ex : Motor Baru, Danastra, Haji, Umroh
platform Yes Varchar (20) - Source Channel Leads.
Ex: MOXA, FIFADA, FMC.
submitDate Yes Date - Created Submit Leads
(yyyy-MM-dd)
Request Design Example.
{
"callBy": "WA",
"templateId": "2u2ub3r23dn32ilbr3432f32iu",
"phoneNo": "08158609999",
"fields": [
{
"leadsId": "554cb20c-fda1-4a07-adc8-86f8f5ecbd27",
"personName": "TEST DL",
"gender": "Bapak",
"product": "Motor Baru",
"platform": "MOXA",
"submitDate": "2022-11-29"
}
]
}
PT. Federal International Finance - 12
Technical Design -DLBM- Ver. 1.0
5.3.2 API Receive From Whatsapp BOT
This API is used to received follow-up customer leads from BOT.
o URL = [Link]
o Method Format : POST
o Headers
Key Value
Content-Type application/json
Authorization Bearer [space] [access_token from
2.1]
o Body Request
Name Field Mandator Type Description
y
callId Yes Integer 1 = Followup from Robocall
2 = Followup from Whatsapp BOT
leadsId Yes Varchar(50) Identity Leads from Digital Leads.
Notes:
1. If it is from Robocall, it can be
retrieved from Contact ID
status Yes Varchar(30) - WILL CONTINUE : If the customer is
Interested.
- WILL NOT CONTINUE : If the
customer is not Interested
- NOT COMPLETE : If the customer
does not pick up the call beyond max
PT. Federal International Finance - 13
Technical Design -DLBM- Ver. 1.0
redials.
- OPPORTUNITY : If the customer
asks to be called back.
reason No Varchar(12 - Filled if Followup Status is WILL NOT
0) CONTINUE.
callBackTim No HH:mm:ss - Filled if Followup Status is
e dd/MM/yyyy OPPORTUNITY
o Request Example
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value":
"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJPZjlLVVNVbEFadFFlMnRqTGJMMFZQVTV
YdFcyVmNBc1N3QktxSzIwQkFRIn0.eyJqdGkiOiI4ZDgzZGEyMC1hYzllLTRjZWYtYjJhMS1mMWM5
NDJjZTJlMzEiLCJleHAiOjE2Njg1ODU2NjIsIm5iZiI6MCwiaWF0IjoxNjY4NTgzODYyLCJpc3MiOiJodH
RwczovL3Rlc3RhdXRodG9rZW4uZmlmZ3JvdXAuY28uaWQ6ODc0My9hdXRoL3JlYWxtcy9maWZn
cm91cCIsImF1ZCI6ImZpZmdyb3VwLXRva2VuIiwic3ViIjoiMDc2MzIwM2ItYzllMS00OTYwLW…. ",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
raw": "{\n \"callBackTime\": null,\n \"callId\": 1,\n \"leadsId\": \"2c68d65b-6652-
4811-9cdf-32e63855bd9a\",\n \"reason\": null,\n \"status\": \"WILL CONTINUE\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
PT. Federal International Finance - 14
Technical Design -DLBM- Ver. 1.0
5.4 Followup Digital Leads Engine.
Leads that have been followed up by Robocall or Whatsapp BOT will
trigger a Flowable process that is run by the Digital Leads Engine. Each
follow-up result has a different flow, whether it will continue to the next
channel (FM Connect/FM Sales), the leads will be terminated or will be called
back at a specified time.
There are 4 possible statuses that are obtained from the BOT feature
and will be processed by the Digital Leads Engine.
1. WILL CONTINUE = Customer is interested in continuing the
submission, Digital Leads Engine will send the lead to FM Connect/FM
Sales.
2. WILL NOT CONTINUE = The Customer is not interested in
continuing the submission, the leads will be terminated.
3. OPPORTUNITY = The Customer requests to be contacted again at a
certain hour. This process will be executed with a callback scheduler.
The scheduler will run every hour.
4. NOT COMPLETE = The Customer does not respond to Call/Chat 3x,
then Digital Leads Engine will switch BOT.
PT. Federal International Finance - 15
Technical Design -DLBM- Ver. 1.0
6 Data Model
6.1.1 DL_TRN_FOLLOWUP_BOT_HDR
6.1.2 DL_TRN_FOLLOWUP_ROBOCALL
PT. Federal International Finance - 16
Technical Design -DLBM- Ver. 1.0
6.1.3 DL_TRN_FOLLOWUP_WABOT
6.1.4 DL_TRN_ROBOCALL_INFO
PT. Federal International Finance - 17
Technical Design -DLBM- Ver. 1.0
6.1.5 DL_TRN_WABOT_INFO
7 Entity Relationship Diagram
PT. Federal International Finance - 18
Technical Design -DLBM- Ver. 1.0
Rules :
1. Sfefwe
2. Efwefe
3.
PT. Federal International Finance - 19