API

Bloomerang.js

Bloomerang.js uses a public key API. It takes information from a form and submits it to an API endpoint on Bloomerang’s servers. It allows anyone to add donations and interactions to Bloomerang. Only constituent records can be updated, such as with a new address. These characteristics make Bloomerang.js perfect for online forms. You can also use Bloomerang Payments to avoid processing credit cards yourself.

Data Functions

[ 1 ]

Bloomerang.useKey(publicKey)

This function uses the public key to submit the form to the correct organization. Get the public key by clicking Settings >Integrations >API Keys v1.0 and copying the Public API Key.

ParameterRequiredDescription
publicKeyrequiredA string that begins with pub_
[ 2 ]

Bloomerang.useProcessor(id, type, publicKey, isTestMode, bluePayTPS, restrictBPCredit)

Tells Bloomerang which processor to post the credit card or EFT information to. Use this function only if the form uses BluePay and supports EFT. Otherwise, Spreedly handles credit card processing.

ParameterRequiredDescription
idrequiredThe Bloomerang ID of the processor. Get the ID by clicking Settings, View All Settings in Bloomerang. ClickEdit on the Transactions tile, and then Credit Card Processors. Also see How to Get Bloomerang IDs.
typerequiredValid value is BluePay
publicKeyrequiredThe BluePay processor’s public key. Find this in the Account ID field of the processor’s page in Bloomerang.
isTestModeoptionalA boolean value telling whether the processor is in test mode. Defaults to false.
bluePayTPSrequiredThe MD5 hash of the string concatenation of the BluePay private key and the string AUTH0ACH. For example, if the BluePay private key were 1111, bluePayTPS would be the MD5 hash of 1111AUTH0ACH, or c8fc6dfcf7fd6373a2b0d4154a4cb709.
restrictBPCreditrequiredA boolean value. Must be true. Ensures that bad guys can’t use the BluePay TPS to authorize credit cards fraudulently.
[ 3 ]

Bloomerang.useDonationId(id)

Tells Bloomerang which donation form you are using.

ParameterRequiredDescription
idrequiredThe ID associated with this form. See How to Get Bloomerang IDs.

Account Data Functions

[ 1 ]

Bloomerang.Account.individual()

Sets the account type of the constituent to Individual (a person, not an organization).

[ 2 ]

Bloomerang.Account.organization()

Sets the account type of the constituent to Organization (not an individual).

[ 3 ]

Bloomerang.Account.organizationName(name)

Sets the full name of the organization. Also calls Bloomerang.Account.organization() to set the type of the account to Organization.

ParameterRequiredDescription
namerequiredThe full name of the organization
[ 4 ]

Bloomerang.Account.firstName(name)

Sets the constituent’s first name. This does not set the account type to Individual. If the account is already set to Organization, first call Bloomerang.Account.individual().

ParameterRequiredDescription
namerequiredThe constituent’s first name
[ 5 ]

Bloomerang.Account.middleName(name)

Sets the constituent’s middle name. This does not set the account type to Individual. If the account is already set to Organization, first call Bloomerang.Account.individual().

ParameterRequiredDescription
namerequiredThe constituent’s middle name
[ 6 ]

Bloomerang.Account.lastName(name)

Sets the constituent’s last name. This does not set the account type to Individual. If the account is already set to Organization, first call Bloomerang.Account.individual().

ParameterRequiredDescription
namerequiredThe constituent’s last name
[ 7 ]

Bloomerang.Account.prefix(value)

Sets the constituent’s name prefix. This does not set the account type to Individual. If the account is already set to Organization, first call Bloomerang.Account.individual().

ParameterRequiredDescription
valuerequiredThe constituent’s name prefix. Valid values are: Mr, Miss, Ms, Mrs, Master, Rev, Pastor, Fr, Dr, Atty, Prof, Hon, Pres, Coach , Gov, Sir, Rep, Sen, Pvt, Sgt, Maj, Capt, Cmdr, Lt, Col, Gen, Rabbi, Sr
[ 8 ]

Bloomerang.Account.suffix(value)

