Jump to content


Photo

csv import problem

zurmo csv import

  • Please log in to reply
11 replies to this topic

#1 srmt

srmt

    Newbie

  • New Members
  • Pip
  • 7 posts

Posted 01 October 2012 - 08:25 AM

Hi,

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.


#2 srmt

srmt

    Newbie

  • New Members
  • Pip
  • 7 posts

Posted 01 October 2012 - 09:00 AM

Google Chrome doesn't support import module of zurmo but safari and firefox works perfectly.

#3 Ivica

Ivica

    Advanced Member

  • Moderators
  • 565 posts

Posted 01 October 2012 - 09:36 AM

I just checked and import worked on my computer in Chrome. It is maybe OS/Chrome version problem. Can you tell me your version of Chrome and OS you are using?

#4 srmt

srmt

    Newbie

  • New Members
  • Pip
  • 7 posts

Posted 01 October 2012 - 10:08 AM

Chrome : 22.0.1229.79 Osx: 10.8

#5 Ivica

Ivica

    Advanced Member

  • Moderators
  • 565 posts

Posted 01 October 2012 - 10:23 AM

Can you try to import your csv file to our demo instance(yopu can use just one row of your csv file, and replace any real data with dummy one). Here is url: http://dev2.zurmo.co...e/app/index.php

Thanks!

#6 srmt

srmt

    Newbie

  • New Members
  • Pip
  • 7 posts

Posted 01 October 2012 - 11:20 AM

I updated osx to 10.8.2 and tried your demo instance but same problem has occured.

#7 srmt

srmt

    Newbie

  • New Members
  • Pip
  • 7 posts

Posted 01 October 2012 - 11:32 AM

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?

#8 Ivica

Ivica

    Advanced Member

  • Moderators
  • 565 posts

Posted 01 October 2012 - 01:38 PM

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?

No there is no such way, what could you eventually do is to use Zurmo RESTful API for this task.

It would be great if some other users that are using OSX, to try to import files from Google Chrome, our demo instance could be user for such task: http://dev2.zurmo.co...e/app/index.php

#9 srmt

srmt

    Newbie

  • New Members
  • Pip
  • 7 posts

Posted 02 October 2012 - 02:20 PM

I can't find a way by calling rest api only once. My code calls the api as much as record count in csv file so it works very slowly. What can i do?

<?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
 
?>


#10 jimf

jimf

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts

Posted 03 October 2012 - 02:02 AM

I just tested this with Chrome (my favorite) on OSX and I also could not upload. I got the same error as above. The file does not show up on the UI when you attach it. It works fine in Firefox.

#11 Ivica

Ivica

    Advanced Member

  • Moderators
  • 565 posts

Posted 03 October 2012 - 07:58 AM

I think the problem was in jquery upload plugin we updated, Jason reverted it to previous version, so with next stable release this issue should be fixed.

#12 BigBen

BigBen

    Newbie

  • New Members
  • Pip
  • 1 posts

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.

 
column_15 >>> Owner
1 username(s) specified were not found. These values will not be used during the import.
 
when you click next it says the following
 
Congratulations! Your import is complete. Below is a summary of the results.
 
    Records created: 0
    Records updated: 0
    Rows with errors: 176

 

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

 







Also tagged with one or more of these keywords: zurmo, csv, import

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users