• Hi,

    I have a problem when integrating the plugin with CF7 and Insightly.
    It is creating contacts with empty fields.

    I guess that maybe the mapping is incorrect, but I have tried several options. Does anybody know exact field for the mapping?

    Please see my debug email below.

    Thank you in advance.

    *** Service ***
    Array
    (
    [name] => Insightly Leads
    [url] => https://api.insight.ly/v2.1/Contacts
    [forms] => Array
    (
    [0] => cf7_2798
    )

    [success] =>
    [failure] =>
    [timeout] => 10
    [as-xpost] => json
    [xpost-wrapper] => post
    [xpost-header] => Authorization=Basic [base64]API key[/base64]
    [mapping] => Array
    (
    [0] => Array
    (
    [lbl] => The submitter name
    [src] => your-name
    [3rd] => FIRST_NAME
    )

    [1] => Array
    (
    [lbl] => The submitter name
    [src] => your-name
    [3rd] => LAST_NAME
    )

    )

    [separator] => ,
    )

    *** Post (Form) ***
    http://my website/
    Array
    (
    [_wpcf7] => 2798
    [_wpcf7_version] => 4.3
    [_wpcf7_locale] => en_US
    [_wpcf7_unit_tag] => wpcf7-f2798-p2836-o1
    [your-name] => my name
    [your-email] => my email
    [tel-399] => my phone
    [your-company] => company
    [your-title] => title
    [coutrylist] => country
    [_wpcf7_download_id] => 28
    [_wpcf7_is_ajax_call] => 1
    )

    *** Post (to Service) ***
    Array
    (
    [timeout] => 10
    [body] => {“post”:{“FIRST_NAME”:”my name”,”LAST_NAME”:”my name”}}
    [headers] => Array
    (
    [Authorization] => Basic MTE1NTQ0YjYtNDVmYy00ZTE5LWJmM2UtZGFjZjk1YWVjMmU5
    [Content-Type] => application/json
    )

    )

    *** Response ***
    Array
    (
    [headers] => Array
    (
    [cache-control] => no-cache
    [pragma] => no-cache
    [content-type] => application/json; charset=utf-8
    [expires] => -1
    [location] => https://api.insight.ly/v2.1/Contacts/169993494
    [server] => Microsoft-IIS/7.5
    [x-powered-by] => ASP.NET
    [date] => Fri, 06 May 2016 20:42:03 GMT
    [connection] => close
    [content-length] => 489
    [set-cookie] => snaptid=sac1prdc01ut04; path=/; HttpOnly; Secure
    )

    [body] => {“CONTACT_ID”:169993494,”SALUTATION”:null,”FIRST_NAME”:null,”LAST_NAME”:null,”BACKGROUND”:null,”IMAGE_URL”:”http://s3.amazonaws.com/insightly.userfiles/432102/”,”DEFAULT_LINKED_ORGANISATION”:null,”OWNER_USER_ID”:756781,”DATE_CREATED_UTC”:”2016-05-06 20:42:04″,”DATE_UPDATED_UTC”:”2016-05-06 20:42:04″,”VISIBLE_TO”:”EVERYONE”,”VISIBLE_TEAM_ID”:null,”VISIBLE_USER_IDS”:null,”CUSTOMFIELDS”:[],”ADDRESSES”:[],”CONTACTINFOS”:[],”DATES”:[],”TAGS”:[],”LINKS”:[],”CONTACTLINKS”:[],”EMAILLINKS”:[]}

    [response] => Array
    (
    [code] => 201
    [message] => Created
    )

    [cookies] => Array
    (
    [0] => WP_Http_Cookie Object
    (
    [name] => snaptid
    [value] => sac1prdc01ut04
    [expires] =>
    [path] => /
    [domain] => api.insight.ly
    [httponly] =>
    [secure] =>
    )

    )

    [filename] =>
    )

    https://wordpress.org/plugins/forms-3rdparty-integration/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author zaus

    (@zaus)

    Normally I’d say you’re not sending enough detail for Insightly to know where to map it (like, some kind of lead/form identifier) but looking at their API seems like you don’t need to? https://api.insight.ly/v2.1/Help/ApiController/Contacts

    I did notice a suggestion on https://api.insight.ly/v2.1/Help

    Write/Update Requests

    When creating and updating onjects via the API, it is important to use valid identifiers, for example when linking an organization to a contact, you must provide a valid CONTACT_ID and ORGANISATION_ID, which if you do not already have, you will need to look up. A good troubleshooting technique is to create objects and populate them with representative data via the Insightly web application, and then access them via the REST API to inspect their object graphs.

    Maybe that’ll help in narrowing down any mapping problems?

    Plugin Author zaus

    (@zaus)

    Oh wait, I think I just figured out the problem — you’ve left the default “wrapper” alone (value = post), meaning it’s wrapping your request under the “post” key:

    [body] => {"post":{"FIRST_NAME":"my name","LAST_NAME":"my name"}}

    Try emptying out that field.

    Thread Starter arev

    (@arev)

    Hi zaus,

    Thank you very much for your support. You helped me a lot. The problem really was connected with the wrapper value set to post.

    Thank you again!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Integration with Insightly’ is closed to new replies.