Sustained Giving through API using Designated Giving Donation Level

Options
Hello friends! I'm going to attempt to give as complete of a picture as I can, sorry if I add too much below. Better to have too much info than too little though.


We recently added the Designated Giving option to our donation form. When we did, the "Monthly Gift" option we had stopped working. Our partners said I need to remove the parts of my form that had the 'sustaining.frequency' and 'sustaining.duration' and instead pass in the name="level_autorepeat" on the monthly giving checkbox, but only when it's checked. A little jquery script to add that attribute and we're golden. I did a test and the donation went through, but the gift doesn't show up in the "Sustain Gifts" tab under the Donation Management section of our Luminate backend. A look at the API logs shows that the transaction went through OK and that the 'level_autorepeat=on' parameter did pass through. 


See the attached file for the recurring gift options in the donor screen. 


Here's the pertinent code that I'm using below. I'm using the luminateExtend that Noah Cooper wrote, in case that matters any.
<input id="sustaining" class="cb_sustaining" type="checkbox" /><label style="padding-left: 8px;"><strong>Make this a monthly gift.</strong></label></p>

Designate your gift:<select name="designated.1.id">

<option value="1001">Where Needed Most</option>

<option value="1002">Etc</option>

<option value="1003">Etc</option>

</select>

---- further down the page ----

<script>

//handles the designated other amount

$( document ).ready(function() {

      $('input[name="level_id"]').change(function() {

            var currentValue = $(this).data('amount');

            if (currentValue !== 'other') {

                $('#other-amount').attr('disabled', 'disabled').removeAttr('name').val('');

                $('input[name="designated.1.amount"]').val(currentValue);

            } else {

                $('#other-amount').removeAttr('disabled').attr('name', 'other_amount').focus();

                $('input[name="designated.1.amount"]').val('');

            }

        });

        $('input[name="other_amount"]').bind("keyup change", function() {

            $('input[name="designated.1.amount"]').val(parseFloat($(this).val()));

        });

});

//handles the sustaining checkbox attribute

$('#sustaining').attr('checked', false);

$('#sustaining').on('click', function () {

   if ($('#sustaining').is(':checked')){

      $('#sustaining').attr('name', 'level_autorepeat');

      //console.log('checked');

   } else {

      $('#sustaining').removeAttr('name');

      //console.log('unchecked');

   }

});

</script>

<input name="method" type="hidden" value="donate" />

<input name="form_id" type="hidden" value="####" />

<input name="designated.1.amount" type="hidden" value="" />

<input name="validate" type="hidden" value="true" />


(I included the designated section because it's part of what I saw Noah Cooper post about in an older thread. Just letting you know it's in there and that part works)



At this point, like I said above, the donation is going though, the API logs tell me that level_autoresponder=on was passed, and when I look at Sustained Gifts, I see nothing. I have a report built that shows me the designated gifts and it has some sustaining gift fields added as well, so I run that report and I saw something I didn't expect. 
208b44480a008c71324e396f466e73ab-huge-re

Two things are happening that I don't understand:

First, the tests I did (Christopher), show a number in the Monthly Amount, but doesn't show my Sustaining Gift Status as anything. You can see further down where someone used our older Sustaining Gift method and it's still active. 

Second, even though my last gift shows $2, the Monthly Amount still shows 1, where you can see Alicia shows the $25 she gave.  I ran into this before where people using the "Other Amount" option were getting autoresponder emails that showed they only gave $1, but further down that same email it shows the amount they actually gave. 


