หน้านี้จะอธิบายวิธีแก้ปัญหาที่เกี่ยวข้องกับ API ย่อยของโปรโมชัน
สร้างโปรโมชัน
เมื่อใช้คำขอ accounts.promotions.insert เพื่อแทรกโปรโมชัน โปรดตรวจสอบว่าคุณได้ใส่ช่องที่ต้องกรอกทั้งหมดในเนื้อหาคำขอแล้ว ต้องใส่ข้อมูลในช่องต่อไปนี้
promotion.promotionIdpromotion.contentLanguagepromotion.redemptionChannelpromotion.targetCountrypromotion.attributes.longTitlepromotion.attributes.promotionEffectiveTimePeriod.startTimepromotion.attributes.promotionEffectiveTimePeriod.endTimepromotion.attributes.promotionDestinationspromotion.attributes.couponValueTypepromotion.attributes.offerTypepromotion.attributes.productApplicabilitypromotion.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 ของแหล่งข้อมูลโปรโมชันที่คุณใช้อยู่
ดูข้อมูลเพิ่มเติม
- ดูข้อมูลเกี่ยวกับนโยบายสำหรับโปรโมชัน
- ดูข้อมูลเกี่ยวกับแนวทางปฏิบัติแนะนำสำหรับโปรโมชัน