Sets the constituent’s name suffix. This does not set the account type to Individual. If the account is already set to Organization, first call Bloomerang.Account.individual().

ParameterRequiredDescription
valuerequiredThe constituent’s name suffix. Valid values are: Jr, Sr, II, III, IV, V, Esq, PhD, MD, DDS
[ 9 ]

Bloomerang.Account.informalName(name)

Sets the constituent’s informal name. This does not set the account type to Individual. If the account is already set to Organization, first call Bloomerang.Account.individual().

If this is not called, the informal name defaults to the constituent’s first name.

ParameterRequiredDescription
namerequiredThe constituent’s informal name
[ 10 ]

Bloomerang.Account.formalName(name)

Sets the constituent’s formal name. This does not set the account type to Individual. If the account is already set to Organization, first call Bloomerang.Account.individual().

If this is not called, the informal name defaults to prefix lastName. If no prefix is specified, it defaults to firstName lastName.

ParameterRequiredDescription
namerequiredThe constituent’s formal name
[ 11 ]

Bloomerang.Account.envelopeName(name)

Sets the constituent’s envelope name. This is the name that should be printed on mailing labels. This does not set the account type to Individual. If the account is already set to Organization, first call Bloomerang.Account.individual().

If this is not called, the envelope name defaults to prefix firstName lastName suffix.

ParameterRequiredDescription
namerequiredThe constituent’s envelope name
[ 12 ]

Bloomerang.Account.recognitionName(name)

Sets the constituent’s recognition name. This does not set the account type to Individual. If the account is already set to Organization, first call Bloomerang.Account.individual().

If this is not called, the recognition name defaults to prefix firstName middleName lastName suffix.

ParameterRequiredDescription
namerequiredThe constituent’s recognition name
[ 13 ]

Bloomerang.Account.jobTitle(title)

Sets the constituent’s job title.

ParameterRequiredDescription
titlerequiredThe constituent’s job title
[ 14 ]

Bloomerang.Account.employer(name)

Sets the name of the constituent’s employer.

ParameterRequiredDescription
namerequiredThe constituent’s employer
[ 15 ]

Bloomerang.Account.website(url)

Sets the constituent’s website.

ParameterRequiredDescription
urlrequiredThe URL of the constituent’s website
[ 16 ]

Bloomerang.Account.facebook(id)

Sets the constituent’s Facebook account.

ParameterRequiredDescription
idrequiredThe constituent’s Facebook page URL
[ 17 ]

Bloomerang.Account.twitter(id)

Sets the constituent’s Twitter account.

ParameterRequiredDescription
idrequiredThe constituent’s Twitter handle
[ 18 ]

Bloomerang.Account.linkedInId(id)

Sets the constituent’s LinkedIn account.

ParameterRequiredDescription
idrequiredThe constituent’s LinkedIn URL
[ 19 ]

Bloomerang.Account.gender(value)

Sets the constituent’s gender.

ParameterRequiredDescription
valuerequiredThe constituent’s gender. Valid values are Male, Female, or Other
[ 20 ]

Bloomerang.Account.birthdate(date)

Sets the constituent’s date of birth.

ParameterRequiredDescription
daterequiredThe constituent’s date of birth. String in yyyy-mm-dd format.
[ 21 ]

Bloomerang.Account.homePhone(number, ext)

Sets the constituent’s primary phone number, with a type of Home. Shortcut for Bloomerang.Account.setPhone(Home). You can only set one phone number on a constituent via forms.

When the phone number is submitted, it is added as a new phone number and marked as primary. If the constituent already has that phone number, it is marked as primary.

ParameterRequiredDescription
numberrequiredThe constituent’s phone number. String. Add + in front of an international number. For example, +82112223333
extoptionalThe phone number’s extension
[ 22 ]

Bloomerang.Account.workPhone(number, ext)

Sets the constituent’s primary phone number, with a type of Work. Shortcut for Bloomerang.Account.setPhone(Work). You can only set one phone number on a constituent via forms.

When the phone number is submitted, it is added as a new phone number and marked as primary. If the constituent already has that phone number, it is marked as primary.

