Commercify anything: Our latest post shows how to innovate with your checkout... using Pokémon!

Product

Expanding possibilities with our new Tags API.

April 19, 2023 Daniel Oh

Most developers are familiar with “tagging” or “labeling” resources in order to organize and filter objects. These tags are often used by developers as anchors for custom logic and processes — for instance, tagging certain products by “season” so that product assortments can be automatically swapped in and out of stores after certain dates.

That’s why we’re very excited to announce our new Tags API. The Tags API allows our developer community to apply tags to a wide range of resources within Commerce Layer — such as SKUs, customers, orders, and much more — effectively expanding the extensibility of our entire platform.

How our Tags API works

Most ecommerce platforms offer some level of tagging, usually as a field appended onto their product object. Some ecommerce platforms extend that by including “tag” fields onto other objects, like customers and orders. We decided to take a step further and create tags as another resource through our Tags API, which makes things easier for developers in three major ways:

  • Instead of having to individually add a tag onto a resource, the Tags API can programmatically apply tags to resources based on certain criteria.
  • Since the tag isn’t an actual part of the resource, it can easily be appended to most of our other resources.
  • Because they’re a separate endpoint, they also have webhooks that notify when a tag is appended or removed, which can be used to trigger all sorts of custom logic.

Tags is another example of our API’s unique extensibility. Our core model is to enable commerce, no matter what shape or form it takes. We wanted to avoid limiting(1) tags, especially since they can be very useful in building out custom logic or applications. Like any healthy relationship, we craft endpoints and objects that can be connected without being codependent to each other. We’ve extended that same perspective to tags. Having tags operate as a separate resource instead of a hardcoded field, developers are free to append any kind of logic they can craft on top of our resources.

(1) We do have a limit of 10 tags appended onto a specific resource in order to maintain performance of our API.

What you can do with tags

As we stated before, tags can be used for a wide breadth of use cases. You can use them to keep your resources organized and easy to find, or you can use them to address some sophisticated use cases like:

  • Automated merchandising
    Swapping out seasonal assortments doesn’t have to be a manual publish/unpublish process. SKUs can be tagged with whichever assortment it belongs to, which can then notify the CMS to swap out product content whenever the assortment is set to change.
  • Implementing specialized fulfillment flows
    Let’s say an apparel brand wants to reward customers who make big orders, like any order over $500 USD. The Tags API can append a special tag to that order flow, which can then trigger custom logic on the 3PL side via webhook. The 3PL’s custom logic can then take that tagged order and ensure it includes a secret gift or a specialized insert to show the brand’s appreciation for the customer’s business.
  • Personalized experiences
    Tags can also supplement your personalization efforts by applying them to customers based on criteria. Let’s take that same apparel brand, where the Tags API will tag any customer who demonstrates a history of purchasing certain SKUs (a woman who loves dresses for instance). The tag can then tell the CMS to present a special home page whenever that customer logs into their account (like a specialized dress-centric home page with relevant promotions for our dress-loving customer).

In future blog posts, we’ll explore how tags can underpin some really cool and impactful ways to extend our API (like building a loyalty program from scratch using our Tags API — stay tuned for that!).

Start playing around with our Tags API

We highly encourage you to play around with our Tags API in our staging environment, and see how it can help underpin some key business logic or create automation that makes everyone’s lives easier.If you have any feedback or if you’d simply like to share a cool use case you’ve accomplished with our Tags API, join the conversation on our Slack channel!

Get a free live demo.

Get a personalized demo and learn more about what Commerce Layer can do for your company.