PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Form Submission Third Party CRM (Act-On)

  1. opmdesign
    Member

    Hi.

    I am trying to add the submitted form information to a third party CRM (Act-On, https://www.actonsoftware.com). I have read the documentation here and I have some questions.

    I am trying to follow the the instructions from here:

    http://www.gravityhelp.com/documentation/page/Gform_after_submission

    I have created a simple First Name, Last Name and Company form as a test on both Act-On and Gravity Forms. I am NOT using the advanced fields for first name and last, just the single text ones.

    I cannot get this to work. Here is what I have in my functions.php file:

    add_action('gform_after_submission_11', 'post_to_third_party', 10, 2);
    function post_to_third_party($entry, $form) {
    $post_url = 'myurl-to-form';
    $body = array(
            'First Name' => $entry['1'],
            'Last Name' => $entry['3'],
            'Company' => $entry['2']
            );
        $request = new WP_Http();
        $response = $request->post($post_url, array('body' => $body));
    }

    So lets take this one step at a time:
    add_action('gform_after_submission_11', 'post_to_third_party', 10, 2);

    What is 10, 2? I cannot seem to find a reference what these numbers represent.

    From here:
    http://www.gravityhelp.com/documentation/page/Entry_Object

    $entry["date_created"];   // returns the entry date
    $entry["1"];     // returns the value associated with field 1
    $entry["1.3"];   // returns the value associated with the first name portion of a simple name field 1
    $entry["1.6"];   // returns the value associated with the last name portion of a simple name field 1
    $entry["2.4"];   // returns the value associated with the street input for the address field 2

    The first example, I understand. The entry from field 1.
    The second entry I dont understand. I assume the 1 in 1.3 means Field 1? And where does the 3 come from? If I have a advanced name field, I would assume this would read 1.1 for first name and 1.2 for last name? So where does the 6 in Last name come from?

    Do I have to add every field for the data to be submitted? ( 'First Name' => $entry['1'] etc).
    Is there a way for it to submit all fields?

    According to the documentation on Act-On, as long as the form I submitted on Gravity Forms has the same labels as the form on Act-On, it should work.

    Posted 11 years ago on Tuesday June 25, 2013 | Permalink
  2. I'll see if the dev team can assist you here.

    Posted 11 years ago on Friday June 28, 2013 | Permalink
  3. The 10, 2 are the parameters passed to the WordPress function add_action. You can see its documentation here: http://codex.wordpress.org/Function_Reference/add_action . The 10 tells it the priority and the 2 is the number of arguments for the function being called ($entry is one and $form is the second).

    The reference to "1.3" is when you are using the Advanced Name field. It references the individual parts of the Name field. When using the Name field, the First Name is the field id plus ".3", the Last Name is the field id plus ".6". So if the field is field id 1, it would be 1.3 and 1.6.

    You submit the data you want from the entry. If the URL to which you are sending your data only needs certain fields, you can only send those. There is no easy way for you to send all the fields without having some programming knowledge.

    In the example code, where the $body array is being created, you need to name the data whatever label your third party is expecting, so if Act-On expects the first name to be "first_name", then you would write 'first_name' => $entry['1'].

    I noticed in the code you provided that you have not specified a valid URL to which the data will be posted. The $post_url needs to be the full URL to the third-party's page that will be receiving and processing the data.

    I hope that helps.

    Posted 11 years ago on Monday July 1, 2013 | Permalink

This topic has been resolved and has been closed to new replies.