OTA PortalHarth Living

Agoda Partner Portal (YCS) — cẩm nang điều khiểnAgoda Partner Portal (YCS) — control handbook

Đúc từ phiên 05/09/2026: tạo 18 mẫu tin + bật Message scheduler cho 6 listing. Đây là tài liệu thao tác (điều hướng, DOM, bẫy tự động hoá). Luật nội dung tin nhắn ở vault/10-rules/ota-messaging-rules.md §4. Luật set up listing ở agoda-listing-playbook.md. Kho tin nguồn ở vault/19-Harthliving-OTA/platform-status/messages/agoda/.

Distilled from the session of 05/09/2026: created 18 message templates and turned on the Message scheduler for 6 listings. This is an operating document (navigation, DOM, automation traps). Content rules for messages are at vault/10-rules/ota-messaging-rules.md §4. Listing set-up rules are at agoda-listing-playbook.md. Source message library at vault/19-Harthliving-OTA/platform-status/messages/agoda/.

⚠️ Mặc định Agoda là CHỈ ĐỌC — vault/10-rules/ota-readonly-rule.md. Ba script ghi bên dưới là ngoại lệ có chủ đích, chỉ chạy khi user ra lệnh trực tiếp cho đúng việc đó.

⚠️ Agoda is READ-ONLY by default — vault/10-rules/ota-readonly-rule.md. The three write scripts below are deliberate exceptions, to be run only when the user gives a direct order for exactly that task.


1. Điều hướng — URL là đường nhanh nhất1. Navigation — the URL is the fastest route

Cần tới Cách
Hộp thư khách của một property https://portal.agoda.com/mldc/en-us/app/hermes/inbox/ycs/<AGODA_ID>
Đổi property Đổi thẳng <AGODA_ID> trên URL — không cần bấm menu chọn căn ở thanh trên
Message scheduler Trong hộp thư → Automation tools → Scheduled messages
Auto reply Automation tools → Auto reply (khác Scheduled messages, chưa khảo sát)
Template replies Panel cố định bên phải hộp thư, có nút Create new
Need How
A property's guest inbox https://portal.agoda.com/mldc/en-us/app/hermes/inbox/ycs/<AGODA_ID>
Switch property Change <AGODA_ID> directly in the URL — no need to click the property selector in the top bar
Message scheduler In the inbox → Automation tools → Scheduled messages
Auto reply Automation tools → Auto reply (different from Scheduled messages; not yet explored)
Template replies Fixed panel on the right of the inbox, with a Create new button

Breadcrumb khi vào scheduler: Guest messages > Message preference, hai tab Auto reply | Message scheduler.

Breadcrumb when entering the scheduler: Guest messages > Message preference, two tabs Auto reply | Message scheduler.

Bảy Agoda ID (đối chiếu ../listings.md): 84463574 181 Tô Hiến Thành · 84463562 15 Nước Mặn 5 · 84463560 41 Lê Hy Cát · 63382515 A La Carte 305 · 84510952 A La Carte 404 · 84463577 A La Carte 502 · 96450982 25 An Thượng 11 (lên sàn 18/09/2026, chế độ YCS khách sạn — hộp thư + scheduler vẫn y như Homes; 3 mẫu + 3 mốc bật 30/09/2026).

Seven Agoda IDs (cross-check with ../listings.md): 84463574 181 Tô Hiến Thành · 84463562 15 Nước Mặn 5 · 84463560 41 Lê Hy Cát · 63382515 A La Carte 305 · 84510952 A La Carte 404 · 84463577 A La Carte 502 · 96450982 25 An Thượng 11 (went live 18/09/2026, YCS hotel mode — inbox + scheduler the same as Homes; 3 templates + 3 milestones switched on 30/09/2026).


2. Template replies — mẫu tin2. Template replies — message templates

🔴 Mẫu tin thuộc về TỪNG Hotel ID. Không dùng chung giữa các property. Cùng một nội dung vẫn phải tạo lại ở mỗi listing → 7 listing × 3 mốc = 21 mẫu. Tên trùng nhau giữa các căn là cố ý.

🔴 Message templates belong to EACH Hotel ID. They are not shared between properties. The same content still has to be created again for each listing → 7 listings × 3 milestones = 21 templates. Names that repeat across properties are deliberate.

Giới hạn: ô Name 100 ký tự · ô Message 2.500 ký tự. DOM không đặt maxlength, nên phải tự đếm.

Limits: Name field 100 characters · Message field 2,500 characters. The DOM does not set maxlength, so the count must be done by hand.

Quy ước đặt tên (user chốt 05/09/2026)Naming convention (user confirmed 05/09/2026)

Mẫu Tên Vì sao
Xác nhận đặt phòng 01 Booking confirmed nội dung giống hệt mọi căn → không gắn tên căn
Nhận phòng 03 Check-in - <tên căn> địa chỉ, mã khoá, Wi-Fi khác nhau → riêng từng căn
Trả phòng 05 Check-out - villa hoặc 05 Check-out - A La Carte chỉ hai bản, chia theo giờ trả phòng và cách khoá cửa
Template Name Why
Booking confirmation 01 Booking confirmed content identical for every property → no property name in it
Check-in 03 Check-in - <property name> address, door code and Wi-Fi differ → separate for each property
Check-out 05 Check-out - villa or 05 Check-out - A La Carte only two versions, split by check-out time and by how the door is locked

Số 01/03/05 khớp tên file trong vault/19-Harthliving-OTA/platform-status/messages/agoda/, tra ngược được. Tên viết không dấu.

The numbers 01/03/05 match the file names in vault/19-Harthliving-OTA/platform-status/messages/agoda/, so they can be traced back. Names are written without diacritics.

DOM của form mẫu tinDOM of the message template form

Thứ Selector Ghi chú
Ô tiêu đề input[name="Name"] hoặc input[placeholder*="title of your template"] 🔴 Có property không có attribute name — phải bắt kèm placeholder
Ô nội dung textarea[name="Message"] ổn định hơn
Nút khi TẠO Save / Discard
Nút khi SỬA Update / Cancel changes 🔴 tên khác hẳn — dùng nhầm là không tìm thấy nút
Update bị disabled tới khi React ghi nhận thay đổi phải poll vài nhịp, đừng bấm một lần rồi bỏ
Item Selector Notes
Title box input[name="Name"] or input[placeholder*="title of your template"] 🔴 Some properties have no name attribute — must also catch the placeholder
Body box textarea[name="Message"] more stable
Buttons when CREATING Save / Discard
Buttons when EDITING Update / Cancel changes 🔴 the names are completely different — using the wrong one means the button is not found
Update is disabled until React registers the change must poll for a few beats; do not click once and move on

3. Message scheduler — ba mốc gửi3. Message scheduler — three send points

Ba hàng, mỗi hàng một công tắc + accordion riêng. Bấm Save của chính hàng đó mới lưu.

Three rows, each with its own toggle and accordion. Only clicking the Save of that same row saves it.

Mốc Ô Select a time Lựa chọn
Upon booking confirmation không có gửi ngay khi đặt phòng được xác nhận
At check-in "Select a time before guest check-in" On the day of check-in · 1 day before · 2 days before · 3 days before
At check-out "Select a time after guest check-out" On the day of check-out · 1 day after · 2 days after · 3 days after
Milestone Select a time box Options
Upon booking confirmation none sends immediately when the booking is confirmed
At check-in "Select a time before guest check-in" On the day of check-in · 1 day before · 2 days before · 3 days before
At check-out "Select a time after guest check-out" On the day of check-out · 1 day after · 2 days after · 3 days after

🔴 Hai mốc lệch NGƯỢC CHIỀU. Check-in đếm lùi trước ngày đến, check-out đếm tiến sau ngày đi → không có cách nào gửi tin trước ngày trả phòng trên Agoda. Bản Booking gửi tin trả phòng tối hôm trước; bê nguyên mốc đó sang Agoda là chọn nhầm.

🔴 The two milestones run in OPPOSITE directions. Check-in counts back before the arrival date, check-out counts forward after the departure date → there is no way to send a message before the check-out date on Agoda. The Booking version sends the check-out message the evening before; copying that milestone across to Agoda is choosing wrongly.

Cấu hình đang dùng: booking = ngay khi xác nhận · check-in = 1 day before check-in · check-out = On the day of check-out.

Current configuration: booking = immediately on confirmation · check-in = 1 day before check-in · check-out = On the day of check-out.

Mỗi mốc chỉ gắn được MỘT mẫu tin → phải chọn: At check-out dùng cho tin dặn trả phòng hoặc tin cảm ơn sau kỳ nghỉ (1 day after check-out), không thể cả hai.

Each milestone can hold only ONE template → you must choose: At check-out is used either for the check-out reminder or for the thank-you message after the stay (1 day after check-out), not both.


4. Bẫy tự động hoá qua CDP — đã trả giá4. Automation traps via CDP — paid for

Nối Chrome đang đăng nhập qua CDP: xem scripts/ota-read-booking.mjs để lấy mẫu kết nối (đọc DevToolsActivePort, nối WebSocket, không gọi Page.enable — treo phiên trên portal OTA).

Connecting to the logged-in Chrome over CDP: see scripts/ota-read-booking.mjs for a sample connection (read DevToolsActivePort, open the WebSocket, do not call Page.enable — it hangs the session on the OTA portal).

