หน้านี้จะอธิบายวิธีแก้ปัญหาที่เกี่ยวข้องกับ Merchant Promotions API
สร้างโปรโมชัน
เมื่อใช้คําขอ accounts.promotions.insert
เพื่อแทรกโปรโมชัน โปรดตรวจสอบว่าคุณได้ระบุฟิลด์ที่จําเป็นทั้งหมดในเนื้อหาคําขอแล้ว ต้องกรอกข้อมูลในช่องต่อไปนี้
promotion.promotionId
promotion.contentLanguage
promotion.redemptionChannel
promotion.targetCountry
promotion.attributes.longTitle
promotion.attributes.promotionEffectiveTimePeriod.startTime
promotion.attributes.promotionEffectiveTimePeriod.endTime
promotion.attributes.promotionDestinations
promotion.attributes.couponValueType
promotion.attributes.offerType
promotion.attributes.productApplicability
promotion.attributes.promotionUrl
ระยะเวลาที่โปรโมชันมีผลใช้งานไม่ถูกต้อง
หากระบุวันที่มีผลของโปรโมชันที่ไม่ถูกต้องในคำขอ accounts.promotions.insert
คุณจะเห็นข้อความแสดงข้อผิดพลาดต่อไปนี้
Invalid value at 'promotion.attributes.promotion_effective_time_period.start_time'
หากต้องการแก้ไขข้อผิดพลาดนี้ ให้ตรวจสอบว่าค่าที่ระบุสำหรับช่อง promotionDisplayTimePeriod.startTime
เหมือนกันหรืออยู่ก่อนค่าที่ระบุสำหรับช่อง promotionEffectiveTimePeriod.startTime
นอกจากนี้ ให้ตรวจสอบว่าค่าที่ระบุสำหรับช่อง promotionDisplayTimePeriod.endTime
นั้นเหมือนกันหรือมาก่อนค่าที่ระบุสำหรับช่อง promotionEffectiveTimePeriod.endTime
ค่าสำหรับช่อง startTime
และ endTime
ต้องอยู่ในรูปแบบ RFC3339 UTC นั่นคือ yyyy-mm-ddThh:mm:ssZ
เช่น 2024-08-15T18:20:20Z
ไม่ได้ระบุจำนวนการซื้อขั้นต่ำ
หาก attributes.couponValueType
เป็น BUY_M_GET_N_PERCENT_OFF
หรือ BUY_M_GET_N_MONEY_OFF
คุณต้องระบุค่าสำหรับช่อง attributes.minimumPurchaseQuantity
ในคำขอ accounts.promotions.insert
หากไม่ได้ระบุค่าสำหรับฟิลด์ attributes.minimumPurchaseQuantity
ในคำขอ accounts.promotions.insert
คุณจะเห็นข้อความแสดงข้อผิดพลาดต่อไปนี้
[minimumPurchaseQuantity] Missing benefit or restriction attributes for its type
หากต้องการแก้ไขข้อผิดพลาดนี้ ให้ตรวจสอบว่าคุณได้ระบุค่าสำหรับช่อง minimumPurchaseQuantity
ในคำขอ
ไม่ได้ระบุจำนวนเงินส่วนลด
หากค่าของช่อง attributes.couponValueType
คือ MONEY_OFF
คุณต้องระบุค่าสำหรับช่อง attributes.moneyOffAmount
ในคำขอ accounts.promotions.insert
หากไม่ได้ระบุค่าสำหรับช่อง attributes.moneyOffAmount
ในคำขอ accounts.promotions.insert
คุณจะเห็นข้อความแสดงข้อผิดพลาดต่อไปนี้
[moneyOffAmount] Missing benefit or restriction attributes for its type
หากต้องการแก้ไขข้อผิดพลาดนี้ ให้ตรวจสอบว่าคุณได้ระบุค่าสำหรับช่อง attributes.moneyOffAmount
ในคำขอ จำนวนเงินต้องเป็นไมโคร
ไม่ได้ระบุรายละเอียดของขวัญฟรี
หากค่าของช่อง attributes.couponValueType
คือ FREE_GIFT
คุณต้องระบุค่าสำหรับช่อง attributes.freeGiftDescription
ในคำขอ accounts.promotions.insert
หากไม่ได้ระบุค่าสำหรับช่อง attributes.freeGiftDescription
ในคำขอ accounts.promotions.insert
คุณจะเห็นข้อความแสดงข้อผิดพลาดต่อไปนี้
[freeGiftDescription] Missing benefit or restriction attributes for its type
หากต้องการแก้ไขข้อผิดพลาดนี้ ให้ตรวจสอบว่าคุณได้ระบุค่าสำหรับช่อง attributes.freeGiftDescription
ในคำขอ
โปรโมชันในร้านไม่รองรับการจัดส่งฟรี
หากค่าของช่อง redemptionChannel
คือ IN_STORE
และค่าของช่อง attributes.couponValueType
คือ FREE_SHIPPING_STANDARD
, FREE_SHIPPING_OVERNIGHT
หรือ FREE_SHIPPING_TWO_DAY
คุณจะเห็นข้อความแสดงข้อผิดพลาดต่อไปนี้
[shippingServiceNames] Free shipping types are not supported for local promotions
หากต้องการแก้ไขข้อผิดพลาดนี้ ให้ตรวจสอบว่าค่าของช่อง redemptionChannel
นั้นคือ ONLINE
ไม่ได้ระบุช่องทางการแลกสิทธิ์
หากไม่ได้ระบุค่าของช่อง redemptionChannel
ในคําขอ accounts.promotions.insert
คุณจะเห็นข้อความแสดงข้อผิดพลาดต่อไปนี้
[redemptionChannel] Required parameter: redemptionChannel
หากต้องการแก้ไขข้อผิดพลาดนี้ ให้ตรวจสอบว่าคุณได้ระบุค่าสำหรับช่อง redemptionChannel
ในคำขอ
ฟิลด์ contentLanguage
ของโปรโมชันและแหล่งข้อมูลไม่ตรงกัน
หากค่าของฟิลด์ contentLanguage
ไม่เหมือนกับค่าของฟิลด์ contentLanguage
ของแหล่งข้อมูลโปรโมชันที่ใช้ในคําขอ accounts.promotions.insert
คุณจะเห็นข้อความแสดงข้อผิดพลาดต่อไปนี้
[promotion] Could not find the proper data target for the provided feedLabel and contentLanguage
หากต้องการแก้ไขข้อผิดพลาดนี้ ให้ตรวจสอบว่าค่าของช่อง contentLanguage
เหมือนกับค่าของช่อง contentLanguage
ของแหล่งข้อมูลโปรโมชันที่คุณใช้
นอกจากนี้ คุณจะเห็นข้อผิดพลาดนี้ด้วยหากค่าของ targetCountry
ไม่เหมือนกับค่าของฟิลด์ targetCountry
ของแหล่งข้อมูลโปรโมชันที่คุณใช้
ดูข้อมูลเพิ่มเติม
- ดูข้อมูลเกี่ยวกับนโยบายโปรโมชัน
- ดูข้อมูลเกี่ยวกับแนวทางปฏิบัติแนะนำสำหรับโปรโมชัน