• Resolved milkman1265

    (@milkman1265)


    I am having trouble with the plugin. It creates the First name and last name correctly, but the phone and email doesnt show up on the insightly contacts.

    Below is the webform from insightly:
    <form name=”insightly_web_to_contact” action=”https://googleapps.insight.ly/WebToContact/Create&#8221; method=”post”>
    <input type=”hidden” name=”formId” value=”1234567″/>
    <input id=”insightly_firstName” name=”FirstName”>
    <input id=”insightly_lastName” name=”LastName”>
    <input type=”hidden” name=”emails[0].Label” value=”Work”/>
    <input id=”emails[0]_Value” name=”emails[0].Value” type=”text”/>
    <input type=”hidden” name=”phones[0].Label” value=”Work”/>
    <input id=”phones[0]_Value” name=”phones[0].Value” type=”text”/>
    <input type=”submit” value=”Submit”/></form>

    After mapping it all debug log:
    *** Service ***
    Array
    (
    [name] => Lead Gen
    [url] => https://api.insight.ly/v2.1/Contacts
    [forms] => Array
    (
    [0] => cf7_210
    )

    [success] =>
    [failure] =>
    [timeout] => 10
    [as-xpost] => json
    [xpost-wrapper] =>
    [your-name] => Yup
    [your-email] => yup@gmail.com
    [phone] => 1234567890
    [_wpcf7_is_ajax_call] => 1
    )

    *** Post (to Service) ***
    Array
    (
    [timeout] => 10
    [body] => {“name”:”insightly_web_to_contact”,”formID”:”1234567″,”FIRST_NAME”:”Yup”,”LAST_NAME”:”Yup”,”emails[0].Label”:”Work”,”emails[0].Value”:”yup@gmail.com”,”phones[0].Label”:”Work”,”phones[0].Value”:”1234567890″}
    [headers] => Array
    (
    [Authorization] => Basic YjFhOGMyYTYtYzljNi00YjkwLWFmOWYtNzZmMDg0OTNhZWM3
    [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/162300022
    [server] => Microsoft-IIS/7.5
    [x-powered-by] => ASP.NET
    [date] => Fri, 11 Mar 2016 00:19:29 GMT
    [connection] => close
    [content-length] => 492
    [set-cookie] => snaptid=sac1prdc01ut04; path=/; HttpOnly; Secure
    )

    [body] => {“CONTACT_ID”:162300022,”SALUTATION”:null,”FIRST_NAME”:”Yup”,”LAST_NAME”:”Yup”,”BACKGROUND”:null,”IMAGE_URL”:”http://s3.amazonaws.com/insightly.userfiles/621748/&#8221;,”DEFAULT_LINKED_ORGANISATION”:null,”OWNER_USER_ID”:1060118,”DATE_CREATED_UTC”:”2016-03-11 00:19:30″,”DATE_UPDATED_UTC”:”2016-03-11 00:19:30″,”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

    I notice that if i copy the *** Response *** area
    [body] => {"CONTACT_ID":162299685,"SALUTATION":null,"FIRST_NAME":"last test","LAST_NAME":"last test","BACKGROUND":null,"IMAGE_URL":"http://s3.amazonaws.com/insightly.userfiles/621748/","DEFAULT_LINKED_ORGANISATION":null,"OWNER_USER_ID":1060118,"DATE_CREATED_UTC":"2016-03-11 00:06:46","DATE_UPDATED_UTC":"2016-03-11 00:06:46","VISIBLE_TO":"EVERYONE","VISIBLE_TEAM_ID":null,"VISIBLE_USER_IDS":null,"CUSTOMFIELDS":[],"ADDRESSES":[],"CONTACTINFOS":[],"DATES":[],"TAGS":[],"LINKS":[],"CONTACTLINKS":[],"EMAILLINKS":[]}

    And make one of those fields for example "Background" "123" check is value. the 123 will show up but it wont be dynamic. If i leave is value unchecked, it will not show up at all.

    My assumption is i need to get the response area to show "emails[0].Label":Work,"phones[0].Label":Work

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter milkman1265

    (@milkman1265)

    please delete or close thread, i solved the issue.

    For who ever is wondering, you need to use the LEAD api not Contacts

    https://api.insight.ly/v2.1/Leads

    and the fields to map allowed are:

    “LEAD_ID”: 0,
    “SALUTATION”: “string”,
    “TITLE”: “string”,
    “FIRST_NAME”: “string”,
    “LAST_NAME”: “string”,
    “ORGANIZATION_NAME”: “string”,
    “PHONE_NUMBER”: “string”,
    “MOBILE_PHONE_NUMBER”: “string”,
    “FAX_NUMBER”: “string”,
    “EMAIL_ADDRESS”: “string”,
    “WEBSITE_URL”: “string”,
    “OWNER_USER_ID”: 0,
    “DATE_CREATED_UTC”: “2016-03-11T16:32:00.460Z”,
    “DATE_UPDATED_UTC”: “2016-03-11T16:32:00.460Z”,
    “CONVERTED”: true,
    “CONVERTED_DATE_UTC”: “2016-03-11T16:32:00.460Z”,
    “CONVERTED_CONTACT_ID”: 0,
    “CONVERTED_ORGANIZATION_ID”: 0,
    “CONVERTED_OPPORTUNITY_ID”: 0,
    “VISIBLE_TO”: “string”,
    “RESPONSIBLE_USER_ID”: 0,
    “INDUSTRY”: “string”,
    “LEAD_STATUS_ID”: 0,
    “LEAD_SOURCE_ID”: 0,
    “VISIBLE_TEAM_ID”: 0,
    “EMPLOYEE_COUNT”: 0,
    “LEAD_RATING”: 0,
    “LEAD_DESCRIPTION”: “string”,
    “VISIBLE_USER_IDS”: “string”,
    “CUSTOMFIELDS”: [
    {
    “CUSTOM_FIELD_ID”: “string”,
    “FIELD_VALUE”: {}
    }
    ],
    “ADDRESS_STREET”: “string”,
    “ADDRESS_CITY”: “string”,
    “ADDRESS_STATE”: “string”,
    “ADDRESS_POSTCODE”: “string”,
    “ADDRESS_COUNTRY”: “string”,
    “TAGS”: [
    {
    “TAG_NAME”: “string”
    }
    ],
    “IMAGE_URL”: “string”

    Hi milkman1265

    I have the same problem, as you have described in your first message. But the solution you suggested is not working in my case.

    Could you please let me know if there are some other tricks as well.

    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/&#8221;,”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] =>
    )

    Plugin Author zaus

    (@zaus)

    @arev Did you try the Leads API endpoint he mentioned, rather than the Contacts?

    Yes, in this case I’m getting notification that it has failed. In case of Leads it is not creating anything.

    Thread Starter milkman1265

    (@milkman1265)

    based off of your debug code that you posted.

    It looks like you are using the contacts api and not the leads api.

    I found that when you’re getting Null response, it means you’re not using the correct field mapping.

    Did you also add the formID and name of form in the plugin?

    This is all the mappings i have

    View post on imgur.com

    Thank you for clarifications.

    I have tried to use Leads instead of Contacts, but in this case I get error, and no contact is created.

    When using Contacts, I get contact with empty fields.

    I’ve set all my settings, according to your settings in the image, and hs got the same result: contacts are created, but with empty fields.

    I have the following mapping:
    insightly_web_to_contact – name
    code – formID
    your-name – FIRST_NAME
    your-name – LAST_NAME

    Plugin Author zaus

    (@zaus)

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

The topic ‘Insightly Integration Not creating fields’ is closed to new replies.