# Bẫy Cách đúng
1 Nút là SPAN/DIV chứ không phải BUTTON → .click() trong Runtime.evaluate vô hiệu Dùng Input.dispatchMouseEvent theo toạ độ getBoundingClientRect()
2 Thiếu mouseMoved trước mousePressed → React không nhận click Luôn bắn mouseMoved → mousePressed → mouseReleased
3 input#toggle là checkbox ẩn, kích thước 0 → bấm không ăn Bấm phần tử [role=switch] hiển thị; lấy cả 3 theo thứ tự DOM: 0 booking · 1 check-in · 2 check-out
4 Gán el.value = x thẳng → React không thấy, Save gửi chuỗi rỗng Native setter: Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value').set.call(el,v) rồi dispatchEvent(new Event('input',{bubbles:true}))
5 Đếm nút Edit theo chỉ số toàn trang → bấm nhầm Trang có 6 nút tên Edit: 3 của scheduler + 3 của panel Template replies. Tệ hơn: hàng đang bung ra thì mất nút Edit của chính nó, nên số nút tụt 3→2 và mọi chỉ số lệch. Phải giới hạn tìm kiếm trong panel scheduler trước khi đếm
6 Nút dropdown ở chế độ sửa hiện giá trị đang chọn, không phải chữ Select … Regex phải nhận cả hai: /^(Select template\|0[135] )/i
7 🔴 --set-method và --set-instructions dùng CHUNG endpoint ArrivalGuide/instructions, mỗi cái ghi null/0 vào trường của cái kia (dính 23/09/2026 ở 15nuocman5) Chạy --set-method TRƯỚC, rồi --set-instructions (nó đọc method hiện tại và giữ). Kiểm giữa chừng bằng --dry: body phải có "checkInMethod":5
8 🔴 GET của Agoda bị CACHE. Ghi mô tả xong đọc lại vẫn ra bản cũ → tưởng ghi hỏng, suýt ghi lại lần hai Đọc xác minh bằng fetch(url+'?_='+Date.now(),{cache:'no-store'}). Đừng kết luận "ghi không ăn" từ một lần GET thường
9 --set-facilities nhận MẢNG PHẲNG [{facilityId,isSelected,name,from}] Bọc {"facilities":[…]} là plan.map is not a function
10 Điểm ảnh phòng ngủ / phòng tắm không đến từ nhóm Property Đến từ nhóm ROOM (categoryId 7 + roomTypeId). Khuôn 100/100 của 41lehycat: Property 15 ảnh · Room 16 ảnh với Bedroom 6–7 + Bathroom 4–5
7 Dải cảnh báo chống lừa đảo của Agoda phủ lên nút Edit của Template replies → bấm theo toạ độ rơi vào banner, form không mở (gặp ở 502, 21/09/2026; 305 và 404 cùng lúc đó lại không dính) Nút này là BUTTON thật nên .click() trong Runtime.evaluate ăn. Ưu tiên DOM .click(), chỉ rơi về chuột CDP khi DOM không mở được form. Kiểm bằng document.elementFromPoint(cx,cy): trả về DIV lạ ⇒ đang bị che
8 Nút Edit của hàng scheduler là DIV, không phải BUTTON/SPAN/A → mọi selector querySelectorAll('button,span,a') bỏ sót hoàn toàn, báo "không thấy Edit". Ngược với #7, DIV này .click() không ăn Quét bằng querySelectorAll('*') lọc innerText.trim()==='Edit', chọn phần tử cùng dòng với nhãn hàng (\|y − y_nhãn\| < 30) rồi bấm bằng chuột CDP. Phân biệt hai bộ bằng toạ độ x: scheduler ở panel trái x≈1481, Template replies ở panel phải x≈1785
# Trap Right way
1 The button is a SPAN/DIV, not a BUTTON → .click() in Runtime.evaluate has no effect Use Input.dispatchMouseEvent at the coordinates from getBoundingClientRect()
2 No mouseMoved before mousePressed → React does not register the click Always fire mouseMoved → mousePressed → mouseReleased
3 input#toggle is a hidden checkbox, size 0 → clicking does nothing Click the visible [role=switch] element; take all 3 in DOM order: 0 booking · 1 check-in · 2 check-out
4 Assigning el.value = x directly → React does not see it, and Save sends an empty string Native setter: Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value').set.call(el,v) then dispatchEvent(new Event('input',{bubbles:true}))
5 Counting Edit buttons by index across the whole page → clicks the wrong one The page has 6 buttons named Edit: 3 for the scheduler + 3 for the Template replies panel. Worse: while a row is expanded, it loses its own Edit button, so the count drops from 3 to 2 and every index shifts. Search must be limited inside the scheduler panel before counting
6 In edit mode the dropdown shows the value currently selected, not the text Select … The regex must accept both: /^(Select template\|0[135] )/i
7 🔴 --set-method and --set-instructions share the SAME endpoint ArrivalGuide/instructions, and each writes null/0 into the other's field (hit on 23/09/2026 at 15nuocman5) Run --set-method FIRST, then --set-instructions (it reads the current method and keeps it). Check in between with --dry: the body must contain "checkInMethod":5
8 🔴 Agoda's GET responses are CACHED. After writing a description, reading back still shows the old version → it looks like the write failed, nearly leading to a second write Verify with fetch(url+'?_='+Date.now(),{cache:'no-store'}). Do not conclude "the write did not take" from one ordinary GET
9 --set-facilities takes a FLAT ARRAY [{facilityId,isSelected,name,from}] Wrapping it as {"facilities":[…]} gives plan.map is not a function
10 Points for bedroom / bathroom photos do not come from the Property group They come from the ROOM group (categoryId 7 + roomTypeId). The 100/100 template of 41lehycat: Property 15 photos · Room 16 photos with Bedroom 6–7 + Bathroom 4–5
7 The Agoda safety-warning banner covers the Edit button of Template replies → clicking by coordinates lands on the banner and the form does not open (hit at 502 on 21/09/2026; 305 and 404 were not affected at the same time) This button is a real BUTTON, so .click() in Runtime.evaluate works. Prefer DOM .click(), falling back to CDP mouse only when the DOM cannot open the form. Check with document.elementFromPoint(cx,cy): if it returns an unexpected DIV, the button is covered
8 The Edit button of a scheduler row is a DIV, not BUTTON/SPAN/A → every querySelectorAll('button,span,a') selector misses it completely, reporting "Edit not found". Unlike #7, this DIV does not respond to .click() Scan with querySelectorAll('*') filtering innerText.trim()==='Edit', choose the element on the same line as the row label (\|y − y_label\| < 30), then click with CDP mouse. Tell the two sets apart by x coordinate: the scheduler in the left panel at x≈1481, Template replies in the right panel at x≈1785

Chưa thông: ghi vào một hàng scheduler đã cấu hình. Công tắc đã bật thì bấm lại không tắt được, và đường qua Edit vướng bẫy #5. Hàng chưa cấu hình thì chạy ngon (15/15 mốc ở 5 listing). → Muốn sửa hàng đã cấu hình: làm tay, hoặc viết lại phần tìm Edit giới hạn trong panel scheduler.

Not working yet: writing to a configured scheduler row. If the switch is already on, clicking again does not turn it off, and the route through Edit runs into trap #5. A row that is not configured yet works fine (15/15 milestones across 5 listings). → To change a configured row: do it by hand, or rewrite the part that finds Edit, limited to the scheduler panel.