All of that above comes down to this question:
Is my form set up properly and anyone who gives a gift with the sustaining gift option checked will be auto-debited each month, or is something still wrong based on what you see and I need to fix something? (Again, the designated option is working fine, I'm only trying to figure out the sustained giving option.)


Thanks for reading and I really appreciate your insight and help!

 
Tagged:

Comments

  • Chris, level_autorepeat parameter is valid only if the donation level has its own recurring behavior. Your shadow donation form looks configured with Designated Giving Donation Level (not Standard Donation Level) and in this case you should keep using sustaining.duration & sustaining.frequency parameters.

    As per your form setup and your code, you will need to:

     
    1- Add a hidden field <input type="hidden" name="sustaining.duration" value="0"/>

    2- Add value="monthly" attribute to your #sustaining checkbox.

    3- Alter jquery line that saying
    $('#sustaining').attr('name', 'level_autorepeat');

    to
    $('#sustaining').attr('name', 'sustaining.frequency');



    Also, try running the standard Donations by Designated Gift report located under Fundrasing > Donation Management > Donation Reports tab. This report will show you all sustaining and designated information you need.
  • Romany Nassief:

    Chris, level_autorepeat parameter is valid only if the donation level has its own recurring behavior. Your shadow donation form looks configured with Designated Giving Donation Level (not Standard Donation Level) and in this case you should keep using sustaining.duration & sustaining.frequency parameters.

    As per your form setup and your code, you will need to:

     

    1- Add a hidden field <input type="hidden" name="sustaining.duration" value="0"/>

    2- Add value="monthly" attribute to your #sustaining checkbox.

    3- Alter jquery line that saying
    $('#sustaining').attr('name', 'level_autorepeat');

    to
    $('#sustaining').attr('name', 'sustaining.frequency');



    Also, try running the standard Donations by Designated Gift report located under Fundrasing > Donation Management > Donation Reports tab. This report will show you all sustaining and designated information you need.

     

    Romany,


    Thanks for the reponse. The Designated Giving Donation Level does have it's own built in recurring behavior, at least from what I can tell (see attached file). I did go ahead and try as you suggested though, and the gift came through with the "One time" status under "Payment Plan".


     

  • Chris Ayres:

    Romany Nassief:

    Chris, level_autorepeat parameter is valid only if the donation level has its own recurring behavior. Your shadow donation form looks configured with Designated Giving Donation Level (not Standard Donation Level) and in this case you should keep using sustaining.duration & sustaining.frequency parameters.

    As per your form setup and your code, you will need to:

     

    1- Add a hidden field <input type="hidden" name="sustaining.duration" value="0"/>

    2- Add value="monthly" attribute to your #sustaining checkbox.

    3- Alter jquery line that saying
    $('#sustaining').attr('name', 'level_autorepeat');

    to
    $('#sustaining').attr('name', 'sustaining.frequency');



    Also, try running the standard Donations by Designated Gift report located under Fundrasing > Donation Management > Donation Reports tab. This report will show you all sustaining and designated information you need.

     

    Romany,


    Thanks for the reponse. The Designated Giving Donation Level does have it's own built in recurring behavior, at least from what I can tell (see attached file). I did go ahead and try as you suggested though, and the gift came through with the "One time" status under "Payment Plan".


     

     

    Did anyone ever find a resolution to this? We're having the same issue as Chris. We are using the Designated Giving Donation Level element in our shadow form as this seems to be the only element type which allows us to pass designee information through the API (see thread). The designee portion is working correctly and donation amounts are getting recorded correctly, but as with Chris, we can't seem to get a monthly recurring option recorded via API using Noah Cooper's luminateExtend. We are currently using sustaining.duration and sustaining.frequency as Romany suggested:


        <input type="hidden" name="method" value="donate">

        <input type="hidden" name="form_id" value="1400">

        <input type="hidden" name="validate" value="true">

        <input name="designated.1.amount" type="hidden" value="">

        <input name="sustaining.duration" type="hidden" value="0">

        <h2>Donation Form</h2>

        <h3>Donation Amount:</h3>

        <div class="form-block">

            <label>

              <input type="radio" name="level_id" value="1863" data-amount="140"> $140

            </label>

            <label>

              <input type="radio" name="level_id" value="1864" data-amount="70"> $70

            </label>

            <label><input id="level-other" class="radio" name="level_id" type="radio" value="1865" data-amount="other"/> Other amount: </label>

            <input id="other-amount" class="form-control" style="width: 170px;" disabled="disabled" name="other_amount" type="text"><br>

            <input id="sustaining_frequency" class="checkbox" name="sustaining.frequency" type="checkbox" value="monthly"><label><strong>Make this a monthly gift.</strong></label>

        </div>

        <h3>Gift Designation</h3>

        <div class="form-block">

          <div class="designated-option">

            <label class="">Designate My Gift To:

              <select name="designated.1.id" id="single_designee" size="1">

                <option selected="selected" value="0">Select a program</option>

                <option value="1022">Medical Supplies</option>

                <option value="1002">Plane Maintenance</option>

                <option value="1023">Test Appeal</option>

              </select>

            </label>

          </div>

        </div>


    Thanks in advance for any help!

  • Tristan McGrath:

    Chris Ayres:

    Romany Nassief:

    Chris, level_autorepeat parameter is valid only if the donation level has its own recurring behavior. Your shadow donation form looks configured with Designated Giving Donation Level (not Standard Donation Level) and in this case you should keep using sustaining.duration & sustaining.frequency parameters.

    As per your form setup and your code, you will need to:

     

    1- Add a hidden field <input type="hidden" name="sustaining.duration" value="0"/>

    2- Add value="monthly" attribute to your #sustaining checkbox.

    3- Alter jquery line that saying
    $('#sustaining').attr('name', 'level_autorepeat');

    to
    $('#sustaining').attr('name', 'sustaining.frequency');



    Also, try running the standard Donations by Designated Gift report located under Fundrasing > Donation Management > Donation Reports tab. This report will show you all sustaining and designated information you need.

     

    Romany,


    Thanks for the reponse. The Designated Giving Donation Level does have it's own built in recurring behavior, at least from what I can tell (see attached file). I did go ahead and try as you suggested though, and the gift came through with the "One time" status under "Payment Plan".


     

     

    Did anyone ever find a resolution to this? We're having the same issue as Chris. We are using the Designated Giving Donation Level element in our shadow form as this seems to be the only element type which allows us to pass designee information through the API (see thread). The designee portion is working correctly and donation amounts are getting recorded correctly, but as with Chris, we can't seem to get a monthly recurring option recorded via API using Noah Cooper's luminateExtend. We are currently using sustaining.duration and sustaining.frequency as Romany suggested:


        <input type="hidden" name="method" value="donate">

        <input type="hidden" name="form_id" value="1400">

        <input type="hidden" name="validate" value="true">

        <input name="designated.1.amount" type="hidden" value="">

        <input name="sustaining.duration" type="hidden" value="0">

        <h2>Donation Form</h2>

        <h3>Donation Amount:</h3>

        <div class="form-block">

            <label>

              <input type="radio" name="level_id" value="1863" data-amount="140"> $140

            </label>

            <label>

              <input type="radio" name="level_id" value="1864" data-amount="70"> $70

            </label>

            <label><input id="level-other" class="radio" name="level_id" type="radio" value="1865" data-amount="other"/> Other amount: </label>

            <input id="other-amount" class="form-control" style="width: 170px;" disabled="disabled" name="other_amount" type="text"><br>

            <input id="sustaining_frequency" class="checkbox" name="sustaining.frequency" type="checkbox" value="monthly"><label><strong>Make this a monthly gift.</strong></label>

        </div>

        <h3>Gift Designation</h3>

        <div class="form-block">

          <div class="designated-option">

            <label class="">Designate My Gift To:

              <select name="designated.1.id" id="single_designee" size="1">

                <option selected="selected" value="0">Select a program</option>

                <option value="1022">Medical Supplies</option>

                <option value="1002">Plane Maintenance</option>

                <option value="1023">Test Appeal</option>

              </select>

            </label>

          </div>

        </div>


    Thanks in advance for any help!

     

    In case anyone comes accross this issue, we were able to get this resolved by switching from the Designated Giving Donation Level question type to the Flexible Designate Giving Donation Level question type in the shadow form. 


    I left everything in the form set up as I had it initially with sustaining.frequency and sustaining.duration inputs with a value of ‘monthly’ for the frequency and a value of ‘0’ for the duration. Switching to flexible was all that needed to happen. Moreover, we are still able to have fixed giving levels in our form with the Flexible element type by using JS to dynamically populate the value of the hidden input designated.1.amount which the API uses to record the gift amount.


    What all this seems to mean is that the API will not recognize these parameters for the ‘Designated Giving Donation Level’ element meaning that, either there are different parameters which must be used in conjunction with this element type (which are not mentioned in the API documentation) or else the use of API to record a sustaining gift via this question type is broken and should be logged as a bug.


     

Categories