Back

Tech Corner: New Incremental

Twitter Facebook Linked In Paper Plan

Written by Josh Hutter

Welcome to the latest edition of FMTC’s Tech Corner. Today we are diving into a new implementation of an old API parameter: the “incremental” parameter. As you transition from the v2 deal feed endpoints to the new and improved v3, it’s imperative to adjust your approach to using the incremental parameter. Let’s explore its revamped functionality and what you can expect with this new parameter. 

Purpose

Originally, the incremental parameter was designed to make deal calls smaller and more efficient. With FMTC continually adding more merchants and deals, the need for swift delivery of deal information to subscribers became more apparent. Thus, the incremental parameter was added to supply only new or changed deals between calls so affiliates were getting the most recent information. With the introduction of the new v3 API, FMTC aims to provide enhanced flexibility in providing deal information. 

Usage Guidelines

Previously, the incremental parameter operated as a Boolean parameter that you turned on and off. When off, you received your full call of deals with no filtering. With it on, you receive all the deals that have been changed or updated since the last call that you made. 

In our latest v3 API, the incremental parameter is no longer a Boolean; it now accepts a numerical value. This number represents the time elapsed since the previous call. For example, setting this value to 60 will retrieve all changes made within the past 60 minutes from the time of the call. This enhancement addresses the intermittent issues encountered when making an API call. 

FMTC recommends making a full call every two hours while making incremental calls every 30 minutes. This will allow you to keep up with the frequent changes while keeping your calls small. While you should set it up to run every 30 minutes, automated processes are not guaranteed to run every 30 minutes, which could lead to the possibility of missing an update. Fortunately, the incremental parameter empowers you to dictate the frequency of updates since your last call. FMTC recommends buffering your incremental parameter to ensure comprehensive system updates within the specified timeframe, in which case you can double the time and look for all changes in the last 60 minutes to ensure that you are always getting the deal changes you are expecting. 

v2 Deal Feed Legacy Usage

Full Call

Incremental Call

Once any call has been made, the incremental call will check to see when the last call was made, regardless if the previous call was full or incremental, and capture all the changes that have occurred since that instance. Once this call is made, you won’t be able to retrieve those changes again unless you initiate another full call, as the incremental call will have synchronized with the most recent one. The primary limitation is having only one opportunity to capture changes, necessitating a full call to access them again.

v3 Deal Feed Usage

Full Call

Incremental Call

Unlike the v2 legacy system, the above call is not linked to the previous one. Instead, it retrieves changes that have occurred within the last 30 minutes. This approach allows you to capture updates efficiently and keep your calls smaller, limiting the need to make a full call. FMTC recommends that you still make a full call every two hours while making incremental calls every 30 minutes. 

What Constitutes a Deal Change?

Understanding deal changes is important to leveraging the incremental parameter effectively. Primarily, when a field such as a label or category changes, the deal will be updated and passed through the incremental parameter. Additionally, several other actions will trigger a deal change and allow the deal to come through the incremental parameter (even if one of the fields hasn’t changed): 

  • Activation or deletion of a merchant
  • Addition or removal of a deal-associated merchant by an affiliate
  • Exclusion of a deal by a user (the status will be returned as “deleted”)
  • Transition of a deal from a future status to an active status

As always, a dedicated team is here to assist you! If you have any questions or concerns, feel free to contact your account manager or email us at [email protected]. Curious about other FMTC technologies? Find more information on FMTC’s tools in Tech Corner:

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts