php bitrix-php crm.deal

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php bitrix-php crm.deal相关的知识,希望对你有一定的参考价值。

<?php
namespace Bitrix24\CRM\Deal;

$de = new Bitrix24\CRM\Deal();
//Add a new deal to CRM
$fields = { 
    "TITLE": "Regular sale", 
    "TYPE_ID": "GOODS", 
    "STAGE_ID": "NEW", 					
    "COMPANY_ID": 3,
    "CONTACT_ID": 3,
    "OPENED": "Y", 
    "ASSIGNED_BY_ID": 1, 
    "PROBABILITY": 30,
    "CURRENCY_ID": "USD", 
    "OPPORTUNITY": 5000,
    "BEGINDATE": date2str(current),
    "CLOSEDATE": date2str(nextMonth)					
};
$params = { "REGISTER_SONET_EVENT": "Y" };
$de->add($fields, $params);

//update deal by id
$de->update($dealId, $fields, $params);

//delete deal by id
$de->delete($dealId);

//get list of deal fields with description
$de->fields();

//get deal by id
$de->get($dealId);

//Get list of deal items
$order = { "STAGE_ID": "ASC" };
$filter = { ">PROBABILITY": 50 };
$select = [ "ID", "TITLE", "STAGE_ID", "PROBABILITY", "OPPORTUNITY", "CURRENCY_ID" ];
$start = 0;
$result = $de->getList($order, $filter, $select, $start);
$result->data();
if($result->more())
  $result->next();

/*-------------------------------------------------
  Contact for deal
*/

以上是关于php bitrix-php crm.deal的主要内容,如果未能解决你的问题,请参考以下文章

php bitrix-php任务

php bitrix-php crm联系

php bitrix-php crm领先

php bitrix-php crm.company

linux 安装多个PHP版本(php5.6 php7.1 php7.2 php7.3 php7.4 php8.0)nginx配置php多版本

php [guzzle php] guzzle php #php