Contract Invoice Policies
- Get Contract Invoice Policy Object Definition
- Query and List Contract Invoice Policies
- Query and List Contract Invoice Policies (Legacy)
- Get Contract Invoice Policy
- Create Contract Invoice Policy
- Update Contract Invoice Policy
- Delete Contract Invoice Policy
The Contract Invoice Policy helps you to narrow your focus when creating previews for contract invoice runs.
Note this object has been renamed from Contract Invoice Filter Sets (GENINVOICEFILTERS
)to Contract Invoice Policy (GENINVOICEPOLICY
).
Get Contract Invoice Policy Object Definition
lookup
List all the fields and relationships for the contract invoice policy object:
<lookup>
<object>GENINVOICEPOLICY</object>
</lookup>
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use GENINVOICEPOLICY |
docparid | Optional | string | Used to indicate the document type, such as Inventory Transfer , Sales Order , Purchase Order and so forth. You must use this to take advantage of any custom fields on the specified document type. |
Query and List Contract Invoice Policies
query
List the record number and dynamic ‘as of date’ for each contract invoice policies:
<query>
<object>GENINVOICEPOLICY</object>
<select>
<field>RECORDNO</field>
<field>SETASOFDATE</field>
</select>
</query>
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use GENINVOICEPOLICY |
filter | Optional | object | Filter expression to limit the response to only objects that match the expression. Check the value of a single field using operators such as equalto/like, or multiple fields using and/or. Query fields on related objects using the dot operator (for example, VENDOR.CREDITLIMIT on APBILL). |
select | Required | sequence | The names of the fields that you want included in the response, and an optional aggregate function such as count or sum . Returning all fields is not supported. |
orderby | Optional | object | Provide an order element with a field name and choose an ascending or descending sort order, for example: <order> |
options | Optional | object | Query options:
|
pagesize | Optional | integer | Maximum number of matching objects to return in the response, between 1 and 2000 items (Default: 100 ) |
offset | Optional | integer | Point at which to start indexing into records (Default: 0 ) |
docparid | Optional | string | Used to indicate the document type, such as Inventory Transfer , Sales Order , Purchase Order and so forth. You must use this to take advantage of any custom fields on the specified document type. |
Query and List Contract Invoice Policies (Legacy)
<readByQuery>
<object>GENINVOICEPOLICY</object>
<fields>*</fields>
<query></query>
<pagesize>100</pagesize>
</readByQuery>
ReadByQuery
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use GENINVOICEPOLICY |
fields | Optional | string | Comma-separated list of fields on the object to list. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value. |
query | Required | string | SQL-like query based on fields on the object. The following operators are supported: < , > , >= , <= , = , like , not like , in , not in , IS NOT NULL , IS NULL , AND , OR . Illegal XML characters must be properly encoded, and single quotes must be escaped with backslashes ('Jane\'s Deli' ). Joins are not supported. |
pagesize | Optional | integer | Custom page size between 1 and 1000 items (Default: 100 ) |
docparid | Optional | string | Used to indicate the document type, such as Inventory Transfer , Sales Order , Purchase Order and so forth. You must use this to take advantage of any custom fields on the specified document type. |
Get Contract Invoice Policy
read
<read>
<object>GENINVOICEPOLICY</object>
<keys>1</keys>
<fields>*</fields>
</read>
Parameters
Name | Required | Type | Description |
---|---|---|---|
object | Required | string | Use GENINVOICEPOLICY |
keys | Required | string | RECORDNO of the policy to get |
fields | Optional | string | Comma-separated list of fields on the object to get. For best performance and predictability, limit the number of fields. To return all fields, omit the element or provide * for the value. |
docparid | Optional | string | Used to indicate the document type, such as Inventory Transfer , Sales Order , Purchase Order and so forth. You must use this to take advantage of any custom fields on the specified document type. |
Create Contract Invoice Policy
Release | Changes |
---|---|
2022 Release 2 | Renamed Contract Filter Set to Contract Invoice Policy |
2021 Release 3 | Added BILLTO as a value for INVOICEBY |
2020 Release 4 | Added CUSTOMER as a value for INVOICEBY |
2019 Release 4 | Added INVOICEBY |
create
Creates an invoice policy for the given contract:
<create>
<GENINVOICEPOLICY>
<NAME>My policy</NAME>
<CONTRACTID>CTRC-003</CONTRACTID>
<INCLUDECONTRACTS>true</INCLUDECONTRACTS>
<INCLUDECONTRACTUSAGE>true</INCLUDECONTRACTUSAGE>
</GENINVOICEPOLICY>
</create>
Creates an invoice policy for the same contract but requests a separate invoice for each project associated with the contract:
<create>
<GENINVOICEPOLICY>
<NAME>My policy per project</NAME>
<CONTRACTID>CTRC-003</CONTRACTID>
<INVOICEBY>CONTRACT#~#PROJECT</INVOICEBY>
<INCLUDECONTRACTS>true</INCLUDECONTRACTS>
<INCLUDECONTRACTUSAGE>true</INCLUDECONTRACTUSAGE>
</GENINVOICEPOLICY>
</create>
Parameters
Name | Required | Type | Description | Domain Value | Default Value |
---|---|---|---|---|---|
GENINVOICEPOLICY | Required | string | Object to create |
GENINVOICEPOLICY
Name | Required | Type | Description |
---|---|---|---|
NAME | Required | string | Name for the policy |
DESCRIPTION | Optional | string | Description |
SETASOFDATE | Optional | string | Dynamic As of date based on current date. Use Today , Yesterday , End of this week , End of last week , Beginning of this month , End of this month , or End of last month . (Default: today’s date) |
DOCPARID | Optional | string | Transaction definition to use. Definition must be enabled for Contracts. |
CONTRACTID | Optional | string | Contract ID |
CONTRACTGROUPID | Optional | string | Contract group ID |
INVOICEBY | Optional | string | Specifies how the invoices are organized and consolidated: • CUSTOMER#~#CONTRACT : A separate invoice for each contract (Legacy value: CONTRACT ).• CUSTOMER#~#CONTRACT#~#BILLTO : A separate invoice for each contract per contract line level Bill to contact.• CUSTOMER : A separate invoice for each customer.• CUSTOMER#~#BILLTO : A separate invoice for each customer per contract line level Bill to contact.• CUSTOMER#~#CONTRACT#~#PROJECT : A separate invoice for each project associated with the contract. (Legacy value: PROJECT#~#CONTRACT or CONTRACT#-#PROJECT )• CUSTOMER#~#CONTRACT#~#BILLTO#~#PROJECT : A separate invoice for each project associated with the contract per contract line level Bill to contact. (Default: CUSTOMER#~#CONTRACT ) |
CURRENCY | Optional | currency | Currency code |
PROJECTID | Optional | string | Project ID |
PROJECTTYPEID | Optional | string | Project type ID |
PROJECTMANAGERID | Optional | string | Project manager ID |
EMPLOYEEID | Optional | string | Employee ID |
CUSTOMERID | Optional | string | Customer ID |
CUSTOMERTYPEID | Optional | string | Customer type ID |
ITEMID | Optional | string | Item ID |
ITEMGROUPID | Optional | string | Item group ID |
DEPARTMENTID | Optional | string | Department ID |
LOCATIONID | Optional | string | Location ID |
STATUS | Optional | string | Status for the policy itself. Use active for an Active policy or inactive for an Inactive policy (Default: Active ). An inactive poloicy cannot be used to generate invoice previews until it is reactivated. |
INCLUDECONTRACTS | Optional | Boolean | Use true to include Contract transactions. (Default: false ) |
INCLUDECONTRACTUSAGE | Optional | Boolean | Use true to include Contract usage transactions. (Default: false ) |
Update Contract Invoice Policy
Release | Changes |
---|---|
2022 Release 2 | Renamed Contract Filter Set to Contract Invoice Policy |
2021 Release 3 | Added BILLTO as a value for INVOICEBY |
2020 Release 4 | Added CUSTOMER as a value for INVOICEBY |
2019 Release 4 | Added INVOICEBY |
update
<update>
<GENINVOICEPOLICY>
<RECORDNO>1</RECORDNO>
<CONTRACTID>CTRC-003</CONTRACTID>
<REPEATINTERVAL>3</REPEATINTERVAL>
<INCLUDECONTRACTS>true</INCLUDECONTRACTS>
</GENINVOICEPOLICY>
</update>
Parameters
Name | Required | Type | Description |
---|---|---|---|
GENINVOICEPOLICY | Required | string | Object to update |
GENINVOICEPOLICY
Name | Required | Type | Description |
---|---|---|---|
RECORDNO | Optional | integer | Record number of the policy to update. Required if not using NAME . |
NAME | Optional | string | Policy name. Required if not using RECORDNO . |
DESCRIPTION | Optional | string | Description |
SETASOFDATE | Optional | string | Dynamic As of date based on current date. Use Today , Yesterday , End of this week , End of last week , Beginning of this month , End of this month , or End of last month . (Default: today’s date) |
DOCPARID | Optional | string | Transaction definition to use. Definition must be enabled for Contracts. |
CONTRACTID | Optional | string | Contract ID |
CONTRACTGROUPID | Optional | string | Contract group ID |
INVOICEBY | Optional | string | Specifies how the invoices are organized and consolidated: • CUSTOMER#~#CONTRACT : A separate invoice for each contract (Legacy value: CONTRACT ).• CUSTOMER#~#CONTRACT#~#BILLTO : A separate invoice for each contract per contract line level Bill to contact.• CUSTOMER : A separate invoice for each customer.• CUSTOMER#~#BILLTO : A separate invoice for each customer per contract line level Bill to contact.• CUSTOMER#~#CONTRACT#~#PROJECT : A separate invoice for each project associated with the contract. (Legacy value: PROJECT#~#CONTRACT or CONTRACT#-#PROJECT )• CUSTOMER#~#CONTRACT#~#BILLTO#~#PROJECT : A separate invoice for each project associated with the contract per contract line level Bill to contact. (Default: CUSTOMER#~#CONTRACT ) |
CURRENCY | Optional | currency | Currency code |
PROJECTID | Optional | string | Project ID |
PROJECTTYPEID | Optional | string | Project type ID |
PROJECTMANAGERID | Optional | string | Project manager ID |
EMPLOYEEID | Optional | string | Employee ID |
CUSTOMERID | Optional | string | Customer ID |
CUSTOMERTYPEID | Optional | string | Customer type ID |
ITEMID | Optional | string | Item ID |
ITEMGROUPID | Optional | string | Item group ID |
DEPARTMENTID | Optional | string | Department ID |
LOCATIONID | Optional | string | Location ID |
STATUS | Optional | string | Status for the policy itself. Use active for an Active policy or inactive for an Inactive policy (Default: Active ). An inactive policy cannot be used to generate invoice previews until it is reactivated. |
INCLUDECONTRACTS | Optional | Boolean | Use true to include Contract transactions. |
INCLUDECONTRACTUSAGE | Optional | Boolean | Use true to include Contract usage transactions. |
Delete Contract Invoice Policy
delete
<delete>
<object>GENINVOICEPOLICY</object>
<keys>1</keys>
</delete>
Parameters
Name | Required | Type | Description |
---|---|---|---|
GENINVOICEPOLICY | Required | string | Object to delete |
GENINVOICEPOLICY
Name | Required | Type | Description |
---|---|---|---|
keys | Required | string | Comma-separated list of RECORDNO for the policy to delete |