Support » Plugin: UpiCRM – Leads Management and Contact Form DB for WordPress » Insert enquiry into separate db

Viewing 15 replies - 1 through 15 (of 29 total)
  • Plugin Author upi

    (@upi)

    Hello there and thanks for asking !

    I’ve cosulted with the dev team, looks like we’ll need to develop some api hooks for you.

    Can you a bit more specific in your request so we can make sure we respond to your need ?
    Thanks

    Uri

    Thank you very much for looking at this for me…

    I have one enquiry from on this page

    Contact

    when the form is submitted I would like to store the form fields, plus the source of the lead into a separate db that my client uses as a CRM system.

    Any help appreciated!

    Deb x

    Plugin Author upi

    (@upi)

    Hi again,
    We have used UpiCRM to integrate a WordPree site with Zoho crm using zoho mail to lead feature. (Zoho creator)

    In order to make it work we have the option to send leads in plain text – see in the general settings screen send mail as plain text.
    see documentation
    Do you have this option ? Can this work for you ?
    Please let us know, if not we will develope what you request.
    Thanks
    Uri

    No, sorry I don’t think so…..

    I think I need to be able to do one of these two options:

    1. add an insert sql statement to the other db using the fields form the contact form ie

    connect to other db
    INSERT INTO TableName (field1, field2, field3, field4, field4, field6, field7) VALUES (‘$field1’, ‘$field2’, ‘$field3’, ‘$field4’, ‘$field5’, ‘$field6’, ‘$field7’ )”);

    or

    2. Post a string that will add the content to the db (I have this set up for another lead gen client) ie

    $textsring = ‘URL?field1=’ . $field1 . ‘&field2=’ . $field2 . ‘&field3=’….etc’;

    $ch = curl_init($textsring);
    curl_exec ($ch);
    curl_close ($ch);

    Hope that helps?

    Plugin Author upi

    (@upi)

    Hi
    I believe it does.
    We will develop api hooks. Hold on for a couple of days and we will release a new version for you.
    Uri

    awesome – thank you!

    Any news on the new verison?

    Thanks, Deb

    Plugin Author upi

    (@upi)

    Hi there,
    we’re working on it… we’ll deliver in a couple more days…
    Thanks
    Uri

    fab – thanks…..

    Plugin Author upi

    (@upi)

    Hi,
    getting back to you…!

    we’ve located version 1.8.3 pre release for you at:

    http://www.upicrm.com/wp-content/uploads/2015/06/upicrm-1.8.3.zip
    </>

    It includes hooks in UpiCRM, for the following actions:
    1. New leads
    2. change lead owner
    3. change lead status.

    this is how it should work:

    Action Name: upicrm_after_new_lead
    Located in: classes/upicrm_leads.php
    Example of use:
    function upicrm_hook($lead_id) {
        echo $lead_id;
    }
    add_action( 'upicrm_after_new_lead', 'upicrm_hook' );
    
    Action Name: upicrm_after_lead_change_user
    Located in: classes/upicrm_leads.php
    Example of use:
    function upicrm_hook($lead_id) {
        echo $lead_id;
    }
    add_action( 'upicrm_after_lead_change_user', 'upicrm_hook' );
    
    Action Name: upicrm_after_lead_change_status
    Located in: classes/upicrm_leads.php
    Example of use:
    function upicrm_hook($lead_id) {
        echo $lead_id;
    }
    add_action( 'upicrm_after_lead_change_status', 'upicrm_hook' );

    ——————–

    I believe it is “thin”, but hopefully it will answer your need.
    If you need more, just let us know.

    Any feedback – please share.
    Thanks
    Uri

    Plugin Author upi

    (@upi)

    Hi
    Have you had the chance to check it out?
    Please let us know so we can mark the thread as resolved.
    Thanks
    Uri

    thanks for this – just got round to having a look….

    Can you confirm he best way to use this….

    do I add this to my functions.php

    add_action( 'upicrm_after_new_lead', 'upicrm_hook' );

    connect to other db
    INSERT INTO TableName (field1, field2, field3, field4, field4, field6, field7) VALUES (‘$field1’, ‘$field2’, ‘$field3’, ‘$field4’, ‘$field5’, ‘$field6’, ‘$field7’ )”);

    if so what variables do I use for the text input fields?

    Thanks

    would really appreciate some further guidance on how to implement my code and how to use the form fields….

    Thanks
    Deb

    Plugin Author upi

    (@upi)

    Hi,
    The Information is stored as JSON and returns the ID saved in DB.

    You can use it to read from DB:
    UpiCRMLeads :: get_by_id ($ lead_id)
    What is relevant mostly is lead_content.

    If you want to get all the information (data) by fields of UPI, then it is a little more complex.
    You can look for function wp_ajax_excel_output_callback in upicrm_admin_lists file.
    There is a loop that starts like this:
    foreach ($ getLeads as $ leadObj)
    This will certainly be a good starting point…
    Does that help, or do you need more assistance?

    may be a little more, I think I will be able to do it from what you have said, but it will be a lot of trial and error……how much would you charge to sort some code to add to my functions.php or a plugin for me if I gave you the correct DB details?

    Thanks

Viewing 15 replies - 1 through 15 (of 29 total)
  • The topic ‘Insert enquiry into separate db’ is closed to new replies.