Skip to main content
Solved

Setting up a code via. API

  • June 13, 2023
  • 1 reply
  • 24 views

Christiannoerbjerg
Expert Problem Solver II
Forum|alt.badge.img+15

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
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • 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