[ADMIN] คู่มือการเชื่อมต่อระบบสาธารณูปโภค

[ADMIN] คู่มือการเชื่อมต่อระบบสาธารณูปโภค

1.       ระบบสาธารณูปโภค (Utility) และ ระบบ Oracle ERP

1.1.               ระบบสาธารณูปโภค (Utility): การออกแบบโครงสร้างการเชื่อมต่อข้อมูลกับระบบ (Architecture Diagram)

รูปที่ 8 ระบบสาธารณูปโภค (Utility): การออกแบบโครงสร้างการเชื่อมต่อข้อมูลกับระบบ (Architecture Diagram)


ตาราง 7 อธิบายการทำงานระบบสาธารณูปโภค

ลำดับ

คำอธิบาย

1

ออกใบแจ้งหนี้/พิมพ์ใบชำระเงิน

2

ตรวจสอบข้อมูล Customer ว่ามีอยู่ในระบบแล้วหรือไม่

3

สร้าง Customer ในกรณีที่เป็น Customer รายใหม่

4A

ใบแจ้งหนี้/ข้อมูลใบแจ้งหนี้ระบบ

Ref1 คือ Project ID

Ref2 คือ Biller ID

4B

Interface ข้อมูลใบแจ้งหนี้ Real time

5

เรียกเก็บเงินที่ครบกำหนด (Call for due)

6

ขอรายการจ่ายจากธนาคารแบบ Real time

7

ตรวจเช็ครายการโอนเงินกับใบแจ้งหนี้

AR = ใช่

8

แจ้งเตือนจากPayment Hub

10

แสกนจ่านเงินผ่าน OR code หรือ ช่องทางออนไลน์

11

ส่งผ่านข้อมูลการจ่ายเงิน

12

ส่งข้อมูลการชำระเงินไปยัง Oracle AR, real time และทำการส่งต่อไปยัง Webservice ข้อมูลลูกค้าและใบแจ้งหนี้ AR และใบเสร็จสามารถดำเนินการโดยอัตโนมัติหลังผ่านกระบวนการประมวลผลรายวันแบบกลุ่ม

13

ส่งข้อมูลใบเสร็จ Realtime ไปบันทึกบน Webservice


1.1.1.                      API สำหรับการสร้างข้อมูลลูกค้า (Customer Creation)

HTTP Method

POST

Endpoint

https://sit-uat-oic797-axacomqa0kjr-si.integration.ap-singapore-1.ocp.oraclecloud.com/ic/api/integration/v1/flows/rest/KKU_INT_FIN_AR_10_US_ERP_CUS_MAS/1.0/CreateCustomer

Headers

Content-Type

application/json

Authorization

Bearer <access_token>

Request Body

{

    "CustomerDetails": [

        {

            "Customer": {

                "CustomerSourceSystem": "US",

                "CustomerName": "เสนีย์",

                "CustomerSourceReference": "9007878",

                "CustomerTaxRegistrationNumber": "9007878",

                "CustomerType": "Student"

            },

            "Address": {

                "AddressLine1": "123 หมู่ที่ 16 Thanon Mittraphap",

                "AddressLine2": "",

                "AddressLine3": "",

                "AddressLine4": "",

                "City": "เมือง",

                "State": "Khon Kaen",

                "Country": "Thailand",

                "PostalCode": "56894"

            },

            "Contact": {

                "ContactName": "witsanu chuenban",

                "MobileNumber": "08796356987",

                "LandLineNumber": "02365894",

                "EmailAddress": "abc@kku.com"

            }

        }

    ]

}

Response

{

    "result": [

        {

            "CustomerName": "เสนีย์",

            "CustomerSourceReference": "9007878",

            "OracleFusionCustomerNumber": "US_9007878",

            "StatusCode": "SUCCESS",

            "StatusMessage": "Customer interfaced successfully in oracle fusion"

        }

    ]

}

1.1.1.1.                 ผู้ใช้สามารถตรวจสอบผลลัพธ์ได้โดยมีขั้นตอนดังนี้

เข้าสู่ระบบ ERPàReceivablesàBillingàTasksàManage CustomersàSearch

A screenshot of a computer

Description automatically generated

รูปที่ 9 แสดง customer ที่ถูกสร้างด้วย API จากระบบ Utility

 

 


1.1.1.2.                 คำอธิบายชุดข้อมูลลูกค้าในระบบ

ลำดับ

ชื่อรายการภาษาอังกฤษ

ชื่อรายการภาษาไทย

Value

1

CustomerSourceSystem

ระบบแหล่งที่มาของลูกค้า

US

2

CustomerName

ชื่อของลูกค้า

เสนีย์

3

CustomerSourceReference

หมายเลขอ้างอิงลูกค้าในระบบต้นทาง