ParameterRequiredDescription
numberrequiredThe constituent’s phone number. String. Add + in front of an international number. For example, +82112223333
extoptionalThe phone number’s extension.
[ 23 ]

Bloomerang.Account.setPhone(type, number, ext)

Sets the constituent’s primary phone number and specifies the type. You can only set one phone number on a constituent via forms.

When the phone number is submitted, it is added as a new phone number and marked as primary. If the constituent already has that phone number, it is marked as primary.

ParameterRequiredDescription
typerequiredThe type of phone number. Valid values are Home, Work, Mobile, or Fax
numberrequiredThe constituent’s phone number. String. Add + in front of an international number. For example, +82112223333.
extoptionalThe phone number’s extension
[ 24 ]

Bloomerang.Account.homeEmail(address)

Sets the constituent’s primary email address, with a type of Home. Shortcut for Bloomerang.Account.setEmail(Home, address). You can only set one email address on a constituent via forms.

When the email address is submitted, it is added as a new email address and marked as primary. If the constituent already has that email address, it is marked as primary.

ParameterRequiredDescription
addressrequiredThe constituent’s home email address
[ 25 ]

Bloomerang.Account.workEmail(address)

Sets the constituent’s primary email address, with a type of Work. Shortcut for Bloomerang.Account.setEmail(Work, address). You can only set one email address on a constituent via forms.

When the email address is submitted, it is added as a new email address and marked as primary. If the constituent already has that email address, it is marked as primary.

ParameterRequiredDescription
addressrequiredThe constituent’s work email address
[ 26 ]

Bloomerang.Account.setEmail(type, address)

Sets the constituent’s primary email address and specifies the type. You can only set one email address on a constituent via forms.

When the email address is submitted, it is added as a new email address and marked as primary. If the constituent already has that email address, it is marked as primary.

ParameterRequiredDescription
typerequiredThe type of email address. Valid values are Home or Work.
addressrequiredThe constituent’s email address
[ 27 ]

Bloomerang.Account.homeAddress(street, city, state, zip, country)

Sets the constituent’s primary address, with a type of Home. Shortcut for Bloomerang.Account.setAddress(Home). You can only set one address on a constituent via forms.

If the constituent already has an address, Bloomerang normalizes the submitted address (e.g., 123 North 4th Street becomes 123 N 4TH ST), then compares it with existing addresses. If a match is found, the existing address is updated and marked as primary. If not, a new address is added and marked as primary.

If the country is not United States, Canada, or Bermuda, put the entire address in the street argument. Don’t use city, state, or zip.

ParameterRequiredDescription
streetrequiredThe street part of the constituent’s address (e.g., 123 4th Street)
cityoptionalThe city (e.g., Indianapolis)
stateoptionalThe state (e.g., Indiana). Use state abbreviations (IN).
zipoptionalThe ZIP code (e.g., 46216)
countryoptionalThe country code. We recommend the 2- or 3-digit ISO country code. Default is US.
[ 28 ]

Bloomerang.Account.workAddress(street, city, state, zip, country)

Sets the constituent’s primary address, with a type of Work. Shortcut for Bloomerang.Account.setAddress(Work). You can only set one address on a constituent via forms.

Bloomerang normalizes and compares the submitted address against existing addresses. If a match is found, the existing address is updated and marked as primary. If not, a new address is added and marked as primary.

For non-US/Canada/Bermuda addresses, put the entire address in the street argument.

ParameterRequiredDescription
streetrequiredThe street part of the address
cityoptionalThe city
stateoptionalThe state. Use abbreviations.
zipoptionalThe ZIP code
countryoptional2- or 3-digit ISO country code. Default is US.
[ 29 ]

Bloomerang.Account.setAddress(type, street, city, state, zip, country)

Sets the constituent’s primary address and specifies the type. You can only set one address on a constituent via forms.

Bloomerang normalizes the submitted address and compares it against existing addresses. Matches are updated and marked as primary; new addresses are added and marked as primary.

For non-US/Canada/Bermuda addresses, put the entire address in the street argument.

