When i try to import csv file to zurmo, it gives me this error:
A file must be uploaded in order to continue the import process.
Posted 01 October 2012 - 10:23 AM
Posted 01 October 2012 - 11:32 AM
try {
$mySforceConnection = new SforceEnterpriseClient();
$mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/enterprisewsdl.xml');
$mylogin = $mySforceConnection->login("username", "Pass");
} catch (Exception $e) {
print_r($e);
exit();
}
$account = new stdclass();
$account->Name = "Billy"; // we can put data that we parsed csv file
$account->BillingCity = "London";
$mySforceConnection->create($account,'Account');
Posted 01 October 2012 - 01:38 PM
No there is no such way, what could you eventually do is to use Zurmo RESTful API for this task.i have another question. In salesforce we can parse data by using code like this :
try { $mySforceConnection = new SforceEnterpriseClient(); $mySoapClient = $mySforceConnection->createConnection(SOAP_CLIENT_BASEDIR.'/enterprisewsdl.xml'); $mylogin = $mySforceConnection->login("username", "Pass"); } catch (Exception $e) { print_r($e); exit(); } $account = new stdclass(); $account->Name = "Billy"; // we can put data that we parsed csv file $account->BillingCity = "London"; $mySforceConnection->create($account,'Account');
Is there a similar way for zurmo?
Posted 02 October 2012 - 02:20 PM
<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
include 'resthelper.php';
$username = 'super';
$password = '1234';
$authenticationData = login($username, $password);
require_once("File_CSV_DataSource-1.0.1/DataSource.php");
// usage sample
createUser($authenticationData);
function login($username2, $password2)
{
$headers = array(
'Accept: application/json',
'ZURMO_AUTH_USERNAME: ' . $username2,
'ZURMO_AUTH_PASSWORD: ' . $password2,
'ZURMO_API_REQUEST_TYPE: REST',
);
$response = ApiRestHelper::createApiCall('http://localhost/zurmo/app/index.php/zurmo/api/login', 'POST', $headers);
$response = json_decode($response, true);
if ($response['status'] == 'SUCCESS')
{
//ob_start();
session_start();
echo "<br />sessionId : " . $response['data']['sessionId'] . "<br />";
echo "token : " . $response['data']['token'] . "<br />";
$_SESSION['sessionId'] = $response['data']['sessionId'];
$_SESSION['token'] = $response['data']['token'];
return $response['data'];
// header( 'Location: getuser.php' ) ;
}
else
{
//return false;
header( 'Status: 404 Not Found' ) ;
}
}
function createUser($authenticationData)
{
$accounts = array();
require_once("File_CSV_DataSource-1.0.1/DataSource.php");
// usage sample
$csv = new File_CSV_DataSource;
if ($csv->load('./zurmo.csv')) {
if ($csv->isSymmetric()) {
$array = $csv->connect();
}else{
// fetch records that dont match headers length
$array = $csv->getAsymmetricRows();
}
$headers = array(
'Accept: application/json',
'ZURMO_SESSION_ID: ' . $authenticationData['sessionId'],
'ZURMO_TOKEN: ' . $authenticationData['token'],
'ZURMO_API_REQUEST_TYPE: REST',
);
foreach($array as $account){
$data = array(
'name' => $account['zurmo'],
);
$response = ApiRestHelper::createApiCall('http://localhost/zurmo/app/index.php/accounts/account/api/create/', 'POST',
$headers, array('data' => $data));
// Decode json data
$response = json_decode($response, true);
if ($response['status'] == 'SUCCESS')
{
$user = $response['data'];
//Do something with user
echo "<br/>createUser SUCCESS<br/>";
//print_r($response);
echo "<br/>id : " . $user['id'];
}
else
{
// Error, for example if we provided invalid user id
$errors = $response['errors'];
// Do something with errors
echo "<br/>createUser ERROR<br/>";
print_r($response);
}//if end
}//foreach end
}//csv end
}//function end
?>
Posted 08 March 2013 - 10:26 AM
I am having trouble importing a csv file, I map all the fields but always come up with the same errors
On Import Wizard: Step 5 of 6 the following message shows.
I have tried uploading to the demo version as well, and this didnt work. I am using Chrome on Windows 7
Apart from that your crm is fantastic. I am looking forward to been able to intergrate it with Modx CMS.
Regards
Zurmo Discussions →
User Questions →
Duplicate Account records when importing Contact and Account dataStarted by petejenkins, 12 May 2013 |
|
|
||
Zurmo Discussions →
Installation and Setup →
Cant change language.Started by roktok, 28 Apr 2013 |
|
|
||
Zurmo Discussions →
General Discussion for Zurmo →
error importing notes mapped to account idStarted by adm, 03 Apr 2013 |
|
|
||
Zurmo Discussions →
Feature Requests →
import date format like 03/05/50 or 12/15/11Started by windsor, 29 Mar 2013 |
|
|
||
Zurmo Discussions →
General Discussion for Zurmo →
How to import note attachmentsStarted by adm, 28 Mar 2013 |
|
|
0 members, 0 guests, 0 anonymous users