curl --request POST \
--url https://app.octavehq.com/api/v2/event/compare \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"cohortA": {
"label": "<string>",
"filters": {
"entityMatchAll": true,
"eventOIds": [
"<string>"
],
"opportunityIds": [
"<string>"
],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"dealStagesAtEvent": [
"<string>"
],
"pipelinePhases": [],
"crmPipelines": [
"<string>"
],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": true
}
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"filters": {
"entityMatchAll": true,
"eventOIds": [
"<string>"
],
"opportunityIds": [
"<string>"
],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"dealStagesAtEvent": [
"<string>"
],
"pipelinePhases": [],
"crmPipelines": [
"<string>"
],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": true
},
"exclude": {
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"pipelinePhases": []
},
"excludeTags": [
"<string>"
],
"outcome": {
"metric": "win_rate"
},
"materialGapPoints": 10,
"comparisonsDeclared": 1
}
'import requests
url = "https://app.octavehq.com/api/v2/event/compare"
payload = {
"cohortA": {
"label": "<string>",
"filters": {
"entityMatchAll": True,
"eventOIds": ["<string>"],
"opportunityIds": ["<string>"],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"dealStagesAtEvent": ["<string>"],
"pipelinePhases": [],
"crmPipelines": ["<string>"],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": True
}
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"filters": {
"entityMatchAll": True,
"eventOIds": ["<string>"],
"opportunityIds": ["<string>"],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"dealStagesAtEvent": ["<string>"],
"pipelinePhases": [],
"crmPipelines": ["<string>"],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": True
},
"exclude": {
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"pipelinePhases": []
},
"excludeTags": ["<string>"],
"outcome": { "metric": "win_rate" },
"materialGapPoints": 10,
"comparisonsDeclared": 1
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cohortA: {
label: '<string>',
filters: {
entityMatchAll: true,
eventOIds: ['<string>'],
opportunityIds: ['<string>'],
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
dealStagesAtEvent: ['<string>'],
pipelinePhases: [],
crmPipelines: ['<string>'],
minStalledDays: 123,
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
unmatchedOnly: true
}
},
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
filters: {
entityMatchAll: true,
eventOIds: ['<string>'],
opportunityIds: ['<string>'],
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
dealStagesAtEvent: ['<string>'],
pipelinePhases: [],
crmPipelines: ['<string>'],
minStalledDays: 123,
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
unmatchedOnly: true
},
exclude: {
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
pipelinePhases: []
},
excludeTags: ['<string>'],
outcome: {metric: 'win_rate'},
materialGapPoints: 10,
comparisonsDeclared: 1
})
};
fetch('https://app.octavehq.com/api/v2/event/compare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.octavehq.com/api/v2/event/compare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cohortA' => [
'label' => '<string>',
'filters' => [
'entityMatchAll' => true,
'eventOIds' => [
'<string>'
],
'opportunityIds' => [
'<string>'
],
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'dealStagesAtEvent' => [
'<string>'
],
'pipelinePhases' => [
],
'crmPipelines' => [
'<string>'
],
'minStalledDays' => 123,
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'unmatchedOnly' => true
]
],
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'filters' => [
'entityMatchAll' => true,
'eventOIds' => [
'<string>'
],
'opportunityIds' => [
'<string>'
],
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'dealStagesAtEvent' => [
'<string>'
],
'pipelinePhases' => [
],
'crmPipelines' => [
'<string>'
],
'minStalledDays' => 123,
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'unmatchedOnly' => true
],
'exclude' => [
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'pipelinePhases' => [
]
],
'excludeTags' => [
'<string>'
],
'outcome' => [
'metric' => 'win_rate'
],
'materialGapPoints' => 10,
'comparisonsDeclared' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.octavehq.com/api/v2/event/compare"
payload := strings.NewReader("{\n \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"materialGapPoints\": 10,\n \"comparisonsDeclared\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.octavehq.com/api/v2/event/compare")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"materialGapPoints\": 10,\n \"comparisonsDeclared\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/event/compare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"materialGapPoints\": 10,\n \"comparisonsDeclared\": 1\n}"
response = http.request(request)
puts response.read_body{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"definition": {
"metric": "win_rate",
"label": "<string>",
"formula": "<string>",
"grain": "<string>",
"membership": "<string>",
"clock": "<string>",
"exclusions": [
"<string>"
],
"linkScope": "<string>",
"orderRule": "<string>",
"materialGapPoints": 123,
"currency": "<string>"
},
"linkScope": "crm_linked",
"observed": {
"higher": "cohortA",
"gapPoints": 123,
"unavailableReason": "no_readable_deals_in_cohort_a",
"summary": "<string>"
},
"exclusions": {
"postOutcomeOnly": 123,
"orderUnknown": 123,
"reopened": 123,
"ambiguousExposure": 123
},
"membershipBasis": {
"open": 123,
"crmRecordedClose": 123,
"syncDetectedCloseAssumed": 123,
"dateOnlyClose": 123,
"syncLagAllowanceDays": 123
},
"timingSensitivity": {
"cohortA": {
"deals": 123,
"readable": 123,
"successes": 123,
"rate": 123
},
"cohortB": {
"deals": 123,
"readable": 123,
"successes": 123,
"rate": 123
},
"gapPoints": 123,
"higher": "cohortA",
"directionAgrees": true
},
"acrossLinkScopes": {
"scopes": [
{
"linkScope": "crm_linked",
"cohortA": {
"deals": 123,
"readable": 123,
"successes": 123,
"rate": 123
},
"cohortB": {
"deals": 123,
"readable": 123,
"successes": 123,
"rate": 123
},
"gapPoints": 123,
"higher": "cohortA"
}
],
"directionAgrees": true
},
"cohortA": {
"label": "<string>",
"deals": 123,
"wonDeals": 123,
"lostDeals": 123,
"openDeals": 123,
"winRate": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
},
"knownWonValue": 123,
"wonDealsWithValue": 123,
"wonDealsValueMissing": 123,
"wonDealsValueUnconverted": 123,
"negativeValueWonDeals": {
"deals": 123,
"amount": 123
},
"medianWonDealSize": 123,
"outcome": {
"successes": 123,
"failures": 123,
"notObservable": 123,
"notObservableReasons": {
"deal_still_open": 123,
"window_not_elapsed": 123,
"stay_not_yet_longer_than_median": 123,
"no_open_stage_on_record_at_anchor": 123,
"no_open_stage_or_no_dependable_median": 123,
"no_scored_follow_up": 123
},
"rate": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
}
}
},
"cohortB": {
"label": "<string>",
"deals": 123,
"wonDeals": 123,
"lostDeals": 123,
"openDeals": 123,
"winRate": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
},
"knownWonValue": 123,
"wonDealsWithValue": 123,
"wonDealsValueMissing": 123,
"wonDealsValueUnconverted": 123,
"negativeValueWonDeals": {
"deals": 123,
"amount": 123
},
"medianWonDealSize": 123,
"outcome": {
"successes": 123,
"failures": 123,
"notObservable": 123,
"notObservableReasons": {
"deal_still_open": 123,
"window_not_elapsed": 123,
"stay_not_yet_longer_than_median": 123,
"no_open_stage_on_record_at_anchor": 123,
"no_open_stage_or_no_dependable_median": 123,
"no_scored_follow_up": 123
},
"rate": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
}
}
},
"overlappingDeals": 123,
"difference": {
"points": 123,
"low": 123,
"high": 123,
"ratio": 123,
"pValue": 123,
"adjustedPValue": 123,
"comparisonsDeclared": 123,
"test": "fisher_exact"
},
"verdict": {
"state": "insufficient_evidence",
"uncertainty": "small_sample",
"claimLevel": "observed",
"summary": "<string>"
},
"sampleNeeded": {
"dealsPerCohort": 123,
"smallerCohortHas": 123
},
"stratified": {
"by": "<string>",
"strata": [
{
"key": "<string>",
"name": "<string>",
"cohortA": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
},
"cohortB": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
},
"differencePoints": 123
}
],
"pooledOddsRatio": 123,
"pValue": 123,
"holdsWithinStrata": "yes",
"summary": "<string>"
},
"caveats": [
"<string>"
],
"dataWindow": {
"kind": "event_range",
"startDate": "<string>",
"endDate": "<string>",
"isDefault": true,
"periodType": "week"
},
"linkScopeSource": "request"
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}Compare Cohorts
Test whether one cohort of deals does better than another, on win rate or a leading outcome (advanced within N days, faster than the stage median, next conversation positive). Cohorts are defined by event filters (or cohort A against every other deal). Returns each win rate with a 95% interval, the gap with its interval, a verdict (insufficient_evidence / no_material_difference / difference_to_watch / difference_to_investigate) with the strongest claim level the data supports, the definition of every number (formula, grain, clock, exclusions), the sample an unsettled question would need, an optional like-for-like check within a stratifying dimension, and caveats. REST twin of the compare_cohorts MCP tool.
curl --request POST \
--url https://app.octavehq.com/api/v2/event/compare \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"cohortA": {
"label": "<string>",
"filters": {
"entityMatchAll": true,
"eventOIds": [
"<string>"
],
"opportunityIds": [
"<string>"
],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"dealStagesAtEvent": [
"<string>"
],
"pipelinePhases": [],
"crmPipelines": [
"<string>"
],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": true
}
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"filters": {
"entityMatchAll": true,
"eventOIds": [
"<string>"
],
"opportunityIds": [
"<string>"
],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"dealStagesAtEvent": [
"<string>"
],
"pipelinePhases": [],
"crmPipelines": [
"<string>"
],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": true
},
"exclude": {
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": [
"<string>"
],
"companyDomains": [
"<string>"
],
"outcomeFilters": [],
"opportunityStatuses": [],
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": [
"<string>"
],
"personas": [
"<string>"
],
"segments": [
"<string>"
],
"tags": [
"<string>"
],
"useCases": [
"<string>"
],
"references": [
"<string>"
],
"competitors": [
"<string>"
],
"alternatives": [
"<string>"
],
"buyingTriggers": [
"<string>"
],
"coreFeatures": [
"<string>"
],
"objections": [
"<string>"
],
"proofPoints": [
"<string>"
],
"motionTypes": [],
"callPurposes": [],
"dealMotions": [],
"dealTypes": [
"<string>"
],
"dealStages": [
"<string>"
],
"pipelinePhases": []
},
"excludeTags": [
"<string>"
],
"outcome": {
"metric": "win_rate"
},
"materialGapPoints": 10,
"comparisonsDeclared": 1
}
'import requests
url = "https://app.octavehq.com/api/v2/event/compare"
payload = {
"cohortA": {
"label": "<string>",
"filters": {
"entityMatchAll": True,
"eventOIds": ["<string>"],
"opportunityIds": ["<string>"],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"dealStagesAtEvent": ["<string>"],
"pipelinePhases": [],
"crmPipelines": ["<string>"],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": True
}
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"filters": {
"entityMatchAll": True,
"eventOIds": ["<string>"],
"opportunityIds": ["<string>"],
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"dealStagesAtEvent": ["<string>"],
"pipelinePhases": [],
"crmPipelines": ["<string>"],
"minStalledDays": 123,
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"unmatchedOnly": True
},
"exclude": {
"eventCategories": [],
"eventTypes": [],
"sentiments": [],
"contactEmails": ["<string>"],
"companyDomains": ["<string>"],
"outcomeFilters": [],
"opportunityStatuses": [],
"minDealAmount": 123,
"maxDealAmount": 123,
"offerings": ["<string>"],
"personas": ["<string>"],
"segments": ["<string>"],
"tags": ["<string>"],
"useCases": ["<string>"],
"references": ["<string>"],
"competitors": ["<string>"],
"alternatives": ["<string>"],
"buyingTriggers": ["<string>"],
"coreFeatures": ["<string>"],
"objections": ["<string>"],
"proofPoints": ["<string>"],
"motionTypes": [],
"callPurposes": [],
"dealMotions": [],
"dealTypes": ["<string>"],
"dealStages": ["<string>"],
"pipelinePhases": []
},
"excludeTags": ["<string>"],
"outcome": { "metric": "win_rate" },
"materialGapPoints": 10,
"comparisonsDeclared": 1
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cohortA: {
label: '<string>',
filters: {
entityMatchAll: true,
eventOIds: ['<string>'],
opportunityIds: ['<string>'],
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
dealStagesAtEvent: ['<string>'],
pipelinePhases: [],
crmPipelines: ['<string>'],
minStalledDays: 123,
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
unmatchedOnly: true
}
},
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
filters: {
entityMatchAll: true,
eventOIds: ['<string>'],
opportunityIds: ['<string>'],
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
dealStagesAtEvent: ['<string>'],
pipelinePhases: [],
crmPipelines: ['<string>'],
minStalledDays: 123,
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
unmatchedOnly: true
},
exclude: {
eventCategories: [],
eventTypes: [],
sentiments: [],
contactEmails: ['<string>'],
companyDomains: ['<string>'],
outcomeFilters: [],
opportunityStatuses: [],
minDealAmount: 123,
maxDealAmount: 123,
offerings: ['<string>'],
personas: ['<string>'],
segments: ['<string>'],
tags: ['<string>'],
useCases: ['<string>'],
references: ['<string>'],
competitors: ['<string>'],
alternatives: ['<string>'],
buyingTriggers: ['<string>'],
coreFeatures: ['<string>'],
objections: ['<string>'],
proofPoints: ['<string>'],
motionTypes: [],
callPurposes: [],
dealMotions: [],
dealTypes: ['<string>'],
dealStages: ['<string>'],
pipelinePhases: []
},
excludeTags: ['<string>'],
outcome: {metric: 'win_rate'},
materialGapPoints: 10,
comparisonsDeclared: 1
})
};
fetch('https://app.octavehq.com/api/v2/event/compare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.octavehq.com/api/v2/event/compare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cohortA' => [
'label' => '<string>',
'filters' => [
'entityMatchAll' => true,
'eventOIds' => [
'<string>'
],
'opportunityIds' => [
'<string>'
],
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'dealStagesAtEvent' => [
'<string>'
],
'pipelinePhases' => [
],
'crmPipelines' => [
'<string>'
],
'minStalledDays' => 123,
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'unmatchedOnly' => true
]
],
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'filters' => [
'entityMatchAll' => true,
'eventOIds' => [
'<string>'
],
'opportunityIds' => [
'<string>'
],
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'dealStagesAtEvent' => [
'<string>'
],
'pipelinePhases' => [
],
'crmPipelines' => [
'<string>'
],
'minStalledDays' => 123,
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'unmatchedOnly' => true
],
'exclude' => [
'eventCategories' => [
],
'eventTypes' => [
],
'sentiments' => [
],
'contactEmails' => [
'<string>'
],
'companyDomains' => [
'<string>'
],
'outcomeFilters' => [
],
'opportunityStatuses' => [
],
'minDealAmount' => 123,
'maxDealAmount' => 123,
'offerings' => [
'<string>'
],
'personas' => [
'<string>'
],
'segments' => [
'<string>'
],
'tags' => [
'<string>'
],
'useCases' => [
'<string>'
],
'references' => [
'<string>'
],
'competitors' => [
'<string>'
],
'alternatives' => [
'<string>'
],
'buyingTriggers' => [
'<string>'
],
'coreFeatures' => [
'<string>'
],
'objections' => [
'<string>'
],
'proofPoints' => [
'<string>'
],
'motionTypes' => [
],
'callPurposes' => [
],
'dealMotions' => [
],
'dealTypes' => [
'<string>'
],
'dealStages' => [
'<string>'
],
'pipelinePhases' => [
]
],
'excludeTags' => [
'<string>'
],
'outcome' => [
'metric' => 'win_rate'
],
'materialGapPoints' => 10,
'comparisonsDeclared' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.octavehq.com/api/v2/event/compare"
payload := strings.NewReader("{\n \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"materialGapPoints\": 10,\n \"comparisonsDeclared\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api_key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.octavehq.com/api/v2/event/compare")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"materialGapPoints\": 10,\n \"comparisonsDeclared\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/event/compare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cohortA\": {\n \"label\": \"<string>\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n }\n },\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"filters\": {\n \"entityMatchAll\": true,\n \"eventOIds\": [\n \"<string>\"\n ],\n \"opportunityIds\": [\n \"<string>\"\n ],\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"dealStagesAtEvent\": [\n \"<string>\"\n ],\n \"pipelinePhases\": [],\n \"crmPipelines\": [\n \"<string>\"\n ],\n \"minStalledDays\": 123,\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"unmatchedOnly\": true\n },\n \"exclude\": {\n \"eventCategories\": [],\n \"eventTypes\": [],\n \"sentiments\": [],\n \"contactEmails\": [\n \"<string>\"\n ],\n \"companyDomains\": [\n \"<string>\"\n ],\n \"outcomeFilters\": [],\n \"opportunityStatuses\": [],\n \"minDealAmount\": 123,\n \"maxDealAmount\": 123,\n \"offerings\": [\n \"<string>\"\n ],\n \"personas\": [\n \"<string>\"\n ],\n \"segments\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"useCases\": [\n \"<string>\"\n ],\n \"references\": [\n \"<string>\"\n ],\n \"competitors\": [\n \"<string>\"\n ],\n \"alternatives\": [\n \"<string>\"\n ],\n \"buyingTriggers\": [\n \"<string>\"\n ],\n \"coreFeatures\": [\n \"<string>\"\n ],\n \"objections\": [\n \"<string>\"\n ],\n \"proofPoints\": [\n \"<string>\"\n ],\n \"motionTypes\": [],\n \"callPurposes\": [],\n \"dealMotions\": [],\n \"dealTypes\": [\n \"<string>\"\n ],\n \"dealStages\": [\n \"<string>\"\n ],\n \"pipelinePhases\": []\n },\n \"excludeTags\": [\n \"<string>\"\n ],\n \"outcome\": {\n \"metric\": \"win_rate\"\n },\n \"materialGapPoints\": 10,\n \"comparisonsDeclared\": 1\n}"
response = http.request(request)
puts response.read_body{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"definition": {
"metric": "win_rate",
"label": "<string>",
"formula": "<string>",
"grain": "<string>",
"membership": "<string>",
"clock": "<string>",
"exclusions": [
"<string>"
],
"linkScope": "<string>",
"orderRule": "<string>",
"materialGapPoints": 123,
"currency": "<string>"
},
"linkScope": "crm_linked",
"observed": {
"higher": "cohortA",
"gapPoints": 123,
"unavailableReason": "no_readable_deals_in_cohort_a",
"summary": "<string>"
},
"exclusions": {
"postOutcomeOnly": 123,
"orderUnknown": 123,
"reopened": 123,
"ambiguousExposure": 123
},
"membershipBasis": {
"open": 123,
"crmRecordedClose": 123,
"syncDetectedCloseAssumed": 123,
"dateOnlyClose": 123,
"syncLagAllowanceDays": 123
},
"timingSensitivity": {
"cohortA": {
"deals": 123,
"readable": 123,
"successes": 123,
"rate": 123
},
"cohortB": {
"deals": 123,
"readable": 123,
"successes": 123,
"rate": 123
},
"gapPoints": 123,
"higher": "cohortA",
"directionAgrees": true
},
"acrossLinkScopes": {
"scopes": [
{
"linkScope": "crm_linked",
"cohortA": {
"deals": 123,
"readable": 123,
"successes": 123,
"rate": 123
},
"cohortB": {
"deals": 123,
"readable": 123,
"successes": 123,
"rate": 123
},
"gapPoints": 123,
"higher": "cohortA"
}
],
"directionAgrees": true
},
"cohortA": {
"label": "<string>",
"deals": 123,
"wonDeals": 123,
"lostDeals": 123,
"openDeals": 123,
"winRate": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
},
"knownWonValue": 123,
"wonDealsWithValue": 123,
"wonDealsValueMissing": 123,
"wonDealsValueUnconverted": 123,
"negativeValueWonDeals": {
"deals": 123,
"amount": 123
},
"medianWonDealSize": 123,
"outcome": {
"successes": 123,
"failures": 123,
"notObservable": 123,
"notObservableReasons": {
"deal_still_open": 123,
"window_not_elapsed": 123,
"stay_not_yet_longer_than_median": 123,
"no_open_stage_on_record_at_anchor": 123,
"no_open_stage_or_no_dependable_median": 123,
"no_scored_follow_up": 123
},
"rate": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
}
}
},
"cohortB": {
"label": "<string>",
"deals": 123,
"wonDeals": 123,
"lostDeals": 123,
"openDeals": 123,
"winRate": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
},
"knownWonValue": 123,
"wonDealsWithValue": 123,
"wonDealsValueMissing": 123,
"wonDealsValueUnconverted": 123,
"negativeValueWonDeals": {
"deals": 123,
"amount": 123
},
"medianWonDealSize": 123,
"outcome": {
"successes": 123,
"failures": 123,
"notObservable": 123,
"notObservableReasons": {
"deal_still_open": 123,
"window_not_elapsed": 123,
"stay_not_yet_longer_than_median": 123,
"no_open_stage_on_record_at_anchor": 123,
"no_open_stage_or_no_dependable_median": 123,
"no_scored_follow_up": 123
},
"rate": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
}
}
},
"overlappingDeals": 123,
"difference": {
"points": 123,
"low": 123,
"high": 123,
"ratio": 123,
"pValue": 123,
"adjustedPValue": 123,
"comparisonsDeclared": 123,
"test": "fisher_exact"
},
"verdict": {
"state": "insufficient_evidence",
"uncertainty": "small_sample",
"claimLevel": "observed",
"summary": "<string>"
},
"sampleNeeded": {
"dealsPerCohort": 123,
"smallerCohortHas": 123
},
"stratified": {
"by": "<string>",
"strata": [
{
"key": "<string>",
"name": "<string>",
"cohortA": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
},
"cohortB": {
"closedDeals": 123,
"rate": 123,
"low": 123,
"high": 123,
"sampleSizeBand": "insufficient"
},
"differencePoints": 123
}
],
"pooledOddsRatio": 123,
"pValue": 123,
"holdsWithinStrata": "yes",
"summary": "<string>"
},
"caveats": [
"<string>"
],
"dataWindow": {
"kind": "event_range",
"startDate": "<string>",
"endDate": "<string>",
"isDefault": true,
"periodType": "week"
},
"linkScopeSource": "request"
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}Authorizations
Body
Event window, shared filters and the two cohorts
Show child attributes
Show child attributes
Start date for event time range (ISO 8601 format). Defaults to 14 days ago if not provided; the response's dataWindow echoes what was used.
End date for event time range. Defaults to the time of the request, so events stamped in the future (a lost deal's placeholder close date, for example) are left out; pass an explicit later endDate to include them. The response's dataWindow echoes what was used.
Filters to INCLUDE events: event type/category, company, contact, sentiment, call purpose, outcome, deal amount, library entity oIds (offerings, personas, segments, tags, use cases, competitors, alternatives, buying triggers, core features, objections, proof points, references), motion types, customer scope, and CRM deal context (opportunityIds, opportunityStatuses, dealMotions, dealTypes, dealStages, pipelinePhases, crmPipelines, minStalledDays). Deal filters AND on the same linked deal; values within one filter are OR'd.
Show child attributes
Show child attributes
Filters to EXCLUDE events matching these criteria (same shape as the entity/outcome match filters)
Show child attributes
Show child attributes
Exclude events matching any library entity that carries these reporting tag oIds. Use list_tag_groups to resolve tag oIds. Multiple tags are OR'd.
The comparison group. OMIT it to compare cohort A against every other deal in the window — the usual question ('do deals where X came up win more than deals where it didn't?').
Show child attributes
Show child attributes
The outcome the two cohorts are compared on. win_rate (default): won / closed — the truest and the slowest. advanced_within_days: the deal reached a later pipeline phase (not closed-lost) within days of its first matching conversation. faster_than_stage_median: the deal left the CRM stage it was in at that conversation, for a stage other than closed-lost, in less time than this workspace's median for that stage. next_conversation_positive: the deal's next conversation after it had POSITIVE overall sentiment. Use a leading outcome when win_rate returns insufficient_evidence; say which outcome a figure is about whenever you quote it.
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Which conversations count as belonging to a deal. OMIT it to use the workspace's own default (set beside its CRM mappings), or the product default, outcome_attribution, when the workspace never chose; the response says which applied in linkScopeSource. Which event-to-deal links establish that a conversation belongs to a deal. outcome_attribution (default): the product's own rule, the one behind the win rates in Insights — attribution links, links the CRM or a person made, links by a participant's contact email, and company-domain links only on a deal with at least two of them. Figures at this scope are comparable with Insights; at the others they are not. It includes a conversation matched by email to every deal its contact sits on, so on accounts with many open deals a cohort is 'deals at accounts where this came up' more than 'deals where it came up'. crm_linked: only links the CRM or a person made — 'CRM-linked deals with a matching conversation'. The firmest association and a much smaller, differently selected population; not an unbiased one. single_candidate: crm_linked plus an inferred link when the event reaches exactly one deal. account_associated: every link. The response reports the comparison under all four (acrossLinkScopes), so you can see whether the direction holds.
crm_linked, single_candidate, outcome_attribution, account_associated Also make the comparison WITHIN each value of this dimension and pool the result. Use { by: 'segment' } (or a tag group, or deal_stage_at_event) whenever the cohorts could simply sit in different kinds of deal — it is what tells a real effect from a mix effect.
Show child attributes
Show child attributes
The gap, in PERCENTAGE POINTS, below which two rates count as alike — what the business would not act on. Only used to decide no_material_difference. Choose it BEFORE looking at the result. The default is a software default, not a threshold anyone has endorsed; at a low base rate (say 15%) a smaller margin such as 5 is more sensible. It never suppresses the observed difference.
1 <= x <= 50How many comparisons you are making in this analysis, INCLUDING this one. If you are testing 12 use cases to see which wins more, pass 12 on each call: some will look significant by chance, and the verdict corrects for it. Leave at 1 only for a single, pre-planned question.
1 <= x <= 1000Response
Compare Cohorts
Show child attributes
Show child attributes
How every number here is defined: what is counted, over which clock, and what is left out. State the relevant parts when quoting a figure.
Show child attributes
Show child attributes
Which event-to-deal links establish that a conversation belongs to a deal. outcome_attribution (default): the product's own rule, the one behind the win rates in Insights — attribution links, links the CRM or a person made, links by a participant's contact email, and company-domain links only on a deal with at least two of them. Figures at this scope are comparable with Insights; at the others they are not. It includes a conversation matched by email to every deal its contact sits on, so on accounts with many open deals a cohort is 'deals at accounts where this came up' more than 'deals where it came up'. crm_linked: only links the CRM or a person made — 'CRM-linked deals with a matching conversation'. The firmest association and a much smaller, differently selected population; not an unbiased one. single_candidate: crm_linked plus an inferred link when the event reaches exactly one deal. account_associated: every link. The response reports the comparison under all four (acrossLinkScopes), so you can see whether the direction holds.
crm_linked, single_candidate, outcome_attribution, account_associated The descriptive result. ALWAYS reportable, in every verdict state: say which side is higher, by how much and on how many deals. It needs no significance test. What the verdict adds is how far you may go beyond these deals.
Show child attributes
Show child attributes
Deals that matched but were not compared, by reason. Each deal is counted under one reason.
Show child attributes
Show child attributes
How the compared deals were shown to have a conversation before their outcome, as counts of deals. When most rest on the sync-lag assumption, read timingSensitivity.
Show child attributes
Show child attributes
The same comparison keeping only deals whose order is KNOWN: still open, or closed at a time the CRM recorded. It drops every deal admitted under the sync-lag assumption or a date-only close, so it is smaller. If the direction changes here, the main result rests on an assumption about timing — say so.
Show child attributes
Show child attributes
The same comparison under each link scope, firmest first. A firmer scope is a smaller and differently selected population, not simply a more correct one: deals a rep attaches activity to in the CRM are not a random sample, and the direction of that difference is not stable.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Deals that matched BOTH cohorts. They are left out of both arms so the two samples are independent; always 0 when cohort B is 'everything else'.
The gap between the two sides on the compared outcome, with a 95% interval.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Deals with an observable outcome (closed deals, for win_rate) EACH cohort would need to confirm a gap of the size observed (95% confidence, 80% power), next to what the smaller cohort has. When the evidence is insufficient this says how far away an answer is.
Show child attributes
Show child attributes
The same comparison made within each value of stratifyBy, then pooled. Null unless stratifyBy was given.
Show child attributes
Show child attributes
Things about this data that limit what the numbers support. Read them before quoting.
The time span these numbers cover. Compare numbers from two tools only when their dataWindow kind and dates match.
Show child attributes
Show child attributes
Where linkScope came from: request (the caller named it), workspace_default (the workspace's deal matching rule, set beside its CRM mappings) or product_default (outcome_attribution, when the workspace never chose). The Insights win rates use the workspace's rule, so only a comparison made under a request scope is expected to differ from them.
request, workspace_default, product_default