php-api icon indicating copy to clipboard operation
php-api copied to clipboard

Set owner on contact creation?

Open ahansson89 opened this issue 9 years ago • 9 comments

Is it possible to define the owner when creating a contact?

ahansson89 avatar Feb 23 '16 23:02 ahansson89

Hi @ahansson89,

It is not possible while creating contact.

But you can do at next step after creating contact as per your requirements.

======================code for changing ================

$form_fields = array( 'owner_email' => urlencode("[email protected]"), // Owner email you want to change 'contact_id' => urlencode("5740243672104960") // Contact id of which you want to change owner ); $fields_string1 = ''; foreach ($form_fields as $key => $value) { $fields_string1 .= $key . '=' . $value . '&'; }

$updatedContact = curl_wrap("contacts/change-owner", rtrim($fields_string1, '&'), "POST", "application/x-www-form-urlencoded");

echo $updatedContact;

=======================code end==================

for more details : https://github.com/agilecrm/rest-api#118-change-contact-owner

Please contact Agile CRM if need any further help. Thanks

graut avatar Feb 26 '16 11:02 graut

@graut How about changing owner of company? Is this possible and if so what is the call structure?

adsherpa avatar Mar 04 '19 22:03 adsherpa

Hi @adsherpa in Postman you can try like Below select Basic Auth give user name and Password {domain}.agilecrm.com/dev/api/contacts/change-owner/{new_owner_id}/{company_id}

Request type : PUT

Form data(body) : { "id":{company_id} }

for more details : https://github.com/agilecrm/rest-api#118-change-contact-owner

Hope This Help You, Please contact Agile CRM if need any further help. Thanks

rammohan-agile avatar Mar 08 '19 14:03 rammohan-agile

Thank you @rammohan-agile Looks like that works for company. How do we do the same for Deal owner change?

Thank you,

adsherpa avatar Mar 09 '19 00:03 adsherpa

Hi @adsherpa for Deal Owner Chnage , in Postman you can try like Below select Basic Auth give user name and Password

https://{domain}.agilecrm.com/dev/api/opportunity/change-owner/{new_owner_id}/{deal_id}

Request type : PUT

Form data(body) : { "id":{deal_id} }

for more details : https://github.com/agilecrm/rest-api#31-listing-deals

Hope This Help You, Please contact Agile CRM if need any further help. Thanks

rammohan-agile avatar Mar 11 '19 10:03 rammohan-agile

hi @adsherpa and @ahansson89 Hope above solutions will solve your issues , please let me know if You people have Query's .

Thanks
Agile Support Team.

rammohan-agile avatar Mar 14 '19 07:03 rammohan-agile

Hi @rammohan-agile Thank you very much for those replies with the solution. Yes, they are helpful. I do have questions regarding merging company and contacts. Should I create new issue or can you reopen this? Let me know, I think new issue maybe appropriate since it is different action. Thank you

adsherpa avatar Mar 28 '19 20:03 adsherpa

Hi @aDaneInSpain Can you give us clarity of your Question so we can give better solution, let us know what you are expecting ? . for example if you expecting add existing company to a new contact please follow below url https://github.com/agilecrm/php-api/issues/12

Thanks Agile Support Team.

rammohan-agile avatar Mar 29 '19 10:03 rammohan-agile

hi @rammohan-agile thank you for your prompt reply. Here is my scenario

  • In our system we have say 3 company and each has users under them. All three are also in agilecrm as three separate company and users under each of them as contacts that matches our internal system.
  • Now they want to merge all 3 company under one (first one). And move all users under one company.
  • We have that feature that allows companies and underlying data such as users and data be merge under one company.
  • Now we would like to do the same in agilecrm so we can merge those 3 companies under one (e.g. first company) and move all contacts from other two to this one. I know if agilecrm there is merge duplicate feature through agilecrm portal. I wanted to see if this is available via api as well so I can do the same using api call. Hope this clarifies, let me know.

adsherpa avatar Mar 29 '19 19:03 adsherpa