Projectbillingrule

A project billing rule [Projectbillingrule] is a rule governing how and when charges are generated automatically.

XML

SOAP

REST

Database table

Object

Projectbillingrule

oaProjectbillingrule

project_billing_rule

Supported Commands

Add, Read, Modify

add(), read(), modify(), upsert()

The Projectbillingrule object has the following standard properties:

Note:

Projectbillingrule object properties may also include custom fields. The object type supports the custom equal to read method and the enable_custom read attribute.

XML / SOAP

Database

Description

accounting_period_id

accounting_period_id

The ID of the associated accounting period.

acct_date

acct_date

The accounting period date to assign to the transaction. See Date Fields.

acct_date_how

acct_date_how

The accounting period date of the transaction is determined by:

  • N - none, clear the value

  • E - the entity (no change)

  • C - container of the entity if available (i.e, timesheet, envelope)

  • S - submitted date of the container

  • A - approved date of the container

  • M - set by the specified accounting date

  • P - set by the specified accounting period

active

active

A 1/0 field indicating whether this is an active billing rule.

adjust_if_capped

adjust_if_capped

If a transaction will exceed the cap, should it be adjusted to fit under the cap.

agreementid

agreementid

The ID of the associated agreement.

amount

amount

The amount for a fixed fee rule.

assigned_user

assigned_user

The user to assign to fixed fee billings.

backout_gst

backout_gst

If they are using GST/HST/PST taxes, back out the GST/HST taxes from re-billed expenses.

cap

cap

The amount to cap total billing for this rule at (in the currency of the project).

cap_by_customerpo

cap_by_customerpo

A "1/0" field. If set to "1" customerpo.total or customerpo.hours is used instead of the project_billing_rule.cap or project_billing_rule.cap_hours.

Note:

You can only read or modify the cap_by_customerpo field if all the following conditions are met:

  • The project associated to the project billing rule is a portfolio project.

  • The project associated to the project billing rule is associated with at least one customer PO.

  • The billing rule is associated with a customer PO.

  • The billing rule type is one of the following: Expense item, Purchase item, Time.

  • The following features are enabled for your account:

    • Portfolio Projects and Subordinate Projects.

    • Single Billing Cap across Multiple Subprojects Within a Portfolio Project.

    The cap_by_customerpo attribute is listed in the Scripting Center SOAP Explorer if these features are enabled for your account.

cap_hours

cap_hours

The number of hours to cap the billing at for a time billing rule.

category_1id

category_1_id

The ID of the associated category_1. Mutually exclusive with project_task_id.

category_2id

category_2_id

The ID of the associated category_2. Mutually exclusive with project_task_id.

category_3id

category_3_id

The ID of the associated category_3. Mutually exclusive with project_task_id.

category_4id

category_4_id

The ID of the associated category_4. Mutually exclusive with project_task_id.

category_5id

category_5_id

The ID of the associated category_5. Mutually exclusive with project_task_id.

category_filter

category_filter

CSV list of categories to limit the rule to.

category_when

category_when

When the category be applied:

  • N - Use the selected category if the time entry does not have a category.

  • A - Always use the selected category.

categoryid

category_id

The ID of the category to assign to the transaction if it doesn't have a category.

cost_center_id

cost_center_id

The ID of the associated cost center.

created

created

[Read-only] Time the record was created. See Date Fields.

currency

currency

Currency for the money fields in the record.

customerid

customer_id

The ID of the associated customer.

customerpoid

customerpo_id

The ID of the associated customerpo.

daily_cap_hours

daily_cap_hours

The number of hours to cap the period billing per user at.

daily_cap_is_per_user

daily_cap_is_per_user

Is the daily cap on a per user basis.

daily_cap_period

daily_cap_period

Period for the cap:

  • D - day

  • W - week

  • M - month

  • Q - quarter

  • Y - year

daily_rate_multiplier

daily_rate_multiplier

Optional daily multiplier to adjust the time billing rate by. This is a comma delimited list of the multipliers for the days of the week starting with Monday and ending with Sunday.

daily_roll_to_next

daily_roll_to_next

If the period cap is hit move the remainder to the next rule.

description

description

The rule description.

end_date

end_date

End date of the rule. See Date Fields.

end_milestone

end_milestone

The ID of the ending milestone (project_task).

exclude_archived_ts

exclude_archived_ts

Exclude time from archive timesheets in time billing rules.

exclude_non_billable

exclude_non_billable

Exclude non-billable expenses.

exclude_non_billable_task

exclude_non_billable_task

Exclude non-billable tasks.

exclude_non_reimbursable