🟢 ĐỌC hàng đã cấu hình thì thông rồi (21/09/2026). Bấm Edit của hàng (theo bẫy #8) là khung Message preview bên phải hiện tên mẫu đang gắn + toàn văn thân tin. Đây là cách rẻ nhất để xác minh một mốc đang gắn đúng mẫu nào — không phải mở form ghi, không chạm Save.

🟢 Reading a configured row works (21/09/2026). Clicking the row's Edit (per trap #8) opens a Message preview frame on the right showing the name of the template attached + the full text of the body. This is the cheapest way to confirm which template a milestone is attached to — no need to open a write form, and Save is not touched.

⚠️ scripts/ota-agoda-scheduler.mjs --probe hiện báo "không thấy mục Scheduled messages": Agoda đã đổi nhãn tab thành Message scheduler, script vẫn tìm chữ cũ. Chưa sửa.

⚠️ scripts/ota-agoda-scheduler.mjs --probe currently reports "no Scheduled messages item found": Agoda has renamed the tab to Message scheduler, and the script still searches for the old text. Not yet fixed.


5. Sự thật đã xác minh về hiển thị và nội dung5. Verified facts about display and content

🟢 Agoda GIỮ dấu xuống dòng trong mẫu tin. Đọc ngược textarea từ portal thấy đúng ký tự \n; panel Template replies hiện rõ từng khối tách dòng. Format emoji + dòng trắng hiện đúng.

🟢 Agoda KEEPS line breaks in message templates. Reading the textarea back from the portal shows the \n characters exactly; the Template replies panel clearly shows each line-broken block. Emoji formatting and blank lines display correctly.

⚠️ Khung Message preview bên phải nuốt ngắt dòng thị giác — chữ chạy liền một mạch. Đó là CSS của khung preview, không phải tin thật. Đừng kết luận format hỏng từ khung này.

⚠️ The Message preview frame on the right swallows visual line breaks — the text runs together in one line. That is the frame's CSS, not the real message. Do not conclude that the format is broken from this frame.

🔴 Agoda che dữ liệu: số thẻ · số điện thoại · email · URL → thay bằng X. Kakao ID / Zalo dạng chữ có thể lọt lưới — nhưng lọt là dính luật chống off-platform, xem ota-messaging-rules.md §4. Agoda dán sẵn câu mời khách tố cáo về safety@agoda.com trong mọi cuộc trò chuyện.

🔴 Agoda masks data: card numbers · phone numbers · emails · URLs → replaced with X. Text-form Kakao ID / Zalo may slip through the net — but slipping through still triggers the anti-off-platform rule, see ota-messaging-rules.md §4. Agoda adds a pre-written invitation to report the guest to safety@agoda.com in every conversation.

🔴 KHÔNG có placeholder. Không chèn được tên khách, không chèn được ngày → mẫu tự động là chữ chết. Cách né đang dùng: bỏ hết tên và ngày, thay bằng mốc tương đối mà chính scheduler bảo đảm (tomorrow cho tin check-in gửi trước 1 ngày, today cho tin check-out).

🔴 There are NO placeholders. You cannot insert the guest's name or a date → automatic templates are plain fixed text. The workaround in use: remove all names and dates and replace them with relative milestones that the scheduler itself guarantees (tomorrow for the check-in message sent 1 day before, today for the check-out message).

🟢 Agoda tự dịch tin sang ngôn ngữ khách khi gửi → không cần làm bản tiếng Hàn. ⚠️ Nhưng máy dịch chạy qua cả địa chỉ tiếng Việt, tên Wi-Fi và tên thương hiệu — Harth Living có chữ Living là từ có nghĩa, dễ bị dịch thành nghĩa đen. Chưa test.

🟢 Agoda auto-translates messages into the guest's language when sending → no need to write a Korean version. ⚠️ But the machine translation runs over the Vietnamese address, Wi-Fi names and brand names too — Harth Living contains the word Living, which is a real word and could be translated literally. Not yet tested.

🟢 Scheduler đọc thân mẫu SỐNG, không phải bản chụp lúc gán (xác minh 21/09/2026 trên 305). Sửa nội dung một mẫu trong Template replies là tin tự động của mốc đang gắn mẫu đó đổi theo ngay — không phải gỡ ra gắn lại. Bằng chứng: sau khi ghi đè 01 Booking confirmed, mở hàng Upon booking confirmation thì khung Message preview hiện đúng câu vừa thêm. → Hệ quả: đổi câu chữ chỉ cần chạy ota-write-agoda-templates.mjs --update, không đụng scheduler.

🟢 The scheduler reads the template body LIVE, not a snapshot taken when it was attached (verified 21/09/2026 on 305). Editing the content of a template in Template replies means the automatic message of every milestone holding that template changes at once — no need to detach and reattach. Evidence: after overwriting 01 Booking confirmed, opening the row Upon booking confirmation showed the Message preview frame with exactly the sentence just added. → Consequence: changing wording only needs ota-write-agoda-templates.mjs --update, with no need to touch the scheduler.

⏱️ Cửa sổ 14 ngày: không liên hệ được khách sau 14 ngày kể từ ngày trả phòng.

⏱️ 14-day window: the guest cannot be contacted more than 14 days after the check-out date.


6. Ba script

Script Việc Chạy
scripts/ota-write-agoda-templates.mjs tạo / đổi tên / ghi đè thân tin mẫu, đọc nội dung từ khối ```text trong vault/19-Harthliving-OTA/platform-status/messages/agoda/*.md --dry · --only <id> · --rename · --update (sửa mẫu đã có cho khớp vault; so trước khi ghi, mẫu nào đã khớp thì bỏ qua; ghi xong mở lại form đọc lại rồi mới báo xong)
scripts/ota-agoda-scheduler.mjs bật 3 mốc + gắn mẫu --probe (không lưu) · --only <id> · --force
scripts/ota-agoda-photos.mjs ảnh: đọc · tải gốc · upload · đặt ảnh chính · chuyển nhóm Property⇄Room · gán tag (thêm 16/09/2026, xem §8) --id <id> + --read · --download <dir> (chỉ đọc) · --upload plan.json · --set-main · --reassign … --to room\|property · --tag, mọi lệnh ghi có --dry
Script Task Run
scripts/ota-write-agoda-templates.mjs create / rename / overwrite the body of templates; reads the content from the ```text block in vault/19-Harthliving-OTA/platform-status/messages/agoda/*.md --dry · --only <id> · --rename · --update (edits an existing template to match the vault; compares first and skips templates already matching; after writing, reopen the form and read it back before reporting done)
scripts/ota-agoda-scheduler.mjs turn on the 3 milestones and attach the templates --probe (does not save) · --only <id> · --force
scripts/ota-agoda-photos.mjs photos: read · download originals · upload · set main photo · move group Property⇄Room · tag (added 16/09/2026, see §8) --id <id> + --read · --download <dir> (read only) · --upload plan.json · --set-main · --reassign … --to room\|property · --tag; every write command has --dry

Cả hai cần quyền Bash. Agent không tự cấp được — đưa dòng này cho user dán vào /permissions:

Both need Bash permission. The agent cannot grant it itself — pass this line to the user to paste into /permissions:

Bash(node scripts/ota-agoda-scheduler.mjs:*)

🔴 Rule không khớp vòng for của shell. for id in …; do node …; done bị chặn dù rule đã có. Phải gọi từng lệnh node trần một, mỗi listing một lượt.

🔴 The rule does not match a shell for loop. for id in …; do node …; done is blocked even though the rule exists. You must call each bare node command on its own, one run per listing.

Nội dung tin không gõ trong script — luôn đọc từ vault, để vault và portal không trôi khỏi nhau.

Message content is never typed into the script — always read from the vault, so the vault and the portal do not drift apart.


7. Còn chưa biết7. Still unknown

  • Auto reply hoạt động ra sao (khác Scheduled messages) — chưa mở.
  • ~~Mã missingPhotoGroup chưa giải nghĩa~~ → đã giải 26/09/2026, xem bảng nhóm ảnh ở §10.
  • Agoda bắn tin At check-out vào giờ nào trong ngày → ảnh hưởng câu mở đầu Today, before 11:00 AM.
  • Máy dịch xử lý địa chỉ tiếng Việt, tên Wi-Fi, tên thương hiệu ra sao.
  • Bộ lọc có bắt nhầm mã cửa 8 số (<mã cửa 8 số>) hay mật khẩu Wi-Fi toàn số thành số điện thoại không.
  • Hồ sơ YCS đã khai số điện thoại chỗ nghỉ chưa — quyết định câu "call the property number shown on your booking confirmation" có đúng không.
  • How Auto reply works (different from Scheduled messages) — not yet opened.
  • ~~The missingPhotoGroup code was not explained~~ → solved 26/09/2026, see the photo-group table in §10.
  • At what time of day does Agoda send the At check-out message? This affects the opening line Today, before 11:00 AM.
  • How the machine translation handles Vietnamese addresses, Wi-Fi names and brand names.
  • Does the filter wrongly catch an 8-digit door code (<8-digit door code>) or an all-digit Wi-Fi password as a phone number?
  • Whether the YCS profile has the property's phone number declared yet — and whether the line "call the property number shown on your booking confirmation" is correct.

8. Photos 2.0 — ảnh property và ảnh phòng (thêm 16/09/2026)8. Photos 2.0 — property photos and room photos (added 16/09/2026)

Trang portal.agoda.com/en-us/app/setting/photos/<AGODA_ID>. Toàn bộ API đọc từ bundle PhotosPage.*.js + api.*.js (theo read-wizard-copy-from-bundle-not-clicks), không cần bấm nút nào:

Page portal.agoda.com/en-us/app/setting/photos/<AGODA_ID>. All the APIs are read from the bundles PhotosPage.*.js + api.*.js (per read-wizard-copy-from-bundle-not-clicks), no button needs to be clicked:

Việc Gọi gì Ghi chú
Đọc toàn bộ ảnh GET /en-us/api/setting/<id>/Photos/GetAllPhotos mảng nhóm: categoryId 5 = Property (roomTypeId 0) · 7 = Room (roomTypeId thật). Mỗi ảnh: photoId · photoToken · pictureTypeId (6 = ảnh chính, 5 = property, 7 = room) · pictureCaptionId (0 = chưa tag) · order
Bảng tag GET …/Photos/GetPhotoCaptions 97 tag; hay dùng: 13 Exterior view · 19 Lobby · 23 Reception · 9 Entrance · 21 Swimming pool · 25 Restaurant · 5 Buffet · 22 Bar/lounge · 8 Coffee shop · 11 Fitness center · 27 Spa · 121 Massage · 125 Sauna · 154 Bedroom · 3 Bathroom · 139 Separate living room · 102 Kitchen · 1 Balcony/terrace
Upload POST …/Photos/UploadPhoto multipart CategoryId · RoomTypeId · CaptionId · Order · FormFile trả {photoId, photoToken, recStatus} — recStatus 1 = lên ngay, khác 1 = chờ duyệt. Gán CaptionId ngay lúc upload thì không dính "Missing tags"
Tag · đặt ảnh chính · chuyển nhóm POST …/Photos/UpdatePhotos {updatePhotoInfoList:[{photoId, photoToken, roomTypeId, imageType, captionId, order}]} cùng một endpoint: đổi captionId = tag · imageType 6, order 1 = ảnh chính (ảnh chính cũ phải hạ về 5) · đổi imageType 5↔7 + roomTypeId = chuyển Property⇄Room không cần tải lại (giữ nguyên gốc)
Ảnh gốc lấy uri từ API, thay s=<W>x<H> bằng width×height API trả giữ nguyên ce= (ảnh mới ce=3; ép ce=0 → CDN trả 1×1); không có s= chỉ được 2048px. Agoda ép cạnh dài ảnh upload về 2048px — bộ 6016px của 2024 là đường upload cũ
Task Call Notes
Read all photos GET /en-us/api/setting/<id>/Photos/GetAllPhotos array of groups: categoryId 5 = Property (roomTypeId 0) · 7 = Room (real roomTypeId). Each photo: photoId · photoToken · pictureTypeId (6 = main photo, 5 = property, 7 = room) · pictureCaptionId (0 = not tagged) · order
Tag table GET …/Photos/GetPhotoCaptions 97 tags; commonly used: 13 Exterior view · 19 Lobby · 23 Reception · 9 Entrance · 21 Swimming pool · 25 Restaurant · 5 Buffet · 22 Bar/lounge · 8 Coffee shop · 11 Fitness center · 27 Spa · 121 Massage · 125 Sauna · 154 Bedroom · 3 Bathroom · 139 Separate living room · 102 Kitchen · 1 Balcony/terrace
Upload POST …/Photos/UploadPhoto multipart CategoryId · RoomTypeId · CaptionId · Order · FormFile returns {photoId, photoToken, recStatus} — recStatus 1 = live immediately, any other value (not 1) = awaiting approval. Assign CaptionId at upload time and the "Missing tags" flag does not appear
Tag · set main photo · move group POST …/Photos/UpdatePhotos {updatePhotoInfoList:[{photoId, photoToken, roomTypeId, imageType, captionId, order}]} one endpoint for all: changing captionId = tag · imageType 6, order 1 = main photo (the old main photo must be lowered to 5 first) · changing imageType 5↔7 + roomTypeId = move Property⇄Room without re-uploading (original kept)
Original photo take uri from the API, replace s=<W>x<H> with the width×height the API returns keep ce= unchanged (new photos have ce=3; forcing ce=0 → the CDN returns 1×1); without s= you only get 2048px. Agoda forces the long side of an uploaded photo to 2048px — the 6016px set from 2024 is the old upload path

Bẫy đã gặp: - Ảnh chính (pictureTypeId 6) không chuyển nhóm / không xoá được khi đang là ảnh chính → đặt ảnh chính mới trước (--set-main), rồi mới --reassign. - Sau mỗi UpdatePhotos, server đánh số lại order của cả nhóm Room (1→24) theo thứ tự riêng của Agoda — order trên YCS không phải thứ tự mình đặt, đừng dùng nó làm khoá; dùng photoId. - Header chỉ có chuẩn + Request-Id/traceparent, không có CSRF → fetch() cùng origin trong tab là đủ; upload đi qua DOM.setFileInputFiles vào <input type=file> tạm do script tạo (không đụng input của app). - 🔴 Upload trả 409 "duplicate" khi file định upload trùng md5 với ảnh đang có trên listing (41LHC 17/09: 70 ảnh cũ chính là file vault) → re-encode (thumbnail 2048 + save lại) trước khi upload, rồi mới xoá bản cũ. - 🔴 Mã ảnh trên CDN = md5 của file upload, và bản ghi khoá theo md5: tải lại đúng file đã xoá thì Agoda trả cùng photoId cũ và ảnh sống lại trong danh sách (đã trả giá 16/09: agent tải lại restaurant-01 để dò lỗi, làm sống lại tấm user vừa xoá tay). Thấy ảnh biến mất → hỏi user trước, đừng tải lại để thử. - Sau upload, CDN trả ảnh 1×1 và API trả 0x0 trong ít nhất 30 phút — không phải lỗi, là xử lý bất đồng bộ. - Trang khách (agoda.com) trễ theo: ngay sau khi đổi ảnh (upload · reassign · tag hàng loạt), card tìm kiếm + gallery trang chi tiết rút xuống chỉ còn 1–2 ảnh (contentImages.hotelImages), trong khi listing khác vẫn 10. Đo 16/09: 2 ảnh lúc 16:45 → đủ 10 ảnh (trần của card) lúc 17:10, tức ~30 phút sau lần UpdatePhotos cuối. Đừng kết luận mất ảnh từ trang khách trong vòng 1 giờ sau khi sửa. Trang chi tiết còn tự chèn 4 ảnh "Nearby attraction" (providerId 999979) không phải của mình. - 🔴 GET …/Facilities/<id> bị cache trong tab: PUT xong đọc lại ngay bằng fetch() mặc định vẫn thấy giá trị cũ (16/09 tưởng lưu hỏng). Luôn fetch(url,{cache:'no-store'}) hoặc thêm ?_=Date.now() khi đọc lại sau khi ghi. - photoToken là handle của từng ảnh — không lưu vào vault (luật §9), script --read lấy lại được.

Traps already hit: - The main photo (pictureTypeId 6) cannot be moved to another group / cannot be deleted while it is the main photo → set a new main photo first (--set-main), then --reassign. - After each UpdatePhotos, the server renumbers order for the whole Room group (1→24) in Agoda's own sequence — the order on YCS is not the order you set, so do not use it as a key; use photoId. - The header carries only the standard headers + Request-Id/traceparent, no CSRF → a same-origin fetch() in the tab is enough; upload goes through DOM.setFileInputFiles into a temporary <input type=file> created by the script (the app's own input is not touched). - 🔴 Upload returns 409 "duplicate" when the file to upload has the same md5 as a photo already on the listing (41LHC on 17/09: 70 old photos were the vault files themselves) → re-encode first (thumbnail 2048 + save again) before uploading, then delete the old copy. - 🔴 The CDN image ID = md5 of the uploaded file, and the record is keyed by md5: downloading the exact file that was deleted makes Agoda return the same old photoId, and the photo comes back alive in the list (on 16/09 the agent downloaded restaurant-01 to trace a bug, which brought back a photo the user had just deleted by hand). If a photo disappears → ask the user first; do not download again to test. - After upload, the CDN returns a 1×1 image and the API returns 0x0 for at least 30 minutes — not an error, just asynchronous processing. - The guest site (agoda.com) lags behind: right after changing photos (upload · reassign · bulk tag), the search card and detail-page gallery drop to just 1–2 photos (contentImages.hotelImages), while other listings still show 10. Measured on 16/09: 2 photos at 16:45 → the full 10 photos (the card's cap) at 17:10, about 30 minutes after the last UpdatePhotos. Do not conclude photos have been lost from the guest page within 1 hour of an edit. The detail page also inserts 4 "Nearby attraction" photos (providerId 999979) that are not ours. - 🔴 GET …/Facilities/<id> is cached in the tab: after a PUT, reading back immediately with a default fetch() still shows the old value (on 16/09 it was thought the save had failed). Always use fetch(url,{cache:'no-store'}) or add ?_=Date.now() when reading back after a write. - photoToken is the handle of each photo — do not store it in the vault (rule §9); the --read script can fetch it again.

Tiêu chí ảnh lên trang khách (đo 16/09/2026 trên 305 + đối chứng 502, 41 LHC): - Gallery trang chi tiết (contentImages.hotelImages) = toàn bộ Property photos (305: 11/11) + chỉ 2 Room photos (305: 2/24 · 502: 2/24 — cùng mẫu) + 4 ảnh "Nearby attraction" Agoda tự chèn. 22 ảnh phòng còn lại không vào gallery — chỉ hiện trong card phòng khi ngày tìm còn phòng (chưa xem được vì hai ngày thử đều Sold out). - Card tìm kiếm = 10 ảnh đầu của gallery (trần 10, mọi listing đều 10). - Thứ tự: ảnh chính property (pictureTypeId 6) luôn đứng #1; từ #2 trở đi không theo order trên YCS mà theo "AI smart ordering" của Agoda (305: hồ bơi → DELI → spa → nhà hàng → buffet → bar → hồ bơi → gym → massage → hồ bơi bình minh — xen kẽ nhóm Facilities/Dining, đẩy gym/massage xuống cuối). Kéo-thả trên YCS chỉ đổi order, chưa thấy tác dụng lên trang khách. - 502 có 4 ảnh trên card không tồn tại trong YCS → là ảnh Agoda nhập từ Booking.com (đúng như chân trang YCS nói). 305 không có ảnh nhập kiểu này. - Muốn một tấm lên card: đặt vào Property photos + gắn tag; muốn nó đứng đầu: đặt làm Main photo; vị trí 2–10 không điều khiển được.

Criteria for photos going to the guest page (measured 16/09/2026 on 305, plus control 502 and 41 LHC): - Detail-page gallery (contentImages.hotelImages) = all Property photos (305: 11/11) + only 2 Room photos (305: 2/24 · 502: 2/24 — same pattern) + 4 "Nearby attraction" photos that Agoda inserts itself. The other 22 room photos do not enter the gallery — they only appear in the room card when the searched dates have rooms available (not yet checked, since both test dates were sold out). - Search card = the first 10 photos of the gallery (cap 10; every listing is 10). - Order: the property main photo (pictureTypeId 6) always stays at #1; from #2 onward the order is not the order on YCS but Agoda's "AI smart ordering" (305: pool → DELI → spa → restaurant → buffet → bar → pool → gym → massage → sunrise pool — interleaved between the Facilities and Dining groups, pushing gym and massage to the end). Dragging on YCS only changes order; no effect on the guest page has been seen yet. - 502 has 4 photos on the card that do not exist in YCS → they are photos Agoda imported from Booking.com (as the YCS footer itself says). 305 has no photos imported this way. - To get a photo onto the card: put it in Property photos and tag it; to put it first: set it as Main photo; positions 2–10 cannot be controlled.

Lần đầu áp dụng: alacarte305 16/09/2026 — hồ sơ ../properties/alacarte305/agoda.md, sổ việc L-101. Lần hai: alacarte502 17/09/2026 — ../properties/alacarte502/agoda.md: 30 ảnh (17 Property + 13 Room) tag ngay lúc upload, 3 bản sao nội thất re-encode 2048px cho md5 khác bản Room, xoá 37 ảnh cũ bằng --delete.

First applied: alacarte305 on 16/09/2026 — profile ../properties/alacarte305/agoda.md, issue log L-101. Second: alacarte502 on 17/09/2026 — ../properties/alacarte502/agoda.md: 30 photos (17 Property + 13 Room) tagged at upload; 3 interior copies re-encoded at 2048px so their md5 differs from the Room copies; 37 old photos deleted with --delete.


9. Content score (Homes) · Arrival guide · Host profile (thêm 16/09/2026)9. Content score (Homes) · Arrival guide · Host profile (added 16/09/2026)

Script: scripts/ota-agoda-content.mjs — --score · --read (chỉ đọc) · --set-times · --set-method · --set-bio (ghi, có --dry). ⚠️ Mục này là rubric Homes; property ở chế độ khách sạn (xem §10) chấm 11 mục khác. Luật chấm điểm chính thức: agoda-homes-content-score-guideline-2025.pdf (Photos 30 · Arrival guide 30 · Amenities 15 · Host 15 · Description 10; điểm refresh ≤24 h).

Script: scripts/ota-agoda-content.mjs — --score · --read (read only) · --set-times · --set-method · --set-bio (writes, with --dry). ⚠️ This section is the Homes rubric; a property in hotel mode (see §10) is scored on 11 different items. Official scoring rules: agoda-homes-content-score-guideline-2025.pdf (Photos 30 · Arrival guide 30 · Amenities 15 · Host 15 · Description 10; score refresh ≤24 h).

Việc API Ghi chú
Điểm từng mục GET /mldc/en-us/api/reporting/AnalyticsCenter/ContentScoreDetails/<id> 18 mục, isImproveNeeded + improvements[] (gợi ý chung, không phải tiện ích đã tick)
Arrival guide đọc GET /en-us/api/setting/ArrivalGuide/<id> checkInCheckoutTime · checkInDetails · directions · parking · houseRules
Giờ nhận/trả POST …/ArrivalGuide/checkincheckouttime/<id> body = khối checkInCheckoutTime giờ dạng "2:00 PM"; null hiện là "Flexible" trên UI nhưng không được tính điểm
Cách nhận phòng POST …/ArrivalGuide/instructions/<id> body = khối checkInDetails checkInMethod 1 Reception · 2 Meet and greet · 3 Key self-collection · 4 Lockbox · 5 Door code · 6 Secret key · 7 Email · 8 Other
Host profile GET /mldc/en-us/api/iam/HostProfile/ViewModel · POST …/HostProfile/SaveHostProfile cấp tài khoản (chung 6 listing); bio 20–500 ký tự, score đòi ≥100
Task API Notes
Score per item GET /mldc/en-us/api/reporting/AnalyticsCenter/ContentScoreDetails/<id> 18 items, isImproveNeeded + improvements[] (general hints, not the amenities ticked)
Read arrival guide GET /en-us/api/setting/ArrivalGuide/<id> checkInCheckoutTime · checkInDetails · directions · parking · houseRules
Check-in / check-out times POST …/ArrivalGuide/checkincheckouttime/<id> body = the checkInCheckoutTime block times in the form "2:00 PM"; null shows as "Flexible" on the UI but is not scored
Check-in method POST …/ArrivalGuide/instructions/<id> body = the checkInDetails block checkInMethod 1 Reception · 2 Meet and greet · 3 Key self-collection · 4 Lockbox · 5 Door code · 6 Secret key · 7 Email · 8 Other
Host profile GET /mldc/en-us/api/iam/HostProfile/ViewModel · POST …/HostProfile/SaveHostProfile account level (shared by the 6 listings); bio 20–500 characters, the score requires ≥100

| Mô tả property | POST /en-us/api/setting/PropertyDetails/UpdatePropertyDescription/<id> {description} | client chặn URL (/(https?:\/\/[^\s]+)/); lưu là lên ngay, không qua duyệt (đọc lại GeneralInformation thấy ngay) | | Facilities | GET/PUT /mldc/en-us/api/setting/Facilities/<id> — PUT {facilities:[{facilityId,isSelected}]} chỉ gửi dòng thay đổi | 88 mục / 8 nhóm; isSelected null = chưa khai · false = đã khai không | | Giường | POST /en-us/api/setting/RoomSettings/BedConfigurations/<id>/<roomTypeId> {bedroomConfigurations:[{productBedTypeId,numberOfBed,bedroomGroupNumber,optionId:1,productBedTypeLocalName:null}],commonRoomConfigurations:[]} | bedType 1 Single · 3 Double · 4 Queen · 5 King · 8 Sofa; trả true | | House rules · parking · directions | POST …/ArrivalGuide/houserules|parking|directions/<id> body = đúng khối trong GET | airport transfer: isOffered=true bắt buộc có feeValue (0 = miễn phí); server HTML-encode dấu ' thành &#39; trong parkingInstruction |

| Property description | POST /en-us/api/setting/PropertyDetails/UpdatePropertyDescription/<id> {description} | the client blocks URLs (/(https?:\/\/[^\s]+)/); saving publishes immediately, with no review (reading back GeneralInformation shows it at once) | | Facilities | GET/PUT /mldc/en-us/api/setting/Facilities/<id> — PUT {facilities:[{facilityId,isSelected}]} sends only the changed rows | 88 items / 8 groups; isSelected null = not declared · false = declared as absent | | Beds | POST /en-us/api/setting/RoomSettings/BedConfigurations/<id>/<roomTypeId> {bedroomConfigurations:[{productBedTypeId,numberOfBed,bedroomGroupNumber,optionId:1,productBedTypeLocalName:null}],commonRoomConfigurations:[]} | bedType 1 Single · 3 Double · 4 Queen · 5 King · 8 Sofa; returns true | | House rules · parking · directions | POST …/ArrivalGuide/houserules|parking|directions/<id> body = the exact block from the GET | airport transfer: isOffered=true requires a feeValue (0 = free); the server HTML-encodes ' as &#39; in parkingInstruction |

| Occupancy phòng | GET /en-us/api/setting/ChildRate/getroombypropertyId/<id> · POST …/ChildRate/setuproomoccupancy/<id> {setAdultChild:true, rooms:[{roomTypeId, adultSettings:[{baseOccupancy, guestAllowed, maxAdult, maxChildren}], extraBedSettings:[{numberOfExtraBed, numberOfBabyCot}]}]} | 🔴 Toàn null = Agoda bán mặc định 2 người lớn dù Rooms khai max 4 (305 mất mọi khách 3–4 người tới 16/09). Sau POST, rate plan tự sinh occupancyRate {1..n} cùng giá; trang UI childrenrateocc lỗi với property Homes, chỉ API chạy; GET đọc lại vẫn null một lúc — tin response POST + GetRate.occupancyRate | | Mô tả trên trang khách | contentDetail.contentInformation.description.short (GraphQL agoda.com) | Agoda tự sinh "About us" từ dữ liệu tiện ích, không đăng mô tả partner (đo 16/09 trước và sau khi đổi mô tả). Mô tả partner chỉ còn ý nghĩa cho Content Score / app; sai tiện ích (vd Free parking) sẽ lộ ngay ở đoạn tự sinh |

| Room occupancy | GET /en-us/api/setting/ChildRate/getroombypropertyId/<id> · POST …/ChildRate/setuproomoccupancy/<id> {setAdultChild:true, rooms:[{roomTypeId, adultSettings:[{baseOccupancy, guestAllowed, maxAdult, maxChildren}], extraBedSettings:[{numberOfExtraBed, numberOfBabyCot}]}]} | 🔴 All null = Agoda sells the default 2 adults, even though Rooms declares a max of 4 (305 lost every guest of 3–4 people until 16/09). After the POST, the rate plan automatically generates occupancyRate {1..n} with the same price; the UI page childrenrateocc errors for Homes properties, only the API works; a GET read back still shows null for a while — trust the POST response + GetRate.occupancyRate | | Description on the guest page | contentDetail.contentInformation.description.short (agoda.com GraphQL) | Agoda generates an "About us" from the amenity data itself; it does not publish the partner description (measured 16/09, before and after changing the description). The partner description now matters only for the Content Score / app; a wrong amenity (e.g. Free parking) will show immediately in the auto-generated paragraph |

| Booking settings | GET /en-us/api/supply-pricing-metadata/BookingSettings/GetViewModel/<id> · POST …/UpdateBookingSettings/<id> body = {bookTypeId:{isDirty,value,oldValue}, cancellationPolicyId:{…}, ratePlanSetting:{isDirty,value:[{ratePlanId,maxAdvPurchase,minAdvPurchase,minNightsStay,maxNightsStay}],oldValue:[…]}, dateBasedStayConditions:{…}} | -1 = No limit / không giới hạn; không bọc bookingSettingUpdateModel (400 "RatePlanSetting field is required") | | Local recommendations | GET/POST …/ArrivalGuide/thingsnearby/<id> {thingsNearby} | | | Room spec (diện tích · số WC) | POST /en-us/api/setting/RoomSettings/RoomSpecifications/<id>/<rt> body = {maxOccupancy:{isDirty,value,oldValue}, isChildrenAllowed:{…}, maxAllowedFreeChildren:{…}, noOfBathroom:{…}, sizeOfRoom:{…}, externalRoomTypeCode:{…}} (cùng mẫu dirty của BookingSettings; đọc từ bundle RoomSetupBasicDetailsPage + useSaveRoomSpecifications 17/09) | --set-room-spec "<rt>:size=50,bathrooms=1"; trả true; GET đọc lại thấy ngay | | Địa chỉ ngôn ngữ khác | trong PUT PropertyLocation: localizedStreetAddresses:[{productAddressId:0, languageId, streetName}] | ALL_LANGUAGE: 24 = Tiếng Việt; server trả về kèm productAddressId thật |

| Booking settings | GET /en-us/api/supply-pricing-metadata/BookingSettings/GetViewModel/<id> · POST …/UpdateBookingSettings/<id> body = {bookTypeId:{isDirty,value,oldValue}, cancellationPolicyId:{…}, ratePlanSetting:{isDirty,value:[{ratePlanId,maxAdvPurchase,minAdvPurchase,minNightsStay,maxNightsStay}],oldValue:[…]}, dateBasedStayConditions:{…}} | -1 = No limit; do not wrap it in bookingSettingUpdateModel (400 "RatePlanSetting field is required") | | Local recommendations | GET/POST …/ArrivalGuide/thingsnearby/<id> {thingsNearby} | | | Room spec (area · number of toilets) | POST /en-us/api/setting/RoomSettings/RoomSpecifications/<id>/<rt> body = {maxOccupancy:{isDirty,value,oldValue}, isChildrenAllowed:{…}, maxAllowedFreeChildren:{…}, noOfBathroom:{…}, sizeOfRoom:{…}, externalRoomTypeCode:{…}} (same dirty-flag pattern as BookingSettings; read from the bundle RoomSetupBasicDetailsPage + useSaveRoomSpecifications on 17/09) | --set-room-spec "<rt>:size=50,bathrooms=1"; returns true; a GET read back shows the change immediately | | Address in another language | in PUT PropertyLocation: localizedStreetAddresses:[{productAddressId:0, languageId, streetName}] | ALL_LANGUAGE: 24 = Vietnamese; the server returns the real productAddressId |

  • 🔴 Nhãn trên trang khách lấy từ taxonomy KHÁCH SẠN, cùng id với toggle Homes: Keyless access (272) hiện thành "Check-in [24-hour]"; Gym (57) hiện "Fitness center — Free" (không có cờ paid — FacilityProperties: []). Bật toggle Homes là chấp nhận nhãn khách sạn tương ứng. Đối chiếu id ở kipp …/usefulinformation → propertyFacilitiesApi/GetViewModel.

  • 🔴 Ô bio Host profile là React controlled — native setter + dispatch input KHÔNG ăn (ô về 0/500 ngay). Phải Input.insertText qua CDP sau khi focus() (gõ như người). Bảng SET_VAL ở §4 chỉ đúng với form Template replies.

  • 🔴 Labels on the guest page come from the HOTEL taxonomy, with the same IDs as the Homes toggles: Keyless access (272) shows as "Check-in [24-hour]"; Gym (57) shows "Fitness center — Free" (with no paid flag — FacilityProperties: []). Switching on a Homes toggle means accepting the matching hotel label. Cross-check the IDs at kipp …/usefulinformation → propertyFacilitiesApi/GetViewModel.

  • 🔴 The Host profile bio box is a React controlled field — the native setter plus a dispatched input event does NOT work (the box goes to 0/500 at once). You must use Input.insertText over CDP after focus() (type like a person). The SET_VAL table in §4 is correct only for the Template replies form.

| Đổi tên listing | POST …/PropertyDetails/UpdatePropertyName/<id> {propertyName, propertyLocalName} | lưu ngay, propertyLanguageName tự bằng tên mới; luật đặt tên Agoda cấm ngoặc/khuyến mãi — user tự chịu | | Check-in instructions | POST …/ArrivalGuide/instructions/<id> body = khối checkInDetails (giữ checkInMethod) | ≥25 ký tự; Directions không hiện cho khách, muốn khách đọc điều kiện thì viết vào instructions/tên |

| Rename listing | POST …/PropertyDetails/UpdatePropertyName/<id> {propertyName, propertyLocalName} | saved immediately; propertyLanguageName takes the new name automatically; Agoda's naming rules ban brackets and promotions — the user takes the risk | | Check-in instructions | POST …/ArrivalGuide/instructions/<id> body = the checkInDetails block (keep checkInMethod) | ≥25 characters; Directions are not shown to guests — to have guests read a condition, write it into the instructions or the name |

  • 🔴 Airport transfer trên Homes chỉ có 3 ô Có/Phí/Phút, không có ô điều kiện → bật là Agoda tự viết "Free airport transfer" + FAQ "Yes" + đoạn AI cho MỌI booking. Điều kiện phải gài ở tên listing + check-in instructions + mẫu tin (305, 16/09).
  • 🔴 Airport transfer on Homes has only 3 boxes — Yes / Fee / Minutes, with no condition box → switching it on makes Agoda write "Free airport transfer", an FAQ answer "Yes", and an AI paragraph for EVERY booking. Conditions must be built into the listing name, the check-in instructions and the message templates (305, 16/09).

Luật chấm cần nhớ (đọc lại PDF 17/09): Check-out Time: Specify the check-out from and check-out until time or indicate if it is flexible → chỉ khai checkOutUntil là 0/4 (305 vẫn 0/4 sau khi 91/100). 502 khai cả checkOutFrom = 6:00 AM + checkOutUntil = 12:00 PM (user chốt 17/09) — chờ refresh để xác nhận. Ảnh bedroom/bathroom ở nhóm Room vẫn được tính (305 lên 4/4 + 4/4 chỉ với tag ở Room).

Scoring rule to remember (PDF re-read 17/09): Check-out Time: Specify the check-out from and check-out until time or indicate if it is flexible → declaring only checkOutUntil gives 0/4 (305 stayed at 0/4 even after reaching 91/100). 502 declares both checkOutFrom = 6:00 AM and checkOutUntil = 12:00 PM (user confirmed 17/09) — waiting for a refresh to confirm. Bedroom and bathroom photos in the Room group still count (305 rose to 4/4 + 4/4 with tags in the Room group alone).

Bẫy 17/09 (502): PUT Facilities trả 200 nhưng GET no-store ngay sau vẫn null cả 88 — PUT lại lần hai → 88/88 khớp. Chưa rõ do xử lý bất đồng bộ hay lần đầu không ăn; luôn đọc lại và so từng dòng với plan trước khi báo xong. Lặp lại ở 404 (23:10): lần 1 chỉ 59/88 ăn (29 dòng nhóm Guest favorites còn null), PUT lại → 88/88. Coi như quy tắc: PUT hai lần, đọc lại giữa hai lần. Cùng ngày: setuproomoccupancy đặt maxAllowedFreeChildren về 0 (305 16/09, 404 17/09) → muốn giữ 1 phải chạy --set-room-spec "<rt>:children_free=1" SAU occupancy. Cùng ngày: 502 đang Non-refundable (13308) chứ không phải 949 như 305 — đừng suy chính sách từ căn này sang căn khác, đọc GetViewModel trước khi hỏi user.

Trap of 17/09 (502): PUT Facilities returned 200, but a no-store GET right after still showed null for all 88 — a second PUT → 88/88 matched. Not yet clear whether it is asynchronous processing or the first write simply did not take; always read back and compare line by line with the plan before reporting done. Repeated on 404 (23:10): pass 1 only took 59/88 (29 rows of the Guest favorites group still null); PUT again → 88/88. Treat it as a rule: PUT twice, read back in between. Same day: setuproomoccupancy sets maxAllowedFreeChildren to 0 (305 on 16/09, 404 on 17/09) → to keep 1, run --set-room-spec "<rt>:children_free=1" AFTER occupancy. Same day: 502 is on Non-refundable (13308), not 949 like 305 — do not infer a policy from one property to another; read GetViewModel before asking the user.

Mục "Add more photos of your property facilities" (2 điểm, 18/09): Agoda dò từng tiện ích đã tick Yes xem có ảnh gắn đúng caption tag hay chưa và liệt kê tên tiện ích thiếu trong improvements[] (41LHC: Bathtub · Dryer; 181: Dryer). Tag Bathroom (3) KHÔNG đếm cho Bathtub — phải là Bathtub (136); ảnh máy giặt tag Washing machine (144) không đếm cho Dryer — cần thêm ảnh tag Clothes dryer (137) dù máy sấy xếp ngay trên máy giặt trong cùng khung. Cách vá rẻ nhất: đổi tag bản Property của ảnh WC có bồn (nhóm Room vẫn giữ đủ Bathroom = số WC) và upload thêm một bản ảnh giặt là re-encode (md5 khác, tránh 409) tag 137. Bảng tag đầy đủ: GET …/Photos/GetPhotoCaptions (Private pool 138 · Sauna 125 · Swimming pool 21 · Garden 38 · Fitness center 11 · Hot tub 17 · Parking lot 166).

The "Add more photos of your property facilities" item (2 points, 18/09): Agoda checks each amenity ticked Yes to see whether it has a photo carrying the matching caption tag, and lists the names of missing amenities in improvements[] (41LHC: Bathtub · Dryer; 181: Dryer). The Bathroom tag (3) does NOT count for Bathtub — it must be Bathtub (136); a washing-machine photo tagged Washing machine (144) does not count for Dryer — a photo tagged Clothes dryer (137) is needed, even though the dryer sits right next to the washing machine in the same frame. The cheapest fix: change the tag in the Property group of the WC photo with a bathtub (the Room group still keeps a Bathroom, which equals the number of WCs), and upload one more re-encoded laundry photo (different md5, to avoid a 409) tagged 137. Full tag table: GET …/Photos/GetPhotoCaptions (Private pool 138 · Sauna 125 · Swimming pool 21 · Garden 38 · Fitness center 11 · Hot tub 17 · Parking lot 166).

Bẫy đã trả giá 16/09: - 🔴 SaveHostProfile đòi số điện thoại đã xác minh OTP — handler Submit của form kiểm phoneVerified && phoneNumber trước khi gửi; gọi API thẳng khi chưa có SĐT → 500 "Failed to save host profile". Agent không xác minh OTP được → user làm tay (Host profile → Edit → Phone → Verify). - photoUrlString phải rỗng/null hoặc /avatar/<64hex>_<32hex>.jpg — gửi lại URL pix6.agoda.net cũ là 400 regex; form gốc gửi null khi không đổi ảnh. - userProfileType chỉ nhận 1 (Individual) / 2 (Company) / null.

Traps paid for on 16/09: - 🔴 SaveHostProfile requires a phone number verified by OTP — the Submit handler of the form checks phoneVerified && phoneNumber before sending; calling the API directly without a phone number → 500 "Failed to save host profile". The agent cannot complete OTP verification → the user does it by hand (Host profile → Edit → Phone → Verify). - photoUrlString must be empty/null or /avatar/<64hex>_<32hex>.jpg — sending back the old pix6.agoda.net URL returns 400 regex; the original form sends null when the photo is unchanged. - userProfileType accepts only 1 (Individual) / 2 (Company) / null.



10. Property ở chế độ YCS KHÁCH SẠN (không phải Homes) — thêm 19/09/202610. Hotel-mode YCS property (not Homes) — added 19/09/2026

Nhận biết: GET /mldc/en-us/api/layout/<id>/PrivateLayout/Main → MenuViewModel.IsNonHotelAccommodation = false (Homes = true). Dấu hiệu trên UI: star rating có giá trị (5) · menu Rate plans · Room mapping · Cancellation policies · Children Rate and Occupancy · trang Facilities hiện 440 mục / 16 nhóm (Guest favorites 15 · Things to do 47 · Dining 60 · … · Languages 44 · Payment 63) thay vì 88 toggle / 8 nhóm · không có Host profile card. isNhaEnabled trong GeneralInformation và isNhaProperty trong ArrivalGuide vẫn true — không tin hai cờ đó. Lần đầu gặp: 25anthuong11 96450982, sinh ra từ List my property → Fast-track import (URL Booking) 18/09/2026 — wizard không có bước chọn Hotel/Homes; 5 căn tạo trước đó đều là Homes. Không có toggle/API đổi loại hình → xin support (L-120).

How to recognise it: GET /mldc/en-us/api/layout/<id>/PrivateLayout/Main → MenuViewModel.IsNonHotelAccommodation = false (Homes = true). Signs in the UI: a star rating has a value (5) · the menu Rate plans · Room mapping · Cancellation policies · Children Rate and Occupancy · the Facilities page shows 440 items / 16 groups (Guest favorites 15 · Things to do 47 · Dining 60 · … · Languages 44 · Payment 63) instead of 88 toggles / 8 groups · no Host profile card. The isNhaEnabled flag in GeneralInformation and isNhaProperty in ArrivalGuide are still true — do not trust those two flags. First seen: 25anthuong11 96450982, created by List my property → Fast-track import (Booking URL) on 18/09/2026 — the wizard has no Hotel/Homes step; the 5 properties created earlier were all Homes. No toggle or API changes the property type → ask support (L-120).

Rubric content score bản khách sạn = 11 mục (CMS id đọc từ bundle ContentScorePage.*.js, chữ lấy bằng POST /mldc/en-us/api/reporting/Cms/MultiGet body {languageCode:'en-us',origin:'VN',ids:[…]}):

Hotel-mode content score rubric = 11 items (CMS ids read from the bundle ContentScorePage.*.js; text fetched with POST /mldc/en-us/api/reporting/Cms/MultiGet, body {languageCode:'en-us',origin:'VN',ids:[…]}):

CMS Mục Trang sửa
522393 · 522394 Add more photos of your property · high-resolution Photos (API Photos 2.0 như §8 — dùng chung cả hai chế độ)
522395 Add more photos of your property facilities Photos — tag khớp facility đã Yes (Parking lot 166 ↔ Car park · Kitchen 102 · Washing machine 144)
522396 · 522397 · 522398 photos of your rooms · high-res · photos of your room amenities Photos nhóm Room (Bedroom 154 · Bathroom 3 · Balcony 1 · Kitchen 102)
522399 · 522400 essential / additional property facilities and services /en-us/kipp/app/settings/propertysetting/propertyservices/<id> — API vẫn là GET/PUT /mldc/…/Facilities/<id> (440 dòng, PUT {facilities:[{facilityId,isSelected}]})
522401 Add room amenities Rooms (kipp) → POST /en-us/<id>/kipp/api/roomtype/UpdateRoomType
522402 Update your star rating chỉ qua chat Agoda (#chat) — import đã gán 5
522403 guest age policy /en-us/app/setting/childrenrateocc/<id> — 4 POST ChildRate/setup*
CMS Item Where to edit
522393 · 522394 Add more photos of your property · high-resolution Photos (Photos 2.0 API as in §8 — shared by both modes)
522395 Add more photos of your property facilities Photos — tag matching a facility marked Yes (Parking lot 166 ↔ Car park · Kitchen 102 · Washing machine 144)
522396 · 522397 · 522398 photos of your rooms · high-res · photos of your room amenities Photos in the Room group (Bedroom 154 · Bathroom 3 · Balcony 1 · Kitchen 102)
522399 · 522400 essential / additional property facilities and services /en-us/kipp/app/settings/propertysetting/propertyservices/<id> — the API is still GET/PUT /mldc/…/Facilities/<id> (440 rows, PUT {facilities:[{facilityId,isSelected}]})
522401 Add room amenities Rooms (kipp) → POST /en-us/<id>/kipp/api/roomtype/UpdateRoomType
522402 Update your star rating only through Agoda chat (#chat) — the import already set it to 5
522403 guest age policy /en-us/app/setting/childrenrateocc/<id> — 4 POSTs ChildRate/setup*

Nhóm ảnh missingPhotoGroup — giải 26/09/2026 từ bảng ks trong bundle es.*.js của trang Photos (không bấm thử; kiểm chứng bằng chính API: gắn tag xong, số nhóm tụt ngay trong GetAllPhotos):

The missingPhotoGroup photo groups — solved 26/09/2026 from the ks table in the es.*.js bundle of the Photos page (not tested by clicking; verified through the API itself: after tagging, the number of groups drops immediately in GetAllPhotos):

Nhóm Caption id thuộc nhóm Nghĩa Mục content score dò nó
1 8 Coffee shop · 25 Restaurant · 165 Restaurant (private room) Nhà hàng 522395 (nếu tick tiện ích nhóm Dining)
2 5 Buffet · 104 Food and beverages Ăn uống 522395
3 21 Swimming pool · 122 Pool [outdoor] · 138 Private pool Hồ bơi 522395
4 27 Spa · 32 Beauty salon · 119 Hot spring bath · 121 Massage · 125 Sauna Spa 522395
5 11 Fitness center · 153 Gym/fitness Gym 522395
6 36 Kid's club · 37 Playground · 142 Pool [kids] · 151 Kids areas Trẻ em 522395
7 24 Recreational facilities · 40 · 41 · 101 · 103 · 105 · 112 · 113 · 114 · 118 · 124 · 126 · 131–135 · 147 · 149 "Things to do" 522395 — improvementKeyId 7 = đúng nhóm này
8 3 Bathroom Phòng tắm (Room) 522398 room amenities
9 110 Bed Giường (Room) 522398
10 29 View Tầm nhìn (Room) 522398
Group Caption ids in the group Meaning Content-score item that checks it
1 8 Coffee shop · 25 Restaurant · 165 Restaurant (private room) Restaurant 522395 (if the Dining group amenity is ticked)
2 5 Buffet · 104 Food and beverages Food & drink 522395
3 21 Swimming pool · 122 Pool [outdoor] · 138 Private pool Pool 522395
4 27 Spa · 32 Beauty salon · 119 Hot spring bath · 121 Massage · 125 Sauna Spa 522395
5 11 Fitness center · 153 Gym/fitness Gym 522395
6 36 Kid's club · 37 Playground · 142 Pool [kids] · 151 Kids areas Kids 522395
7 24 Recreational facilities · 40 · 41 · 101 · 103 · 105 · 112 · 113 · 114 · 118 · 124 · 126 · 131–135 · 147 · 149 "Things to do" 522395 — improvementKeyId 7 = exactly this group
8 3 Bathroom Bathroom (Room) 522398 room amenities
9 110 Bed Bed (Room) 522398
10 29 View View (Room) 522398

⇒ Mục 522395 bản khách sạn đòi ảnh theo nhóm tiện ích đã tick (tick Karaoke/Massage chair thuộc nhóm facility Things to do → cần ≥1 ảnh Property mang caption nhóm 7, vd 24 Recreational facilities). Mục 522398 đòi Room có đủ nhóm 8 · 9 · 10 — tag Bedroom (154) không thay được Bed (110). missingPhotoGroup liệt kê cả nhóm của tiện ích không tick (25AT11 thiếu [1..7] nhưng improvements[] chỉ nêu Things to do) — suy ra chỉ nhóm khớp tiện ích đã tick mới bị chấm; xác nhận khi điểm refresh. Lần đầu áp dụng: 25AT11 26/09 (97 → chờ refresh).

⇒ The 522395 item for the hotel version requires photos according to the amenity groups ticked (ticking Karaoke or Massage chair belongs to the facility group Things to do → needs at least 1 Property photo carrying the group 7 caption, e.g. 24 Recreational facilities). The 522398 item requires a Room with groups 8 · 9 · 10 — the tag Bedroom (154) does not replace Bed (110). missingPhotoGroup lists groups for amenities that are not ticked too (25AT11 is missing [1..7], but improvements[] names only Things to do) — so it is inferred that only groups matching ticked amenities are scored; to be confirmed when the score refreshes. First applied: 25AT11 on 26/09 (97 → awaiting refresh).

Bộ Homes (522415–522432: 18 mục — ảnh 6 · amenities 2 · mô tả · host 3 · arrival guide 6) không áp cho property hotel; nhưng Arrival guide-book/mô tả vẫn ghi được bằng API §9 và nên làm sẵn để đổi loại hình không phải làm lại.

The Homes set (522415–522432: 18 items — photos 6 · amenities 2 · description · host 3 · arrival guide 6) does not apply to hotel properties; however, the arrival guide-book and description can still be written via the API in §9, and it is worth preparing them now so that changing the property type does not mean redoing them.

API kipp (đọc từ cdn5.agoda.net/ycs/dist/22-*.js + 184-*.js): - Room: GET /en-us/<id>/kipp/api/roomtype/GetRoomType?roomTypeId=<rt> → Data.Room (Facilities = {Access,Accessibility,Bath,Clothing,Comfort,Dining,Entertainment,Layout,Safety,Others:[id]} · IsChildrenAllowed · NoOfBathroom · SizeOfRoom · ViewId · RoomBedConfigs). Bảng id→tên: …/roomtype/getRoomTypeMasterData (Facilities 10 nhóm · HotelViews · BedTypes). Ghi: POST …/roomtype/UpdateRoomType body = đúng object Room + hotelId, language:'en-us', RoomTypeId (builder c=function(e,t,n,l,…) trong bundle 22). Script: scripts/ota-agoda-room-amenities.mjs --read / --apply plan.json [--dry], tự đọc lại so từng nhóm. Hằng số: nonSmoking 15 · bathtub 37 · smokingAllowed 281. Server bỏ qua MaxAdultsOccupancy/MaxChildrenOccupancy (null), NoOfBedroom tự tính từ bed config. - Property facilities kipp: GET …/kipp/api/propertyFacilitiesApi/GetViewModel?facilityGroupIds= · POST …/UpsertHotelFacilities — không cần, PUT /mldc/…/Facilities ăn cả 440 (19/09: lần 1 khớp 440/440). - Age policy (mldc ChildRate, Content-Type: application/json-patch+json, body thường): setupagepolicy {minimumAgeAllowed:0, childRateEnabled:true, childAgeRange:[{ageFrom:0, ageTo:2, recStatus:1, needExtraBed:false}]} → trả childAgeRanges[].hotelChildAgeRangeId · setupuniversalrate {mode:1, ageRanges:[{ageRangeId, stayRate:{value:0, type:4}, breakFast:{}}]} (pricingType 1 Flat · 2 Discount adult · 3 % adult · 4 Free · 5 Not provided) · setupextrabed {isExtraBedEnabled:false, ageRequireExtraBed:null, ageRanges:[], isChannelManager:false} · setuproomoccupancy như §9 · setupfacilities (child facilities, tuỳ chọn). Đọc lại: childviewmodel (ageRange, hotelOccupancy.childRateModeId) + trang wizard hiện Active. Bed config vẫn ghi qua mldc BedConfigurations (chạy được ở hotel-mode).

kipp API (read from cdn5.agoda.net/ycs/dist/22-*.js + 184-*.js): - Room: GET /en-us/<id>/kipp/api/roomtype/GetRoomType?roomTypeId=<rt> → Data.Room (Facilities = {Access,Accessibility,Bath,Clothing,Comfort,Dining,Entertainment,Layout,Safety,Others:[id]} · IsChildrenAllowed · NoOfBathroom · SizeOfRoom · ViewId · RoomBedConfigs). ID-to-name table: …/roomtype/getRoomTypeMasterData (Facilities 10 groups · HotelViews · BedTypes). Write: POST …/roomtype/UpdateRoomType body = exactly the Room object + hotelId, language:'en-us', RoomTypeId (builder c=function(e,t,n,l,…) in bundle 22). Script: scripts/ota-agoda-room-amenities.mjs --read / --apply plan.json [--dry]; it reads back automatically and compares group by group. Constants: nonSmoking 15 · bathtub 37 · smokingAllowed 281. The server ignores MaxAdultsOccupancy/MaxChildrenOccupancy (null); NoOfBedroom is calculated automatically from the bed config. - Property facilities kipp: GET …/kipp/api/propertyFacilitiesApi/GetViewModel?facilityGroupIds= · POST …/UpsertHotelFacilities — not needed; PUT /mldc/…/Facilities takes all 440 (19/09: pass 1 matched 440/440). - Age policy (mldc ChildRate, Content-Type: application/json-patch+json, normal body): setupagepolicy {minimumAgeAllowed:0, childRateEnabled:true, childAgeRange:[{ageFrom:0, ageTo:2, recStatus:1, needExtraBed:false}]} → returns childAgeRanges[].hotelChildAgeRangeId · setupuniversalrate {mode:1, ageRanges:[{ageRangeId, stayRate:{value:0, type:4}, breakFast:{}}]} (pricingType 1 Flat · 2 Discount adult · 3 % adult · 4 Free · 5 Not provided) · setupextrabed {isExtraBedEnabled:false, ageRequireExtraBed:null, ageRanges:[], isChannelManager:false} · setuproomoccupancy as in §9 · setupfacilities (child facilities, optional). Read back: childviewmodel (ageRange, hotelOccupancy.childRateModeId) + the wizard page shows Active. Bed config is still written via mldc BedConfigurations (it works in hotel mode).

Bẫy 19/09: - 🔴 Ảnh dọc 2:3 (2000×3000 hay 1365×2048) bị Agoda ép về cao 1536 → rộng 1023, dưới ngưỡng 1024×768 của mục high-resolution. Resize dọc về đúng 1030×1536 (cắt 9 px) trước khi upload thì Agoda giữ nguyên (181 qua với 1030×1536). - Ghi hai lần lặp lại: UpdateRoomType lần 1 chỉ ăn IsChildrenAllowed, amenities ăn lần 2; UpdatePropertyDescription lần 1 đọc lại 0 ký tự, lần 2 ăn. Luôn đọc lại no-store so plan. - ContentScoreDetails trả 204 cho listing mới (cả 404 hôm 17/09) — không phải lỗi, chờ ≤24 h; trang Analytics hiện "No content score data at the moment". - Tab CDP: chrome-grab mở/đổi tab nên script tự viết phải chọn tab theo URL (TAB=childrenrateocc), không lấy tab portal.agoda.com đầu tiên.

Trap of 19/09: - 🔴 Portrait photos at 2:3 (2000×3000 or 1365×2048) are forced by Agoda to a height of 1536 → width 1023, below the 1024×768 threshold of the high-resolution item. Resizing portrait photos to exactly 1030×1536 (cropping 9 px) before upload makes Agoda keep them (181 passed with 1030×1536). - Two-pass writes repeat: UpdateRoomType on pass 1 only took IsChildrenAllowed, and the amenities took on pass 2; UpdatePropertyDescription on pass 1 read back 0 characters, and on pass 2 it took. Always read back with no-store and compare with the plan. - ContentScoreDetails returns 204 for a new listing (404 too, on 17/09) — not an error; wait ≤24 h. The Analytics page shows "No content score data at the moment". - CDP tab: chrome-grab opens and switches tabs, so a script written by hand must pick the tab by URL (TAB=childrenrateocc), not take the first portal.agoda.com tab.

Liên quan: Agoda — cơ chế đã hiểu · Cẩm nang set up listing Agoda · issues.md L-15 · Luật tin nhắn OTA · Luật chỉ đọc OTA

Related: Agoda — mechanics understood · Agoda listing set-up playbook · issues.md L-15 · OTA messaging rules · OTA read-only rule

NguồnSource: guide-book/platforms/agoda-ycs-automation.md

Tài liệu kỹ thuật khácOther technical documents