Try out Talon.One in 5 minutes

Make your first API requests and see how our Integration and Management API's work together to enable powerful campaign logic & reporting.

Creating a Customer Profile

The central entity of Talon.One is your customer, represented by a Customer Profile. These profiles are modified using the updateCustomerProfile API operation. Click the send button to try it out:

Create profile with ID 12ec189h
curl -X PUT https://demo.talon.one/v1/customer_profiles/12ec189h \
    -H 'Content-Signature: signer=10; signature=4a43230b7138dd1cd94cb3f0946c3406' \
    -d '{
      "attributes": {
        "Name": "Carlton Banks",
        "Email": "carltonb@gmail.com"
      }
    }'

The response contains the profile, as well as a session and event. We'll get to sessions soon, for now we're only interested in verifying that profile.attributes contains the data we just sent:

Please click "Send" to see the response data

If we repeat this operation with the same profile ID, new attributes will be merged:

Update profile 12ec189h
curl -X PUT https://demo.talon.one/v1/customer_profiles/12ec189h \
    -H 'Content-Signature: signer=10; signature=12a7c345bb0d5bf4bd8f038b2b86f47b' \
    -d '{
      "attributes": {
        "Email": "carltonb@hushmail.com"
      }
    }'

Please click "Send" to see the response data

Creating a customer session

Simply storing and updating a profile is not particularly impressive, where Talon.One starts to get more interesting is "Customer Sessions". You can think of these as a more generalized version of an orders in an e-commerce system. Any customer can have multiple sessions going at once, and these sessions can accumulate cart items and discounts.

Let's say Carlton has just added an item to an empty basket, we start a new session like so:

Create a customer session for order 6300314f
curl -X PUT https://demo.talon.one/v1/customer_sessions/6300314f \
    -H 'Content-Signature: signer=10; signature=b47fab7864298f6d189bb69ef02d62f9' \
    -d '{
      "profileId": "12ec189h",
      "cartItems": [
        {
          "name": "Cashmere sweater made with premium NZ wool",
          "sku": "k-1536",
          "category": "Mens Sweaters",
          "price": 147.99,
          "quantity": 3,
          "attributes": {
            "Color": "Buttercream",
            "Size": "Large"
          }
        }
      ],
      "total": 443.97
    }'

We can see that the response contains both information about the current session, and details about the profile we created earlier.

Please click "Send" to see the response data