Skip to content

Commit 14a5fbd

Browse files
committed
Update documentation index.html
1 parent f6855e2 commit 14a5fbd

1 file changed

Lines changed: 161 additions & 0 deletions

File tree

index.html

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ <h3 id='foxapi-property'>Properties</h3>
233233
<td><code><a href='#analytics'>Analytics</a></code></td>
234234
<td>Analytics instance</td>
235235
</tr>
236+
<tr id='foxapi-crosssell'>
237+
<td><code><b>crossSell</b>
238+
<td><code><a href='#crosssell'>CrossSell</a></code></td>
239+
<td>CrossSell instance</td>
240+
</tr>
236241
</tbody></table>
237242

238243
</section>
@@ -3193,6 +3198,162 @@ <h3 id='creditcardupdatepayload-field'>CreditCardUpdatePayload</h3>
31933198
</section>
31943199
<span id='creditcardsresponse'></span>
31953200

3201+
<h2 id='crosssell'>CrossSell</h2><p>Accessible via <a href="#foxapi-analytics">analytics</a> property of <a href="#foxapi">FoxApi</a> instance.</p>
3202+
3203+
<section>
3204+
<h3 id='crosssell-method'>Methods</h3>
3205+
3206+
<section >
3207+
3208+
3209+
3210+
<div class='section-comments'></div>
3211+
3212+
<table><thead>
3213+
<tr>
3214+
<th>Method</th>
3215+
<th>Returns</th>
3216+
<th>Description</th>
3217+
</tr>
3218+
</thead><tbody>
3219+
<tr id='crosssell-crossselltrain'>
3220+
<td><code><b>crossSellTrain</b>(<nobr>&lt;object&gt;</nobr> <i>pointsObj</i>, <i>{Object} pointsObj</i>)</nobr></code></td>
3221+
<td><code>Promise</code></td>
3222+
<td>Sends a collection of &quot;points&quot; to populate a sparse matrix for cross-sell
3223+
analytics and related product tracking. The POST body is an object with a &quot;points&quot; key
3224+
and value filled with an array of &quot;Point&quot; objects
3225+
Example pointsObj
3226+
<pre><code>{
3227+
&quot;points&quot;: [
3228+
{
3229+
&quot;custID&quot;: 1,
3230+
&quot;prodID&quot;: 4,
3231+
&quot;chanID&quot;: 2,
3232+
}
3233+
]
3234+
}
3235+
</code></pre></td>
3236+
</tr>
3237+
<tr id='crosssell-crosssellrelated'>
3238+
<td><code><b>crossSellRelated</b>(<nobr>&lt;Int&gt;</nobr> <i>productId</i>, <nobr>&lt;Int&gt;</nobr> <i>channelId</i>, <i>{Int} productId</i>, <i>{Int} channelId</i>)</nobr></code></td>
3239+
<td><code>Promise</code></td>
3240+
<td>Returns JSON of what products are similar to the productId in the query params.
3241+
{ &quot;products&quot;: [ RelatedProduct ] }
3242+
Score == 1 means these products were purchased by the exact same set of customers.
3243+
Score == 0 means no customer has purchased both of these
3244+
Example Request
3245+
`/v1/public/recommend/prod-prod/3?channel=2
3246+
Example Response
3247+
```
3248+
{
3249+
&quot;products&quot;: [
3250+
{
3251+
&quot;id&quot;: 2,
3252+
&quot;score&quot;: 0
3253+
},
3254+
{
3255+
&quot;id&quot;: 1,
3256+
&quot;score&quot;: 1
3257+
},
3258+
{
3259+
&quot;id&quot;: 0,
3260+
&quot;score&quot;: 0
3261+
}
3262+
]
3263+
}</td>
3264+
</tr>
3265+
</tbody></table>
3266+
3267+
</section>
3268+
3269+
</section>
3270+
<span id='point'></span>
3271+
3272+
<section>
3273+
<h3 id='point-field'>Point</h3>
3274+
3275+
<section >
3276+
3277+
3278+
3279+
<div class='section-comments'></div>
3280+
3281+
<table><thead>
3282+
<tr>
3283+
<th>Field</th>
3284+
<th>Type</th>
3285+
<th>Required</th>
3286+
<th>Example</th>
3287+
<th>Description</th>
3288+
</tr>
3289+
</thead><tbody>
3290+
<tr id='point-custid'>
3291+
<td><code><b>custID</b></code></td>
3292+
<td><code>Number</code>
3293+
<td><div data-icon="ei-check"></div></td>
3294+
<td></td>
3295+
<td>CustomerID number</td>
3296+
</tr>
3297+
<tr id='point-prodid'>
3298+
<td><code><b>prodID</b></code></td>
3299+
<td><code>Number</code>
3300+
<td><div data-icon="ei-check"></div></td>
3301+
<td></td>
3302+
<td>ProductID number</td>
3303+
</tr>
3304+
<tr id='point-chanid'>
3305+
<td><code><b>chanID</b></code></td>
3306+
<td><code>Number</code>
3307+
<td><div data-icon="ei-check"></div></td>
3308+
<td></td>
3309+
<td>Unique Channel ID number</td>
3310+
</tr>
3311+
</tbody></table>
3312+
3313+
3314+
</section>
3315+
3316+
</section>
3317+
<span id='relatedproduct'></span>
3318+
3319+
<section>
3320+
<h3 id='relatedproduct-field'>RelatedProduct</h3>
3321+
3322+
<section >
3323+
3324+
3325+
3326+
<div class='section-comments'></div>
3327+
3328+
<table><thead>
3329+
<tr>
3330+
<th>Field</th>
3331+
<th>Type</th>
3332+
<th>Required</th>
3333+
<th>Example</th>
3334+
<th>Description</th>
3335+
</tr>
3336+
</thead><tbody>
3337+
<tr id='relatedproduct-id'>
3338+
<td><code><b>id</b></code></td>
3339+
<td><code>Number</code>
3340+
<td><div data-icon="ei-check"></div></td>
3341+
<td></td>
3342+
<td>RelatedProduct ID number</td>
3343+
</tr>
3344+
<tr id='relatedproduct-score'>
3345+
<td><code><b>score</b></code></td>
3346+
<td><code>Number</code>
3347+
<td><div data-icon="ei-check"></div></td>
3348+
<td></td>
3349+
<td>RelatedProduct Similarity score</td>
3350+
</tr>
3351+
</tbody></table>
3352+
3353+
3354+
</section>
3355+
3356+
</section>
31963357
<h2 id='orders'>Orders</h2>
31973358
<section>
31983359
<h3 id='orders-method'>Methods</h3>

0 commit comments

Comments
 (0)