Answer the question
In order to leave comments, you need to log in
Get information about a call in a case via REST API?
Good afternoon! I get information about the case associated with the lead through the REST API
$activity = $bx::activityGet($_REQUEST['data']['FIELDS']['ID']) ;
$activity = $activity['result'];
$LEAD_ID = $activity['OWNER_ID'];
$leadData = $bx::leadGet($LEAD_ID);
$LEAD_DATA = $leadData['result'];
const activityGet = self::url . "crm.activity.get";
public static function activityGet($id){
$data = [
'id'=> $id
];
return parent::curlStart(self::activityGet, $data);
}
const leadGet = self::url . 'crm.lead.get';
public static function leadGet($id){
$data = array(
'id' => $id,
);
return parent::curlStart(self::leadGet, $data);
}
const voximplantGet = self::url. "voximplant.statistic.get" ;
public static function voximplantGet($id){
$data = array(
'id' => $id,
);
return parent::curlStart(self::voximplantGet, $data);
}
$VOXI_ID = $activity['ORIGIN_ID'];
$voxiData = $bx::voximplantGet($VOXI_ID);
$VOXI_DATA = $voxiData['result'];
Array
(
[0] => Array
(
[ID] => 1
[PORTAL_USER_ID] => 1
[PORTAL_NUMBER] => sip1
[PHONE_NUMBER] => 9622777777
[CALL_ID] => 5f658dfdcd13e257.1442585207.572803
[EXTERNAL_CALL_ID] =>
[CALL_CATEGORY] => external
[CALL_DURATION] => 25
[CALL_START_DATE] => 2015-09-18T17:06:48+03:00
[CALL_VOTE] => 0
[COST] => 0.0000
[COST_CURRENCY] => RUR
[CALL_FAILED_CODE] => 304
[CALL_FAILED_REASON] => Skipped call
[CRM_ENTITY_TYPE] =>
[CRM_ENTITY_ID] =>
[CRM_ACTIVITY_ID] =>
[REST_APP_ID] =>
[REST_APP_NAME] =>
[TRANSCRIPT_ID] =>
[TRANSCRIPT_PENDING] =>
[SESSION_ID] =>
[REDIAL_ATTEMPT] =>
[COMMENT] =>
[RECORD_FILE_ID] =>
[CALL_TYPE] => 2
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question