8007878

4

CustomerTaxRegistrationNumber

หมายเลขประจำตัวผู้เสียภาษีของลูกค้า

8007878

5

CustomerType

ประเภทของลูกค้า

Student

6

AddressLine1

ที่อยู่บรรทัดที่ 1

123 หมู่ที่ 16 Thanon Mittraphap

7

AddressLine2

ที่อยู่บรรทัดที่ 2 (ถ้ามี)

 

8

AddressLine3

ที่อยู่บรรทัดที่ 3 (ถ้ามี)

 

9

AddressLine4

ที่อยู่บรรทัดที่ 4 (ถ้ามี)

 

10

City

ชื่ออำเภอ

เมือง

11

State

ชื่อจังหวัด

Khon Kaen

12

Country

ประเทศ

Thailand

13

PostalCode

รหัสไปรษณีย์

56894

14

ContactName

ชื่อผู้ติดต่อ

witsanu chuenban

15

MobileNumber

หมายเลขโทรศัพท์มือถือ

08796356987

16

LandLineNumber

หมายเลขโทรศัพท์บ้านหรือสำนักงาน

02365894

17

EmailAddress

ที่อยู่อีเมลของผู้ติดต่อ

abc@kku.com


1.1.2.                      API สำหรับการสร้างข้อมูลใบแจ้งหนี้

HTTP Method

POST

Endpoint

https://sit-uat-oic797-axacomqa0kjr-si.integration.ap-singapore-1.ocp.oraclecloud.com/ic/api/integration/v1/flows/rest/KKU_INT_FIN_AR_10_US_ERP_CUS_MAS/1.0/CreateCustomer

Headers

Content-Type

application/json

Authorization

Bearer <access_token>

Request Body

{

    "InvoiceData": [

        {

            "Header": {

                "SourceInvoiceNumber": "48899789",

                "BusinessUnit": "KKBU01-สำนักงานอธิการบดี",

                "ServiceType": "External",

                "TransactionClass": "Invoice",

                "CustomerName": "Test API",

                "InvoiceAmount": "1000",

                "InvoiceDate": "2024-10-08",

                "PaymentTerms": "IMMEDIATE",

                "CustomerSourceReference": "00001",

                "CustomerSourceSystem": "US"

            },

            "Lines": [

                {

                    "LineNum": "1",

                    "LineDescription": "WaterBill",

                    "LineAmount": "300",

                    "LineType": "WaterBill"

                },

                {

                    "LineNum": "2",

                    "LineDescription": "ElectricityBill",

                    "LineAmount": "300",

                    "LineType": "ElectricityBill"

                },

                {

                    "LineNum": "3",

                    "LineDescription": "GarbageFee",

                    "LineAmount": "400",

                    "LineType": "GarbageFee"

                }

            ]

        }

    ]

}

Response

{

    "result": [

        {

            "SourceInvoiceNumber": "48899789",

            "OracleFusionInvoiceNumber": "12000",

            "StatusCode": "SUCCESS",

            "StatusMessage": "Invoice created successfully in oracle fusion"

        }

    ]

}

1.1.2.1.                 ผู้ใช้สามารถตรวจสอบผลลัพธ์ได้โดยมีขั้นตอนดังนี้

เข้าสู่ระบบ ERPàReceivablesàBillingàTasksàManage TransactionsàSearch

 

A screenshot of a computer

Description automatically generated

รูปที่ 10 แสดง AR Invoice ที่ถูกสร้างขึ้นผ่าน API จากระบบ Utility


1.1.2.2.                 คำอธิบายชุดข้อมูลใบแจ้งหนี้ในระบบ

ลำดับ

ชื่อรายการภาษาอังกฤษ

ชื่อรายการภาษาไทย

Value

1

SourceInvoiceNumber

หมายเลขใบแจ้งหนี้ที่มาจากระบบต้นทาง

48899789

2

BusinessUnit

หน่วยธุรกิจที่รับผิดชอบการออกใบแจ้งหนี้

KKBU01-สำนักงานอธิการบดี

3

ServiceType

ประเภทของบริการ

กรณี บุคลากร                ระบุ Employee

กรณี นักเรียน / นักศึกษา    ระบุ Student

กรณี หน่วยงาน/ส่วนงาน    ระบุ Department

กรณี ร้านค้า บุคคลภายนอก ระบุ External

4

TransactionClass

ประเภทของธุรกรรม

Invoice

5

CustomerName

ชื่อลูกค้า

Test API

6

InvoiceAmount

จำนวนเงินทั้งหมดของใบแจ้งหนี้

1000

7

InvoiceDate

วันที่ของใบแจ้งหนี้ รูปแบบ YYYY-MM-DD

2024-10-08

8

PaymentTerms

เงื่อนไขการชำระเงิน

