Jump to content


Photo

Create lead/contact with API

API Lead Contact

  • Please log in to reply
1 reply to this topic

#1 mahbub

mahbub

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 07 August 2014 - 02:01 PM

Hi,

I was trying to create contacts/leads with Zurmo API. 
I have posted these values:

Array
(
    [firstName] => Michael
    [lastName] => Smith
    [mobilePhone] => 653-235-7821
    [state] => Array
        (
            [id] => 1
        )
    [primaryEmail] => Array
        (
            [emailAddress] => a@example.com
            [optOut] => 0
        )
    [modelRelations] => Array
        (
            [opportunities] => Array
                (
                    [0] => Array
                        (
                            [action] => add
                            [modelId] => 3
                        )
                )
        )
)

It creates the leads, but do not replies with the SUCCESS. 
Instead of response it returns errors:

 

An error has occurred. Please click here to continue to the home page. If the error persists please contact your administrator.

Undefined index: modelClassName

BTW, incase of API error it shows the general error messages. But for SUCCESS system shows the above error.

I wonder if anybody helps in this issue.

Thanks,

Mahbub



#2 Asaa

Asaa

    Member

  • Members
  • PipPip
  • 13 posts
  • LocationQC, Canada

Posted 21 August 2014 - 03:11 PM

Might want to look at the application log and post us how the Exception is thrown by zurmo.

app/protected/runtime/application.log the error should look someting like this: 
 

2014/08/21 08:35:45 [error] [php] Undefined index: Contact (/var/www/public/app/protected/extensions/asteriskbridge/utils/AsteriskBridgeInstallUtil.php:35)
Stack trace:
#0 /var/www/public/yii/framework/base/CComponent.php(558): BeginRequestBehavior->handleResolveCustomData()
#1 /var/www/public/yii/framework/base/CApplication.php(196): WebApplication->raiseEvent()
#2 /var/www/public/yii/framework/base/CApplication.php(167): WebApplication->onBeginRequest()
#3 /var/www/public/app/protected/core/components/WebApplication.php(75): WebApplication->run()
#4 /var/www/public/app/index.php(70): WebApplication->run()
REQUEST_URI=/app/index.php/zurmo/development?resolveCustomData=1

 It will give us more ground on where your request passed and failed.

As for why the lead was still created probably because the exception was thrown after the actual save of the model.







Also tagged with one or more of these keywords: API, Lead, Contact

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users