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.
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.
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 your efforts, 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. You should not show coupons with past expiry dates on your website/app even if we are yet to send a 'suspended' status for them.
- If you are going to upload your own offers apart from the ones sent by LinkMyDeals, make sure you keep a separate column in your database to mark them as such. This way you will be able to differentiate them so you can avoid deleting them by mistake while processing full feeds.