IMMEDIATE

9

CustomerSourceReference

รหัสอ้างอิงของลูกค้าในระบบต้นทาง

00001

10

CustomerSourceSystem

ระบบต้นทางของลูกค้า

US

11

LineNum

หมายเลขลำดับของรายการบริการ

1

12

LineDescription

คำอธิบายของรายการบริการ

WaterBill

13

LineAmount

จำนวนเงินของรายการบริการ

300

14

LineType

ประเภทของรายการ เช่น WaterBill, ElectricityBill, GarbageFee

WaterBill


1.1.3.                      API สร้างข้อมูลการลดหนี้

HTTP Method

POST

Endpoint

https://sit-uat-oic797-axacomqa0kjr-si.integration.ap-singapore-1.ocp.oraclecloud.com/ic/api/integration/v1/flows/rest/KKU_INT_FIN_AR_11_US_ERP_CM/1.0/CreateInvoice

Headers

Content-Type

application/json

Authorization

Bearer <access_token>

Request Body

{

    "InvoiceData": [

        {

            "Header": {

                "SourceInvoiceNumber": "48899789",

                "BusinessUnit": "KKBU01-สำนักงานอธิการบดี",

                "ServiceType": "External",

                "TransactionClass": "Credit Memo",

                "CustomerName": "Test API",

                "InvoiceAmount": "-1000",

                "InvoiceDate": "2024-10-08",

                "PaymentTerms": "IMMEDIATE",

                "CustomerSourceReference": "00001",

                "SourceCreditMemoNumber": "CM48899789",

                "CustomerSourceSystem": "US"

            },

            "Lines": [

                {

                    "LineNum": "1",

                    "LineDescription": "WaterBill",

                    "LineAmount": "-300",

                    "LineType": "WaterBill"

                },

                {

                    "LineNum": "2",

                    "LineDescription": "ElectricityBill",

                    "LineAmount": "-300",

                    "LineType": "ElectricityBill"

                },

                {

                    "LineNum": "3",

                    "LineDescription": "GarbageFee",

                    "LineAmount": "-400",

                    "LineType": "GarbageFee"

                }

            ]

        }

    ]

}

Response

{

    "result": [

        {

            "SourceInvoiceNumber": "48899789",

            "OracleFusionInvoiceNumber": "12000",

            "SourceCreditMemoNumber": " CM48899789",

            "OracleFusionCreditMemoNumber": " 21035",

            "StatusCode": "SUCCESS",

            "StatusMessage": "Credit Memo created successfully in oracle fusion"

        }

    ]

}

1.1.3.1.                 ผู้ใช้สามารถตรวจสอบผลลัพธ์ได้โดยมีขั้นตอนดังนี้

เข้าสู่ระบบ ERPàReceivablesàBillingàTasksàManage TransactionsàSearch

A screenshot of a computer

Description automatically generated

รูปที่ 11 แสดง Credit Memo ที่ถูกสร้างขึ้นผ่าน API จากระบบ Utility

 


1.1.3.2.                 ระบบสาธารณูปโภค (Utility): คำอธิบายชุดข้อมูลใบลดหนี้ในระบบ

ลำดับ

ชื่อรายการภาษาอังกฤษ

ชื่อรายการภาษาไทย

Value

1

SourceInvoiceNumber

หมายเลขใบแจ้งหนี้ต้นทางที่เกี่ยวข้องกับ Credit Memo

48899789

2

BusinessUnit

หน่วยธุรกิจที่รับผิดชอบ Credit Memo

KKBU01-สำนักงานอธิการบดี

3

ServiceType

ประเภทของบริการ

External

4

TransactionClass

ประเภทของธุรกรรม

Credit Memo

5

CustomerName

ชื่อลูกค้า

Test API

6

InvoiceAmount

จำนวนเงินทั้งหมดของ Credit Memo (ค่าลบ)

-1000

7

InvoiceDate

วันที่ของ Credit Memo รูปแบบ YYYY-MM-DD

8/10/2024

8

PaymentTerms

เงื่อนไขการชำระเงิน

IMMEDIATE

9

CustomerSourceReference

รหัสอ้างอิงของลูกค้าในระบบต้นทาง

1

10

SourceCreditMemoNumber

หมายเลขอ้างอิง Credit Memo ต้นทาง

CM48899789

11

CustomerSourceSystem

ระบบต้นทางของลูกค้า เช่น US

US

12

LineNum

หมายเลขลำดับของรายการบริการ

1

13

LineDescription

คำอธิบายของรายการบริการ

WaterBill

14

LineAmount

จำนวนเงินของรายการบริการ (ค่าลบ)

-300

15

LineType

ประเภทของรายการ เช่น WaterBill, ElectricityBill, GarbageFee

WaterBill