API Reference

@frontend-sdk/justuno - v0.24.2

Interfaces

Functions

useJustuno

Const useJustuno(juAccountNumber): void

Parameters

NameType
juAccountNumberstring

Returns

void


useJustunoConversions

useJustunoConversions(): JustunoConversionActions

Returns

JustunoConversionActions

Interface: Cart

Properties

currency

Optional Readonly currency: string


shipping

Optional Readonly shipping: number


subtotal

Optional Readonly subtotal: number


tax

Optional Readonly tax: number


total

Readonly total: number

Interface: CartItem

Properties

color

Optional Readonly color: string


name

Optional Readonly name: string


price

Optional Readonly price: number


productid

Readonly productid: string


quantity

Readonly quantity: number


size

Optional Readonly size: string


sku

Optional Readonly sku: string


variationid

Optional Readonly variationid: string

Interface: JustunoConversionActions

Properties

addCartItem

Readonly addCartItem: (cartItem: CartItem) => void

Type declaration

▸ (cartItem): void

Add a cart item to the cart.

Parameters
NameType
cartItemCartItem
Returns

void


addCustomData

Readonly addCustomData: (key: string, value: string) => void

Type declaration

▸ (key, value): void

Add arbitrary custom data to the JustUno context that can be used to
customize promotions.

Parameters
NameType
keystring
valuestring
Returns

void


trackConversion

Readonly trackConversion: (orderId: string, order: Cart, orderItems: CartItem[]) => void

Type declaration

▸ (orderId, order, orderItems): void

Given a cart and all of the cart items, performs all of the conversion
calls for all items.

Parameters
NameType
orderIdstring
orderCart
orderItemsCartItem[]
Returns

void


trackOrder

Readonly trackOrder: (orderId: string, order: Cart) => void

Type declaration

▸ (orderId, order): void

Track a conversion for the specified orderId and order.

Parameters
NameType
orderIdstring
orderCart
Returns

void


trackOrderItem

Readonly trackOrderItem: (orderItem: CartItem) => void

Type declaration

▸ (orderItem): void

Track a conversion for the specified orderItem.

Parameters
NameType
orderItemCartItem
Returns

void


updateCart

Readonly updateCart: (cart: Cart) => void

Type declaration

▸ (cart): void

Update cart information.

Parameters
NameType
cartCart
Returns

void


updateCartItems

Readonly updateCartItems: (cartItems: CartItem[]) => void

Type declaration

▸ (cartItems): void

Update all of the items in the cart.

Parameters
NameType
cartItemsCartItem[]
Returns

void


Did this page help you?