+ Reply to Thread
Results 1 to 10 of 13
Thread: What is ... ?
-
03-15-2012 10:42 AM #1Member
- Join Date
- May 2011
- Posts
- 85
What is ... ?
OK, I understand that 'count' is for number of sale, so what is the 'value' for ?PHP Code:"facets": {
"daysToSale": [
{
"count": 1989,
"value": "0",
"extendedFieldValue": "0"
},
[...]
],
-
03-15-2012 10:45 AM #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.
-
03-15-2012 11:05 AM #3Senior Member
- Join Date
- Apr 2011
- Posts
- 819
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?
-
03-15-2012 11:06 AM #4Member
- Join Date
- May 2011
- Posts
- 85
Brian,
Could you please elaborate this array for me. The commission range for this array is 1-day (20120310,20120310)
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 todayPHP 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
)
)
-
03-15-2012 11:44 AM #5Senior Member
- Join Date
- May 2011
- Posts
- 102
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.
-
03-15-2012 12:17 PM #6
-
03-15-2012 12:58 PM #7Member
- Join Date
- May 2011
- Posts
- 85
Here is my test script .
And I get this dataPHP 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>";
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 ??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
)
)
Last edited by 700; 03-15-2012 at 01:05 PM.
-
03-15-2012 01:21 PM #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.
-
03-15-2012 01:36 PM #9Member
- Join Date
- May 2011
- Posts
- 85
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 ?
-
03-15-2012 05:04 PM #10Member
- Join Date
- May 2011
- Posts
- 85
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 05:08 PM.

Reply With Quote
