Area Code Person

Hi there,
how can i add a person with your area code?
If i put “+54 111222333”, no take +54, always spain area code.
Thanks in advance.

Where are you adding the area code? To the Phone field directly or do you mean to the ‘callto’ in Settings?

Thanks David for your help. When I run the curl to insert the new contact, even if I put another area code “+54” or “54” it always puts the Spain code

$data = array(
‘phone’ => array(
array(‘label’ => ‘Telefono’,‘value’ => $AltaTelefono,‘primary’ => True,),
array(‘label’ => ‘TelefonoAlt’,‘value’ => $AltaTelefono2,‘primary’ => False,),
),

Is this for any account you try it on and is the Spain area code placed into the Field itself or is it part of the ‘callto’ hyperlink?

Excuse me but I did not understand correctly, where I am adding the area code and it is not taken is, for example:

data = array ( 'phone' => array ( array ('label' => 'Telephone', 'value' => "+54". AltaTelefono, ‘primary’ => True,),
),

For example, could you send me a visual example of how it looks in the UI after adding a phone number this way? And does it happen for every account?

Thanks david, attach an image. Yes, happend for every account.

Sorry for the wait, but I was able to replicate this. I didn’t realize before that you were doing this on an account with the new Caller feature.

As of right now, you can insert any area code (besides the default for the account) via the API. I’ll let the team in charge of this feature know and hopefully we can get this updated.

Thanks David!
Regards,
Paul

Hey Paul,

I worked it again and now there’s no issues. Could you send me the actual code you’re using? (you can also try via Postman or something similar).

Thanks David for your answer! It worked!
I attach the code that I use to add a contact to the pipedrive
I accept suggestions.
Cheers
Paul
$Data = array();
$name = $AltaNombre." ".$AltaApellido;
$persons = array(‘name’ => $name);
$ch1 = curl_init();
curl_setopt($ch1, CURLOPT_URL, $url1);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch1, CURLOPT_POST, true);
curl_setopt($ch1, CURLOPT_POSTFIELDS, $persons);
$output1 = curl_exec($ch1);
curl_close($ch1);

$result1 = json_decode($output1, true);
$IdPipe=($result1['data']['id']);

	$data = array(
		'phone' => array(
			array('label' => 'Telefono','value' => trim($AltaTelefono),'primary' => True,),
			array('label' => 'TelefonoAlt','value' => trim($AltaTelefono2),'primary' => False,),
		),
		'email' => array(
			array('label' => 'Email', 'value' => trim($AltaEmail),'primary' => True,),
			array('label' => 'Email Alt', 'value' => trim($AltaEmail2),'primary' => False,),		
		),
		'notes' => $AltaNotas
	);		

// URL for updating a Deal 
$url = 'https://api.pipedrive.com/v1/persons/' . $IdPipe . '?api_token=

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));

$output = curl_exec($ch);
curl_close($ch);
1 Like