The ''profile'' object

Within any Zephyr context, the profile object contains a number of useful pieces of data about the current user.

Here is a sample profile object:

{
  "id" : "4d915c32cc0c1adbb141b547" ,
  "email" : "example@example.com" ,
  "lists" : [ "List A" , "List B"] ,
  "lists_signup" : { "List A" : 1302864589 , "List B" : 1302164760} ,
  "vars" : { "name" : "Joe Smith" , "gender" : "M"} ,
  "signup_time" : 1302164760 ,
  "open_time" : 1311284816 ,
  "click_time" : 1311521398 ,
  "purchase_time" : 1309366347 ,
  "purchases" : [
    { "id" : "4e0b584b6763d9eb550002e3" ,
      "items" : [ { "qty" : 1 ,
                    "title" : "Rectangle Earrings Gold " ,
                    "price" : 2520 ,
                    "id" : "10081-0020" ,
                    "url" : "http://example.com/sale/132/product/1917/" ,
                    "tags" : [ "jewelry" , "gold" , "earrings"] ,
                    "vars" : { "supplier_name" : "Melissa Smith Design"}
                   } ,
                   { "qty" : 1 ,
                     "title" : "Flower Set Steel" ,
                     "price" : 2360 ,
                     "id" : "10081-0032" ,
                     "url" : "http://example.com/sale/132/product/1951/" ,
                     "tags" : [ "jewelry" , "stainless-steel" ] ,
                     "vars" : { "supplier_name" : "Melissa Smith Design"}}
                ] ,
       "price" : 4880 ,
       "qty" : 2 ,
       "time" : 1309366347}
   ] ,
   "purchase_incomplete" : {
       "id" : "4e2af8356763d95a5e000b6d" ,
       "items" : [ {
            "qty" : 1 ,
            "title" : "4 Lattice Kitchen Towels " ,
            "price" : 1400 ,
            "id" : "10027-0035" ,
            "url" : "http://example.com/sale/570/product/4363/" ,
            "tags" : [ "kitchen" , "towels"] ,
            "vars" : { "supplier_name" : "Acme Group"}
        }] ,
        "price" : 1400 ,
        "qty" : 1 ,
        "time" : 1311438901
   }
}

Here is what each of the fields mean:

Field Type Description
id string Unique identifier for this particular user
email string Email address of this user – also part of the global scope as {email}}
lists array List of the natural lists that this user belongs to
lists_signup object The signup times for each particular list
vars object Vars set on this particular user – vars are also part of the global context scope
signup_time integer UNIX timestamp of the earliest list signup time of this user
open_time integer UNIX timestamp of the most recent time the user last opened a message
click_time integer UNIX timestamp of the most recent time the user clicked a message
purchase_time integer UNIX timestamp of the most recent purchase by the user
purchases array List of completed purchases of the user
purchase_incomplete object The current contents of the user's shopping cart
 
/var/www/docs.sailthru.com/htdocs/data/pages/syntax/profile.txt · Last modified: 2011/07/25 19:58 by Ian White
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki