We supply coupons from over 2000+ Online Stores in India, to your awesome Website or Mobile App. So of course, we want this process to be absolutely smooth and easy. For the customers with WordPress Themes like CouponPress, Clipper, CouponXL, etc. we've already built ready-to-use plugins to upload our feeds. But even if you have built a custom Website or a Mobile App, we've made the developement pretty simple for you. Here's how you should do it.
Processing Full Feeds
Full Feeds are feeds that contain ALL offers that are currently active. To process the Full Feeds, create a script with following steps :
- Upload the Full Feeds from LinkMyDeals into a temporary staging table in your database.
- For each Coupon ID from LinkMyDeals, do the following
- If the Coupon ID does not exists in your database, add this as a new Coupon.
- If the Coupon ID exists in your database, update the offer details with the ones freshly sent by LinkMyDeals.
- Once all Coupon IDs in the latest Full Feed are processed, delete all older Coupons from your database that are not present in the latest feed.
Processing Incremental Feeds
Incremental Feeds are feeds that contain ONLY those offers that were added, modified, or suspended since your last extract. To process the Incremental Feeds, create a script with following steps :
- Upload the Incremental Feeds from LinkMyDeals into a temporary staging table in your database.
- For each Coupon ID from LinkMyDeals, check the "status" of the coupon
- If the status is "New", add this as a new Coupon into your database.
- If the status is "Updated", update all offer details into your database.
- If the status is "Suspended", delete this offer from your database.
Best Practices & Common Mistakes
We provide full help and guidance during the developement of such bulk coupon upload functionality. But over time, we have noticed some common mistakes. To save our time and yours, we have made a list of best practices to follow and common developement mistakes to avoid. Take a look before you start developing the integration.
- All Offers at LinkMyDeals have a unique ID. We usually call it lmd_id. Always store this value in your database. It is required to compare the coupons while uploading the feeds.
- Suspended coupons are those coupons that have become inactive before their expected expiry date. Do not confuse it with expired coupons. Deletion of coupons on their date of expiry must be handled by your system.
- If you are going to upload your own offers apart from the ones sent by LinkMyDeals, then keep a separate column in your database to mark them as such. This way you can avoid deleting them by mistake while processing full feeds.