ParameterRequiredDescription
typerequiredThe type of address. Valid values are Home, Work, Vacation.
streetrequiredThe street part of the address
cityoptionalThe city
stateoptionalThe state. Use abbreviations.
zipoptionalThe ZIP code
countryoptional2- or 3-digit ISO country code. Default is US.
[ 30 ]

Bloomerang.Account.customFreeformField(fieldID, value)

Sets a freeform custom field on the constituent account.

ParameterRequiredDescription
fieldIDrequiredThe ID of the custom field
valuerequiredThe value (string, number, or date) that should be set for the field
[ 31 ]

Bloomerang.Account.customPickField(fieldID, valueID1, valueID2, ...)

Sets a pick-one or pick-multiple custom field on the constituent account.

For a pick-one field, only pass in one value’s ID. This value replaces an existing value for that field.

For a pick-multiple field, you can pass in as many value IDs as there are defined values. Each value is a separate argument. Submitted values replace any existing values for that field.

ParameterRequiredDescription
fieldIDrequiredThe ID of the field
valueIDrequiredThe IDs of the values that should be set for the field
[ 32 ]

Bloomerang.Account.clearCustomFields()

Clears all the custom field values on the account. Call this function to remove any selections left over from a previous submission attempt. Then update the custom fields with values from the form.

This does not delete any custom field values in the Bloomerang database.

Donation Data Functions

[ 1 ]

Bloomerang.Donation.date(date)

Deprecated. Bloomerang automatically uses the date the donation was submitted.

[ 2 ]

Bloomerang.Donation.note(text)

Sets the Note field on the donation.

ParameterRequiredDescription
textrequiredThe note to be added to the transaction. String, up to 64KB in length.
[ 3 ]

Bloomerang.Donation.amount(amount)

Sets the donation amount.

ParameterRequiredDescription
amountrequiredThe amount of the donation. String (with U.S. formatting, $5.00) or number (5).
[ 4 ]

Bloomerang.Donation.nonDeductible(amount)

Sets the nondeductible part of the donation amount. (The tax-deductible part is amount minus nonDeductible.)

ParameterRequiredDescription
amountrequiredThe nondeductible amount. Number.
[ 5 ]

Bloomerang.Donation.fundID(id)

Sets the fund for the donation.

If the submitted fund does not exist in Bloomerang, the transaction defaults to the form’s first fund.

ParameterRequiredDescription
idrequiredThe fund’s Bloomerang ID
[ 6 ]

Bloomerang.Donation.campaign(name)

Sets the campaign for the donation. This overrides any campaign set in the Bloomerang form builder.

This function does not create campaigns in Bloomerang. First create the campaign in Bloomerang, then use the exact name on your form.

ParameterRequiredDescription
namerequiredThe name of the campaign as set in Bloomerang. If the name changes, update the form to use the new name. Defaults to the campaign set in Bloomerang’s form builder.
[ 7 ]

Bloomerang.Donation.appeal(name)

Sets the appeal for the donation. This overrides any appeal set in the Bloomerang form builder.

This function does not create appeals in Bloomerang. First create the appeal in Bloomerang, then use the exact name on your form.

ParameterRequiredDescription
namerequiredThe name of the appeal as set in Bloomerang. If the name changes, update the form to use the new name. Defaults to the appeal set in Bloomerang’s form builder.
[ 8 ]

Bloomerang.Donation.tribute(name)

Sets the tribute for the donation.

This function does not create tributes in Bloomerang. First create the tribute in Bloomerang, then use the exact name on your form.

ParameterRequiredDescription
namerequiredThe name of the existing tribute as set in Bloomerang. If the name changes, update the form to use the new name.
[ 9 ]

Bloomerang.Donation.tributeType(name)

Sets the donation’s tribute type.

ParameterRequiredDescription
namerequiredThe name of the tribute type. Valid values are In Honor of, In Memory of.
[ 10 ]

Bloomerang.Donation.customFreeformField(fieldID, value)

Sets a custom field on the donation. The constituent can type anything into this field.

ParameterRequiredDescription
fieldIDrequiredThe field’s Bloomerang ID
valuerequiredValid formats are string, number, date
[ 11 ]

