CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • How to deal with phone numbers on the locations ?
Pages: [1]

Author Topic: How to deal with phone numbers on the locations ?  (Read 1469 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
How to deal with phone numbers on the locations ?
January 31, 2010, 11:09:31 am
Hi,

I have several addresses (different locations), and several phone numbers, that are or aren't linked with the location.

I want to use an api to update the phone numbers, and delete some specific phone numbers.

How can I use civicrm_location_delete ? I wants a location_type, but it isn't relevant for a phone number or email, is it ?

Or a side note, the location api needs a complex structure as params, might be better to split it on smaller easier to manage apis ?
civicrm_mail_xxx, civicrm_phone_xxx, civicrm_address_xxx ?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to deal with phone numbers on the locations ?
January 31, 2010, 06:48:51 pm

i think the location apis, i.e. the phone/email/address stuff need some bit of work. locations are now just an optional attribute in those columns. we probably want to migrate / upgrade them to being less location centric

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: How to deal with phone numbers on the locations ?
February 01, 2010, 01:20:05 am
I might offer myself to help with that? I have some experience with the API's but need much more solid background on the architecture.....hopefully I will get some of that at the Brussels developer camp. Whilst we are on the subject of API's, I will need to build a number of interfaces for a project (contacts and documents). At the moment I am thinking of making these XML-interfaces so that I can use it for more future projects and make it easier for third parties to link in. How does that sound?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: How to deal with phone numbers on the locations ?
February 01, 2010, 06:23:02 am

can u elaborate a bit more on what you mean by XML interfaces?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: How to deal with phone numbers on the locations ?
February 01, 2010, 06:31:38 am
I have done two conversions of data from other systems to CiviCRM. For the project to come I will have to create an interface between the main transaction system of the customer (an Oracle application) and CiviCRM, where individuals and households are imported. I have done this once during the prototype by reading a CVS-file and transforming that to data that I can use to populate the parameters in the API.
What I would like to do is prescribe an XML-format (for example for individuals) and then create an application that takes data from that XML-file and uses the API to populate the CiviCRM database. In that way I can use the same application to import data from other main transaction systems at clients, and if required I can ask another party to deliver an XML-file rather than explain how their data looks like (which suppliers from closed software sometimes do not want do disclose). Does this make sense?
Erik
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: How to deal with phone numbers on the locations ?
February 01, 2010, 09:19:54 am
Hi,

Did write an import from xml with a very complex structure (it includes groups and relationships, several locations, emails...)

There is a lot of code to deal with cases where some information is already in the db but not in the xml and vice versa, and to be sure we add/remove the delta.

This code would make sense to move into high level apis, as this is the same kind of issues that is probably common with a lot of imports.

We'll discuss it in brussels next week probably.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • How to deal with phone numbers on the locations ?

This forum was archived on 2017-11-26.