Join Free
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: What is ... ?

  1. #1

    What is ... ?

    PHP Code:
     "facets": {
          
    "daysToSale": [
             {
                
    "count"1989,
                
    "value""0",
                
    "extendedFieldValue""0"
             
    },
             [...]
          ], 
    OK, I understand that 'count' is for number of sale, so what is the 'value' for ?

  2. #2
    The value is the number of days. So, you can see in that case that 1989 sales went through the same day the person clicked on the product. You can change that value to 7 for example to get back the number of products that sold one week after the initial click.

  3. #3
    Wait, does that mean if I make the time range between now and a month ago, that you only show products that sold a month after first click? Or is that date range different to the 1 or 7 day example you mentioned?

  4. #4
    Quote Originally Posted by Prosperent Brian View Post
    The value is the number of days. So, you can see in that case that 1989 sales went through the same day the person clicked on the product. You can change that value to 7 for example to get back the number of products that sold one week after the initial click.
    Brian,
    Could you please elaborate this array for me. The commission range for this array is 1-day (20120310,20120310)
    PHP Code:
    Array
    (
        [
    0] => Array
            (
                [
    count] => 11
                
    [value] => 0
                
    [extendedFieldValue] => 0
            
    )

        [
    1] => Array
            (
                [
    count] => 3
                
    [value] => 2
                
    [extendedFieldValue] => 2
            
    )

        [
    2] => Array
            (
                [
    count] => 2
                
    [value] => 1
                
    [extendedFieldValue] => 1
            
    )

        [
    3] => Array
            (
                [
    count] => 1
                
    [value] => 17
                
    [extendedFieldValue] => 17
            
    )

        [
    4] => Array
            (
                [
    count] => 1
                
    [value] => 64
                
    [extendedFieldValue] => 64
            
    )

        [
    5] => Array
            (
                [
    count] => 1
                
    [value] => 10
                
    [extendedFieldValue] => 10
            
    )

        [
    6] => Array
            (
                [
    count] => 1
                
    [value] => 8
                
    [extendedFieldValue] => 8
            
    )


    I want to get the total number sale for this 'range', do I add up all the 'count' to get the total ? From the above array, I added up all the count and I get the total of 20sales . Does that mean 20sales went through on (2012-03-10) ? I am sorry, I am alittle slow today

  5. #5
    There is node "totalRecordsFound": 213. Check the raw response http://api.prosperent.com/api/trends...20310,20120310

    The totalRecordsFound node will represent the total number of sales found against your query.

  6. #6
    Quote Originally Posted by AcidRaZor View Post
    Wait, does that mean if I make the time range between now and a month ago, that you only show products that sold a month after first click? Or is that date range different to the 1 or 7 day example you mentioned?
    It simply means that you are only getting the number of days data for sales that took place in that date range.

  7. #7
    Here is my test script .
    PHP Code:
        $prosperentApi = new Prosperent_Api(array(
            
    'commissionDateRange' => 20120310,20120310,
        ));

        
    $prosperentApi->set_filterBrand('nike');
        
    //fetch the result
        
    $prosperentApi->fetchTrends();
        foreach (
    $prosperentApi->getFacets('daysToSale') as $row)
        {
            
    $data[]=$row;

        }

        echo 
    "<pre>"print_r($data); echo "</pre>"
    And I get this data

    PHP Code:
    Array
    (
        [
    0] => Array
            (
                [
    count] => 11
                
    [value] => 0
                
    [extendedFieldValue] => 0
            
    )

        [
    1] => Array
            (
                [
    count] => 3
                
    [value] => 2
                
    [extendedFieldValue] => 2
            
    )

        [
    2] => Array
            (
                [
    count] => 2
                
    [value] => 1
                
    [extendedFieldValue] => 1
            
    )

        [
    3] => Array
            (
                [
    count] => 1
                
    [value] => 17
                
    [extendedFieldValue] => 17
            
    )

        [
    4] => Array
            (
                [
    count] => 1
                
    [value] => 64
                
    [extendedFieldValue] => 64
            
    )

        [
    5] => Array
            (
                [
    count] => 1
                
    [value] => 10
                
    [extendedFieldValue] => 10
            
    )

        [
    6] => Array
            (
                [
    count] => 1
                
    [value] => 8
                
    [extendedFieldValue] => 8
            
    )


    I still don't get what the data is telling me ???? For example, what is the total sale of [nike] in this date range [20120310,20120310] from the data above ??
    Last edited by 700; 03-15-2012 at 02:05 PM.

  8. #8
    It's not telling you the total number of sales. It's telling you that for that date range, there were 11 nike branded sales where the click and sale were on the same day. There were 3 nike branded sales where there was a two day gap between the initial click and the sale. There were 2 nike branded sales with 1 day between the click and sale, there was 1 nike branded sale where there was 17 days from the initial click to the final sale, and so on.

    Total nike brand sales for that day can be had by adding the values in the count field.

    The data is telling you the number of days between the initial click and the final sale. You can use that for a variety of planning strategies.

  9. #9
    Quote Originally Posted by Prosperent Brian View Post
    It's not telling you the total number of sales. It's telling you that for that date range, there were 11 nike branded sales where the click and sale were on the same day. There were 3 nike branded sales where there was a two day gap between the initial click and the sale. There were 2 nike branded sales with 1 day between the click and sale, there was 1 nike branded sale where there was 17 days from the initial click to the final sale, and so on.

    Total nike brand sales for that day can be had by adding the values in the count field.

    The data is telling you the number of days between the initial click and the final sale. You can use that for a variety of planning strategies.
    OK, so I added the values in the count field and it gives me the total of 20 sales.
    BUT the total sales I get from http://api.prosperent.com/api/trends...lterBrand=Nike is 6 sales ???

    Which one give me the right total sales ?

  10. #10
    Anyone ? Please give me a hand. I couldn't continue with my project if I can't get this issue straight up.
    Last edited by 700; 03-15-2012 at 06:08 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
coupons | coupons and deals