Skip to main content
Christiannoerbjerg
Expert Problem Solver II
2025 Champion
June 13, 2023
Solved

Setting up a code via. API

  • June 13, 2023
  • 1 reply
  • 42 views

Hi Klaviyo support.

Is it possible to make a code that can show the difference, that a subscriber needs to add to their card to get free delivery.

So, if the target is 499 dkk for free delivery, and their cart value is 350 dkk, the difference will be seen as 149 kr, that needs to be added to cart to get the free delivery opportunity.

    Best answer by Brian Turcotte

    Hi @Christiannoerbjerg!

    This may be possible with a custom integration, although there is no API endpoint that specifically gathers the value of a cart as its primary function. 

     

    There may be potential workarounds, but they will likely require extensive development efforts. For example, it’s possible to pass the total value of items in a cart with the Started Checkout metric. See our developer docs here for an example of how this would appear:

     

    So theoretically, you could gather this monetary value from the Started Checkout metric using the Get Events API endpoint:


    Then, you would have to create some logic on your side to figure out the differential.

     

    If you decide to go this route and feel that you could use some extra development help, you’re always welcome to reach out to one of our wonderful Official Klaviyo Partners.

     

    I hope this helps!

     

    Best,

    Brian

    1 reply

    Brian Turcotte
    Klaviyo Alum
    June 13, 2023

    Hi @Christiannoerbjerg!

    This may be possible with a custom integration, although there is no API endpoint that specifically gathers the value of a cart as its primary function. 

     

    There may be potential workarounds, but they will likely require extensive development efforts. For example, it’s possible to pass the total value of items in a cart with the Started Checkout metric. See our developer docs here for an example of how this would appear:

     

    So theoretically, you could gather this monetary value from the Started Checkout metric using the Get Events API endpoint:


    Then, you would have to create some logic on your side to figure out the differential.

     

    If you decide to go this route and feel that you could use some extra development help, you’re always welcome to reach out to one of our wonderful Official Klaviyo Partners.

     

    I hope this helps!

     

    Best,

    Brian