exclude_non_reimbursable

Exclude non-reimbursable expenses.

extra_data

extra_data

The extra_data field holds additional data associated with the project billing rule.

Information about Billing rule filters set to use custom fields to limit the billing rule to specific employees will be stored in the extra_data field. Review the following notes before setting Employee custom fields as billing rule filters:

  • Time, Expense and Purchase billing rules support the use of Employee custom fields as billing rule filters.

  • The following custom field types are supported: Checkbox, Dropdown, Dropdown and text, Pick list, and Radio buttons.

  • The extra_data field stores custom field filters as a hash. The hash always needs to be formatted as follows:

    C# example (SOAP API):

                            Projectbillingrule.extra_data = "$h->{extra_data} = {\'user\' => { \'custom_field_id_1\' => \'custom_field_id_1_value_1,custom_field_id_1_value_2\',\'custom_field_id_2\' => \'custom_field_id_2_value_1,custom_field_id_2_value_2\'}}"; 
    
                          

    XML example (XML API):

                            <extra_data>$h->{extra_data} = {'user' => { 'custom_field_id_1' => 'custom_field_id_1_value_1,custom_field_id_1_value_2','custom_field_id_2' => 'custom_field_id_2_value_1,custom_field_id_2_value_2'}};</extra_data> 
    
                          
    Note:

    Review the following guidelines:

    • The syntax for a field-value pair can be ‘custom_field_id'=>'value' or ‘custom_field_id','value'

    • For Checkbox Custom fields, use the value ‘%%OA_EMPTYSTRING%%' for unchecked / False

    • Use a comma separated list of values if a custom field can have multiple values ‘value_1,value_2,value_3'

    • Make sure all values are correct. Any invalid value set for the custom field billing rule filter will have an adverse impact on billing transaction creation.

    • Always the entire hash for custom field billing rule filters even if you are only changing one value. If a field-value pair is omitted from the hash, the corresponding filter will be removed.

id

id

[Read-only] Unique ID. Automatically assigned by OpenAir.

item_filter

item_filter

CSV list of items to limit the rule to.

job_code_filter

job_code_filter

CSV list of filters to limit the rule to.

markup

markup

The amount of markup in percent or monetary amount as designated by markup_type field.

markup_category

markup_category

The ID of the category a markup on expense receipts should be assigned to.

markup_type

markup_type

A field indicating the type of expense markup:

  • P - percentage of the cost.

  • S - specific amount.

name

name

Name of this project billing rule.

notes

notes

Notes associated with this project billing rule.

percent

percent

The percentage value for a fixed fee percent trigger.

percent_how

percent_how

If the fixed fee is triggered by a percent complete, this holds how it is triggered:

  • A - % complete of planned hours for the project

  • B - % complete of planned hours for a phase or task (the task ID is held in the start_milestone field)

position

position

The position of the rule (0,1,2 etc.). Rules are evaluated in order and evaluation stops once a rule is satisfied.

product_filter

product_filter

CSV list of products to limit the rule to.

project_task_filter

project_task_filter

CSV list of tasks to limit the rule to.

project_task_id

project_task_id

The ID of the associated task.

  • project_task_id must be for a top level phase in the project schedule.

  • The account must be configured to require either a Service or Service 1–5 line on top level phases.

  • The billing rule type must be ‘F' (fixed fee billing rule).

projectid

project_id

The ID of the associated project.

rate_cardid

rate_card_id

The ID of the associated rate card if using rate cards.

rate_from

rate_from

Where we get the rate from:

  • U - Users

  • R - Rate cards

  • C - Category

rate_multiplier

rate_multiplier

Optional multiplier to adjust the time billing rate by.

repeatid

repeatid

The ID of the associated repeating event.

round_rules

round_rules

Rules for rounding time.

slip_stageid

slip_stage_id

The ID of the slip stage to assign to the transaction.

start_date

start_date

Start date of the rule. See Date Fields.

start_milestone

start_milestone

The ID of the starting milestone (project_task).

stop_if_capped

stop_if_capped

If a transaction is not billed because it exceeds the cap, should the billing stop for this transaction.

ticket_maximums

ticket_maximums

Holds data on ticket maximums per expense type.

timetype_filter

timetype_filter

CSV list of timetypes to limit the rule to.

type

type

[Required] The type of the billing rule:

  • T - time billing rule.

  • E - expense billing rule.

  • F - fixed fee billing rule.

  • P - purchase billing rule.

updated

updated

[Read-only] Time the record was last updated or modified. See Date Fields.

user_filter

user_filter

CSV list of users to limit the rule to.