Documentation

crm.externalchannel.contact

crm.externalchannel.contact

Imports a Contact and creates "Import contact" activity.

Parameters

See. method parameters.

Example of a Contact call (the structure is similar for a Company call)

BX24.callMethod(
   "crm.externalchannel.contact",
   {
    batch:[{
            "agent":{
                    "fields":{
                        "updated field":"value",
                        "ORIGIN_VERSION":"qqohNDrbtJfIpEPIEPEnCg==",
                        "ORIGIN_ID":"fff6e1b4-55bc-11d9-848a-00112f43529a-00001", 
                            },
                    "EXTERNAL_FIELDS":{
                                "COMPANY_ORIGIN_ID":"dee6e1b4-55bc-11d9-848a-00112f43529a-00001",
                                "EXTERNAL_URL":"contact_id=1001"                                
                             },
                    "REQUISITE":[{
                            "XML_ID":"faa1c2a9-55bc-11d9-848a-00112f43529a-00001",
                            "RQ_ADDR":{
                                "PRIMARY":{
                                    "ADDRESS_1":"#Street, house, building#",
                                    "ADDRESS_2":"#Apartment / office#",
                                    "CITY":"#City#",
                                    "POSTAL_CODE":"#Postal code#",
                                    "REGION":"#District / area#",  
                                    "PROVINCE":"#Region / province#",  
                                    "COUNTRY":"#Country#",
                                    "COUNTRY_CODE":""
                                    },
                                "HOME":{
                                    "ADDRESS_1":"#Street, house, building#",
                                    "ADDRESS_2":"#Apartment / office#",
                                    "CITY":"#City#",
                                    "POSTAL_CODE":"#Postal code#",
                                    "REGION":"#District / area#",  
                                    "PROVINCE":"#Region / province#",  
                                    "COUNTRY":"#Country#",
                                    "COUNTRY_CODE":""
                                    },
                                "REGISTERED":{
                                    "ADDRESS_1":"#Street, house, building#",
                                    "ADDRESS_2":"#Apartment / office#",
                                    "CITY":"#City#",
                                    "POSTAL_CODE":"#Postal code#",
                                    "REGION":"#District / area#",  
                                    "PROVINCE":"#Region / province#",  
                                    "COUNTRY":"#Country#",
                                    "COUNTRY_CODE":""
                                    },
                                "BENEFICIARY":{
                                    "ADDRESS_1":"#Street, house, building#",
                                    "ADDRESS_2":"#Apartment / office#",
                                    "CITY":"#City#",
                                    "POSTAL_CODE":"#Postal code#",
                                    "REGION":"#District / area#",  
                                    "PROVINCE":"#Region / province#",  
                                    "COUNTRY":"#Country#",
                                    "COUNTRY_CODE":""
                                    }
                                },                    
                                "RQ_NAME":"#Organization#",
                                "RQ_FIRST_NAME":"",
                                "RQ_LAST_NAME":"",
                                "RQ_SECOND_NAME":""
                                "RQ_COMPANY_NAME":"#Abbreviated name of organization#",
                                "RQ_COMPANY_FULL_NAME":"#Full name of organization#",
                                "RQ_COMPANY_REG_DATE":"#Date of state registration#",
                                "RQ_DIRECTOR":"#General Director#",
                                "RQ_ACCOUNTANT":"#Chief accountant#",                
                                "RQ_CEO_NAME":"",
                                "RQ_CEO_WORK_POS":"",
                                "RQ_CONTACT":"",
                                "RQ_EMAIL":"",
                                "RQ_PHONE":"",
                                "RQ_FAX":"",
                                "RQ_IDENT_DOC":""
                                "RQ_IDENT_DOC_SER":"",
                                "RQ_IDENT_DOC_NUM":"",
                                "RQ_IDENT_DOC_DATE":"",
                                "RQ_IDENT_DOC_ISSUED_BY":"",
                                "RQ_IDENT_DOC_DEP_CODE":"",
                                "RQ_INN":"#ИНН#",
                                "RQ_KPP":"",
                                "RQ_USRLE":"",
                                "RQ_IFNS":"",
                                "RQ_OGRN":"#RQ_OGRN#",
                                "RQ_OGRNIP":"#RQ_OGRNIP#",
                                "RQ_OKPO":"#RQ_OKPO#",
                                "RQ_OKTMO":"",
                                "RQ_OKVED":"",
                                "RQ_EDRPOU":"",
                                "RQ_DRFO":"",
                                "RQ_KBE":"",
                                "RQ_IIN":"",
                                "RQ_BIN":"",
                                "RQ_VAT_PAYER":"",
                                "RQ_VAT_ID":"",
                                "RQ_VAT_CERT_SER":"",
                                "RQ_VAT_CERT_NUM":"",
                                "RQ_VAT_CERT_DATE":"",
                                "RQ_RESIDENCE_COUNTRY":"",
                                "BANK_DETAILS":[{"
                                    "RQ_BANK_NAME":"#Bank name#",
                                    "RQ_BANK_ADDR":"#Bank address#",
                                    "RQ_BANK_ROUTE_NUM":"",
                                    "RQ_BIK":"#BIC#",
                                    "RQ_MFO":"",
                                    "RQ_ACC_NAME":"",
                                    "RQ_ACC_NUM":"#Current account#",
                                    "RQ_IIK":"",
                                    "RQ_ACC_CURRENCY":"#Account currency#",
                                    "RQ_COR_ACC_NUM":"#Correspondent account#",
                                    "RQ_IBAN":"",
                                    "RQ_SWIFT":"#SWIFT#",
                                    "RQ_BIC":"",
                                    "COMMENTS":"#Comment#",
                                    "XML_ID":"caa2g4q8-55bc-11d9-848a-00112f43529a-00001"
                                    }]
                                }]
                    }            
            }],
            params:{
                "CHANNEL_ID":"ext_channel.574b405083de90.99016531"
            }
    },
    function(result) 
    {
        if(result.error())
            console.error(result.error());
        else
            console.dir(result.data());
    }
);



© «Bitrix24», 2001-2022
Up