We are correcting a small data type inconsistency in the API with an update that will be live on December 7, 2020. On the /paymentterm endpoint we were serving the discount_percent as a casted integer value even though it is stored as a decimal in the database. The API Reference will be updated at the same time the update goes live.
One of the more subtle, and often overlooked aspects of discounts and fees is how they are distributed. In LOCATE line level discounts/fees are calculated at the unit level (meaning the amount of the discount or fee is subject to the qty on the line as a multiplier). While order level discounts/fees are a flat amount. Line level fees have a rather granular level of control when it comes to representing how an order is being modified with discounts/fees. However, some eCommerce platforms offer even more flexibility, such as the ability to have an order level discount/fee that only applies to specific products on the order, or perhaps only a portion of the discount might apply to one line while a larger portion might apply to a second line. These subtle features create problems when LOCATE doesn’t have this data as it means when orders are partially shipped or partial returns are issued LOCATE and the eCommerce platform might not agree on exactly how much of an order level discount/fee to apply to an invoice or return order.
Shopify recently added discount details to their API allowing developers this level of insight in how their own discounts are being applied across an order. In our endless pursuit of ever more accurate data we are making a similar enhancement to LOCATE. We have added a new service_id field to the cfgtransactionlinediscountlinkage and cfgtransactionlinefeelinkage tables that we will begin using in the next few weeks. LOCATE’s Shopify integration will be updated to pull in this discount metadata and store exactly how Shopify distributes its discounts in these tables referencing the service as the source/creator of the distribution.
On top of this, LOCATE itself will be updated to pre-distribute order level discounts/fees at order issuance using the same linkage tables. Our distributions will not store a value in this new service_id field. So rather than trying to mirror the math of how order level discounts/fees are distributed over order lines, you will have the exact figures stored in an easy to access relational table. LOCATE’s code base will be updated to use these pre-determined discount/fee distributions throughout the order life cycle in an effort to provide more transparency, clarity, and ease when working with discounts/fees in reports. We will provide additional updates as these changes are released and data starts flowing into these tables.
These linkage tables are currently used to bridge the distribution of discounts/fees from order to invoice. This functionality will not change, but we will be adding additional records about pre-distribution from the order to the order. If you have any reports that presume that all data in the linkage table is for invoices these will need to be updated.
Last night we deployed a fix for a bug that was reported in the advanced filtering feature of the LOCATE API. When submitting an ISO 8601 value with a timezone offset for a filter LOCATE was ignoring the timezone offset causing the base date/time to be interpretted in UTC without the offset. For example:
filter=issue_date >= “2020-12-04T00:00:00-08:00”
Was being interpreted as:
filter=issue_date >= “2020-12-04T00:00:00”
Timezone offsets are now properly accounted for should you choose to submit them. All dates/times submitted are presumed to be in UTC or a representation relative to UTC so keep that in mind when translating what a user requests to the LOCATE API.
LOCATE launched just under three years ago and during that time we have made tremendous strides in bringing new and innovative features to the inventory space. All of this functionality has largely been hidden in plain sight as daily users of LOCATE have been interacting with the LOCATE API this entire time. Millions of API calls a week are processed by LOCATE as users go about their daily activities in the LOCATE web and mobile applications. We’ve had limited documentation on how you can harness this power for your own business until now. This site will serve as our way of communicating about key development changes in LOCATE as well as teach you how to leverage the LOCATE API in some common use cases.