How To Use Webhooks (HTTP Client)

This Justuno support article will cover how to submit setup Justuno webhooks

At a glance:
Introduction
General feature overview
Using the JSON editor
Changing the type for a dynamic property

Introduction



Webhooks are one way that Justuno can send automated messages or information to other apps.  You can configure what to send and when to send it and in what format.

General Feature Overview



Supports the following HTTP methods:
GET, POST, PUT, PATCH, and DELETE

Supports the following content-type for HTTP body:
json, form url encoded, and form data

Send Justuno profile properties dynamically in HTTP body
Justuno profile properties can be passed with dynamic names, e.g. if we have a profile property named sms, then the client can send it over as any name. Client isn't tied to our naming conventions for profile properties, as in client can move around the dynamic properties as they please
 
Send static headers and values
Headers are key/value pairs and are usually used for authentication.

Send static values in HTTP body
JSON editor helps visualize the payload for requests set up. Add static values here and move around dynamic variables here as you like.

Using the JSON Editor



The JSON editor is a representation of the HTTP body to be sent, regardless of the content-type selected.
When you are moving around dynamic variables i.e. properties wrapped in double curly braces for example {{email}}, be sure to NOT wrap it in quotes. This will cause our parser to fail.

Note: do not rename the dynamic variable. This will cause our parser to fail


Changing the type for a dynamic property



We support the ability for most dynamic profile property to be sent as these following JSON data types when format is defined.
boolean
number
string
For dynamic properties that are checkboxes or multi select, each element in the array will be converted to a specified type from above.
 If format is used with a data type not in the supported JSON data types, then the dynamic profile property value will be passed as a string
 If the dynamic property fails to convert, then it will fallback to being passed as the zero value of that type.
boolean
false
number
0.0
string
empty string or ""
If a format type is not defined, then it property is sent over as it's respective property type.
Here is a table for that breakdown
Profile Property Types
JSON Type Sent
boolean
boolean
date
string
datetime
string
short text
string
long text
string
radio
string
single select
string
checkboxes
array of strings
multi select
array of strings
number
number
currency
number
json
object
You can change the type of dynamic property by adding specific text for the property in the JSON Editor.
Example, you have a property that is an input field named numberOfSneakersOwned that is stored as a string.
When you add this property, the JSON editor will add a line like below
{
"numberOfSneakersOwned": {{numbersOfSneakersOwned}}
}
To change the type to a number, add [format='number'] like below
{
"numberOfSneakersOwned": {{numbersOfSneakersOwned[format='number']}}
}

Here is a list of our current formatting options you can use with variables in our webhooks:

{{numbersOfSneakersOwned[format='number']}}

{{numbersOfSneakersOwned[format='string']}}

{{someProperty[format='boolean']}}

{{sms[format='right,10']}}

{{zip[format='left,3']}}

Limitations of changing types with format listed below... 

Note: NO format type support for cart items dynamic variables and default JSON profile properties which are currently...

  • product_id
  • variation_id
  • sku
  • price
  • ip_organization
  • ip_coordinates
  • device_tech