Organizations

model.CurrentOrgId

Set this to the OrganizationId that should be used for email replacements.

model.AddMembersToOrg(query, orgid)
Parameters:
  • query (str) – see The Query Parameter

  • orgid (int) – The Organization id number to add the person too

model.AddMemberToOrg(pid, orgid)
Parameters:
  • pid (int) – The People id of the individual person to update.

  • orgid (int) – The Organization id number to add the person too.

model.AddOrganization(name, program, division)
Returns:

the OrganizationId

Return type:

int

Parameters:
  • name (str) – the name of the org

  • program (str) – the name of the program

  • division (str) – the name of the division

Creates a new Organization. The program and division will be created if not already existing.

model.AddOrganization(name, templateid, copysettings)
Returns:

the OrganizationId

Return type:

int

Parameters:
  • name (str) – the name of the org

  • templateid (int) – the OrganizationId of the org to be copied

  • copysettings (bool) – the default is to copy the settings, set to False if to prevent.

Creates a new Organization. The templateid allows you to use the same program and division of the template org Entrypoint, OrganizationType, Campus, Status are all copied too. If CopySettings is True, the Schedules are copied as well as FirstMeetingDate, LastMeetingDate, Limit, RegistrationType, RegStart, RegEnd, IsMissionTrip and all Registration Fees, Questions and Messages.

model.AddSubGroup(pid, orgid, group)

Adds a person to a sub-group in the organization.

Parameters:
  • pid (int) – PeopleId

  • orgid (int) – OrganizationId

  • group (str) – The name of the sub-group

model.AddSubGroupFromQuery(query, orgid, group)

Adds multiple org members to a sub-group in the organization using a query.

Parameters:
  • query (str) – see The Query Parameter

  • orgid (int) – OrganizationId

  • group (str) – The name of the sub-group

It is important to have the query only return members of the org. This function will silently skip persons who are not members of the organization.

model.DropOrgMember(pid, orgid)

Drops a person from the organization.

Parameters:
  • pid (int) – PeopleId

  • orgid (int) – OrganizationId

model.InOrg(pid, orgid)
Returns:

True or False whether a person is a member of an organization.

Return type:

bool

Parameters:
  • pid (int) – PeopleId

  • orgid (int) – OrganizationId

model.InSubGroup(pid, orgid, group)

Determines whether a person is in a sub-group in organization

Return type:

boolean

Parameters:
  • pid (int) – PeopleId

  • orgid (int) – OrganizationId

  • group (str) – The name of the sub-group

model.JoinOrg(orgid, person)

Adds the person to the organization as a regular member.

Parameters:
  • person (int,Person) – this can either be a Person object or a PeopleId int

  • orgid (int) – OrganizationId

model.MoveToOrg(pid, fromOrg, toOrg)

Drops person from one org and adds them to another.

Parameters:
  • pid (int) – PeopleId

  • fromOrg (int) – OrganizationId for current membership to drop

  • toOrg (int) – OrganizationId for new membership to add to

model.OrganizationIds(progid, divid, *includeinactive)
Returns:

A list of Organization ids in the respective program and division

Return type:

Enumerable list of int

Parameters:
  • progid (int) – The id number of the Program, or 0 for any program.

  • divid (int) – The id of the Division, or 0 for any division.

  • includeinactive (bool) – *optional default=False. By default no inactive organizations will be included. Pass True to include them.

model.RemoveSubGroup(pid, orgid, group)

Removes a person from a sub-group in the organization.

Parameters:
  • pid (int) – PeopleId

  • orgid (int) – OrganizationId

  • group (str) – The name of the sub-group

model.SetMemberType(peopleid, orgid, type)
Parameters:
  • pid (int) – PeopleId

  • orgid (int) – OrganizationId

  • type (str) – Sets the MemberType of the person in the org

A new MemberType will be created if no type of that name exists.

model.UpdateMainFellowship(orgid)
Parameters:

orgid (int) –

Updates MainFellowship flag on all members, and MemberCounts.

model.AdjustFee(peopleId, orgId, adjustmentAmount, description)
Returns:

The ID of the successfully-added transaction or null if there was a failure

Return type:

int

Parameters:
  • peopleId (int) – The PeopleId for the involvement member for whom you are adding the transaction

  • orgId (int) – The OrganizationId for the involvement

  • adjustmentAmount (decimal) – The amount to adjust the fee; a negative number increases the fee

  • description (str) – Corresponds to the Description field when manually entering a transaction; contents will display when viewing the information icon

The parameters for adjustmentAmount and description correspond to information entered when manually adjusting the fee via the Member Dialog interface.

model.AddTransaction(peopleId, orgId, payment, description)
Returns:

The ID of the successfully-added transaction or null if there was a failure

Return type:

int

Parameters:
  • peopleId (int) – The PeopleId for the involvement member for whom you are adding the transaction

  • orgId (int) – The OrganizationId for the involvement

  • payment (decimal) – The amount of payment

  • description (str) – Corresponds to the Description field when manually entering a transaction; contents will display when viewing the information icon

The parameters for payment and description correspond to information entered when manually adding a transaction via the Member Dialog interface.

model.AddTransaction(peopleId, orgId, reason, payment, description, amount=null, adjustFee=false, pmtDescription=null)
Returns:

The ID of the successfully-added transaction or null if there was a failure

Return type:

int

Parameters:
  • peopleId (int) – The PeopleId for the involvement member for whom you are adding the transaction

  • orgId (int) – The OrganizationId for the involvement

  • reason (str) – The reason, e.g., Adjustment or AdjustFee, will appear in the Transaction ID column on the Transactions Log page

  • payment (decimal) – The amount of payment

  • description (str) – Corresponds to the Description field when manually entering a transaction; contents will display when viewing the information icon

  • amount (decimal) – The charged amount (or fee); this only needs to be supplied for initial transactions where you are setting the fee; will override the amount due before this transaction

  • adjustFee (bool) – Flag to indicate whether this transaction is a fee adjustment

  • pmtDescription (str) – Typically this is the involvement name

This fuller version of the AddTransaction function should be used with caution and only when all the options are understood. When possible, use instead the shortened version of the function or the AdjustFee function.



Latest Update

11/11/2021

Added the functions for AddTransaction and AdjustFee.