Bloomerang.Donation.customPickField(fieldID, valueID1, valueID2, ...)

Sets a custom field on the donation. The constituent can pick one or more values, depending on how the field was created in Bloomerang.

This function replaces the field’s values on the JavaScript object.

ParameterRequiredDescription
fieldIDrequiredThe field’s Bloomerang ID
valueID(s)requiredThe values’ Bloomerang IDs. For pick-one fields, pass in one valueID. For pick-multiple fields, pass in multiple valueIDs, each as a separate argument.
[ 12 ]

Bloomerang.Donation.clearCustomFields()

Clears all the custom field values for the donation. Call this function to remove any selections left over from a previous submission attempt. Then update the custom fields with values from the form.

This does not delete any custom field values in the Bloomerang database.

Recurring Donation Data Functions

[ 1 ]

Bloomerang.RecurringDonation.date(date)

Deprecated. Bloomerang automatically uses the date the recurring donation was submitted.

The start date of a recurring donation is set using Bloomerang.RecurringDonation.startDate.

[ 2 ]

Bloomerang.RecurringDonation.note(text)

Sets the Note field on the recurring donation.

ParameterRequiredDescription
textrequiredThe note to be added to the transaction. String, up to 64KB in length.
[ 3 ]

Bloomerang.RecurringDonation.amount(amount)

Sets the amount of the recurring donation. The amount is charged at each interval specified by Bloomerang.RecurringDonation.frequency(value).

ParameterRequiredDescription
amountrequiredThe amount of the recurring donation
[ 4 ]

Bloomerang.RecurringDonation.nonDeductible(amount)

Sets the nondeductible part of the recurring donation amount. (The tax-deductible part is amount minus nonDeductible.)

ParameterRequiredDescription
amountrequiredThe nondeductible amount. Number. Does not accept strings.
[ 5 ]

Bloomerang.RecurringDonation.fundID(id)

Sets the fund for the recurring donation.

If the submitted fund does not exist in Bloomerang, the transaction defaults to the form’s first fund.

ParameterRequiredDescription
idrequiredThe fund’s Bloomerang ID
[ 6 ]

Bloomerang.RecurringDonation.campaign(name)

Sets the campaign for the recurring donation. This overrides any campaign set in the Bloomerang form builder.

This function does not create campaigns in Bloomerang. First create the campaign in Bloomerang, then use the exact name on your form.

ParameterRequiredDescription
namerequiredThe campaign name as set in Bloomerang. Defaults to the campaign set in the form builder.
[ 7 ]

Bloomerang.RecurringDonation.appeal(name)

Sets the appeal for the recurring donation. This overrides any appeal set in the Bloomerang form builder.

This function does not create appeals in Bloomerang. First create the appeal in Bloomerang, then use the exact name on your form.

ParameterRequiredDescription
namerequiredThe appeal name as set in Bloomerang. Defaults to the appeal set in the form builder.
[ 8 ]

Bloomerang.RecurringDonation.tribute(name)

Sets the tribute for the current recurring donation.

This function does not create tributes in Bloomerang. First create the tribute in Bloomerang, then use the exact name on your form.

ParameterRequiredDescription
namerequiredThe name of the existing tribute as set in Bloomerang.
[ 9 ]

Bloomerang.RecurringDonation.tributeType(name)

Sets the recurring donation’s tribute type.

ParameterRequiredDescription
namerequiredThe name of the tribute type. Valid values are In Honor of, In Memory of.
[ 10 ]

Bloomerang.RecurringDonation.frequency(value)

Sets how often the recurring donation should occur.

ParameterRequiredDescription
valuerequiredThe frequency of the recurring donation. Valid values are Weekly, Monthly, Quarterly, Yearly. Invalid values default to Monthly.
[ 15 ]

Bloomerang.RecurringDonation.startDate(date)

Sets the date when the recurring donation should start processing payments. This is not the same as Bloomerang.RecurringDonation.date, which is when the form was submitted.

If the start date is the same as the current date, the first payment processes immediately. Otherwise, it occurs in the early morning of the start date (UTC time).

Time zones can set the start date earlier than the donation’s date. If this happens, Bloomerang changes the start date to match the donation’s date. The payment processes immediately.

ParameterRequiredDescription
daterequiredThe date on which the recurring donation should start processing donations. String in yyyy-mm-dd format.
[ 16 ]

Bloomerang.RecurringDonation.customFreeformField(fieldID, value)

Sets a custom field on the recurring donation. The constituent can type anything into this field.

ParameterRequiredDescription
fieldIDrequiredThe field’s Bloomerang ID
valuerequiredValid formats are string, number, date
[ 17 ]

Bloomerang.RecurringDonation.customPickField(fieldID, valueID1, valueID2, ...)

Sets a custom field on the donation. The constituent can pick one or more values, depending on how the field was created in Bloomerang.

This function replaces the field’s values on the JavaScript object.

ParameterRequiredDescription
fieldIDrequiredThe field’s Bloomerang ID.
valueID(s)requiredThe values’ Bloomerang IDs. For pick-one fields, pass in one valueID. For pick-multiple fields, pass in multiple valueIDs, each as a separate argument.
[ 18 ]

Bloomerang.RecurringDonation.clearCustomFields()

Clears all the custom fields for the donation. Call this function to remove any selections left over from a previous submission attempt. Then update the custom fields with values from the form.

This does not delete any custom field values in the Bloomerang database.

Credit Card Data Functions

[ 1 ]

Bloomerang.CreditCard.spreedlyToken(token)

Sets the Spreedly token for processing a credit card. Spreedly is a service that reduces PCI compliance scope by securely handling credit card processing. Bloomerang recommends using the Spreedly Express Payment Widget to obtain a Spreedly token.

ParameterRequiredDescription
tokenrequiredThe Spreedly token that should be charged.
[ 2 ]

Bloomerang.CreditCard.expirationMonth(month)

The month the credit card expires.

ParameterRequiredDescription
monthrequiredThe expiration month.
[ 3 ]

Bloomerang.CreditCard.expirationYear(year)

The year the credit card expires.

ParameterRequiredDescription
yearrequiredThe expiration year.

In Kind Data Functions

[ 1 ]

Bloomerang.InKind.marketValue(value)

The gift’s fair market value.

ParameterRequiredDescription
valuerequiredThe gift’s fair market value. String in U.S. formatting, or number.
[ 2 ]

Bloomerang.InKind.description(text)

Sets the description of the in-kind gift.

ParameterRequiredDescription
textrequiredThe description of the gift. Up to 255 characters.
[ 3 ]

Bloomerang.InKind.type(type)

Sets the type of gift (goods or services).

ParameterRequiredDescription
typerequiredThe type of gift. Valid values are Goods, Services.

Check Data Functions

[ 1 ]

Bloomerang.Check.number(number)

Sets the check number.

ParameterRequiredDescription
numberrequiredThe check number
[ 2 ]

Bloomerang.Check.date(date)

Sets the date of the check.

ParameterRequiredDescription
daterequiredThe date the check was written. String in yyyy-mm-dd format.

EFT Data Functions

[ 1 ]

Bloomerang.Eft.type(type)

Sets the type of EFT account (checking or savings).

ParameterRequiredDescription
typerequiredThe EFT account type. Valid values are Checking, Savings.
[ 2 ]

Bloomerang.Eft.checking()

Sets the EFT account type to Checking. Shortcut for Bloomerang.Eft.type(Checking).

[ 4 ]

Bloomerang.Eft.accountNumber(number)

Sets the account number that will be charged with the EFT.

ParameterRequiredDescription
numberrequiredThe account number that will be charged
[ 5 ]

Bloomerang.Eft.routingNumber(number)

Sets the bank’s nine-digit routing number.

ParameterRequiredDescription
numberrequiredThe routing number for the EFT account

Interaction Data Functions

[ 1 ]

Bloomerang.Interaction.date(date)

Sets the Date on the timeline that the new interaction should have.

ParameterRequiredDescription
daterequiredThe date of the interaction
[ 2 ]

Bloomerang.Interaction.subject(subject)

Sets the Subject for the new interaction.

ParameterRequiredDescription
subjectrequiredThe subject of the interaction. String, up to 255 characters.
[ 3 ]

Bloomerang.Interaction.note(note)

Sets the Note for the new interaction.

ParameterRequiredDescription
noteoptionalThe note for the new interaction. String, up to 64KB.
[ 4 ]

Bloomerang.Interaction.channel(channel)

Sets the Channel for the new interaction.

ParameterRequiredDescription
channelrequiredThe channel of the new interaction. String. Valid values: Email, Phone, TextMessage, Mail, InPerson, SocialMedia, Website, Other.
[ 5 ]

Bloomerang.Interaction.purpose(purpose)

Sets the purpose for the new interaction.

ParameterRequiredDescription
purposerequiredThe purpose of the new interaction. String. Valid values: Acknowledgement, ImpactCultivation, Newsletter, Receipt, Solicitation, SpecialEvent, VolunteerActivity, PledgeReminder, Welcome, Other.
[ 6 ]

Bloomerang.Interaction.inbound(inbound)

Sets the interaction as inbound. An inbound interaction is one initiated by the constituent.

ParameterRequiredDescription
inboundrequiredSets the interaction as inbound or not. Boolean.
[ 7 ]

Bloomerang.Interaction.customFreeformField(fieldID, value)

Sets a custom field on the interaction. The constituent can type anything into this field.

ParameterRequiredDescription
fieldIDrequiredThe field’s Bloomerang ID.
valuerequiredValid formats are string, number, date
[ 8 ]

Bloomerang.Interaction.customPickField(fieldID, valueID1, valueID2, ...)

Sets a custom field on the interaction. The constituent can pick one or more values, depending on how the field was created in Bloomerang. This function replaces the field’s values on the JavaScript object.

ParameterRequiredDescription
fieldIDrequiredThe field’s Bloomerang ID.
valueID(s)requiredThe values’ Bloomerang IDs. For pick-one fields, pass in one valueID. For pick-multiple fields, pass in multiple valueIDs, each as a separate argument.
[ 9 ]

Bloomerang.Interaction.clearCustomFields()

Clears all the custom field values for the interaction. Call this function to remove any selections left over from a previous submission attempt. Then update the custom fields with values from the form.

This does not delete any custom field values in the Bloomerang database.

Submission Data Functions

[ 1 ]

Bloomerang.Api.donate()

Posts a one-time donation to Bloomerang. Set up all the data you want to post using the data functions before calling this function. Or set up the data as part of your Bloomerang.Api.OnSubmit handler.

[ 2 ]

Bloomerang.Api.recurringDonate()

Posts a recurring donation to Bloomerang. Set up all the data you want to post using the data functions before calling this function. Or set up the data as part of your Bloomerang.Api.OnSubmit handler.

[ 3 ]

Bloomerang.captchaResponse(response)

Google reCAPTCHA sends a Base64-encoded response to the form after client-side validation. Use this function to pass the CAPTCHA response from Google to Bloomerang.

For this function to work, CAPTCHA must be turned on in Bloomerang for the type of form you are using (transaction or interaction).

ParameterRequiredDescription
responserequiredThe CAPTCHA response from Google.
[ 4 ]

Bloomerang.continueFinancialSubmission(form)

This helper function checks that you are not submitting financial information more than once. Call this immediately before submitting the form. If it returns true, the form has not been submitted. If it returns false, do not continue the submission — another submission for the same form is already in progress.

ParameterRequiredDescription
formrequiredThe form’s JavaScript DOM element
[ 5 ]

Bloomerang.cancelFinancialSubmission(form)

A helper function to clear the restriction set by Bloomerang.continueFinancialSubmission(). Call this when you are finished processing the form — for example, after an error response or when you want the constituent to be able to submit the form again.

ParameterRequiredDescription
formrequiredThe form’s JavaScript DOM element
[ 6 ]

Bloomerang.Api.submitInteraction()

Posts a new Interaction to Bloomerang. Set up all the data you want to post using the data functions before calling this function. Or set up the data as part of your Bloomerang.Api.OnSubmit handler.