หน้านี้อธิบายวิธีแก้ปัญหาที่เกี่ยวข้องกับ Promotions sub-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 ของแหล่งข้อมูลโปรโมชันที่คุณใช้
ดูข้อมูลเพิ่มเติม
- ดูข้อมูลเกี่ยวกับนโยบายสำหรับ โปรโมชัน
- ดูข้อมูลเกี่ยวกับแนวทางปฏิบัติแนะนำสำหรับ โปรโมชัน