Poniższym kodem dodaję wpis do Targetów:
Chciałbym aby ten wpis został dodany automatycznie do konkretnej listy targetowej. Może ktoś mnie naprowadzić jak to zrobić ?Code:define('sugarEntry', TRUE); require_once('includes/SugarCRM/nusoap/nusoap.php'); $soapclient = new nusoapclient('http://mojastronka.com.pl/soap.php'); $soapclient->debug_flag=true; $user_auth = array( 'user_auth' => array( 'user_name' => 'admin', 'password' => md5('hasloadmina'), 'version' => '0.1' ), 'application_name' => 'soapleadcapture' ); $result_array = $soapclient->call('login',$user_auth); $session_id_crm = $result_array['id']; $user_guid = $soapclient->call('get_user_id',$session_id_crm); $email_opt_out = ( $row['user_crm'] ) ? 'off' : 'on'; $email1 = $row['user_email']; $skad = 'ze stronki'; $first_name = $row['username']; $description = 'zarejestrowany na stronie'; $set_entry_params_2 = array( 'session' => $session_id_crm, 'module_name' => 'Prospects', 'name_value_list'=>array( array('name'=>'first_name','value'=>$first_name), array('name'=>'last_name','value'=>$skad), array('name'=>'email1', 'value'=>$email1), array('name'=>'email_opt_out', 'value'=>$email_opt_out), array('name'=>'description', 'value'=>$description), array('name'=>'assigned_user_id', 'value'=>$user_guid) ) ); $result_array_2 = $soapclient->call('set_entry',$set_entry_params_2); $result_array = $soapclient->call('end_session', array('user_name'=>'admin'));


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks