Contract billing utility to facilitate 3rd-Party Integrations and other CEO Juice alerts to create and update contracts in e-automate. This process is currently in development (May 2026).
Jump to a specific section by clicking a link
Overview | Samples | Variables | Import Table | Alert Functionality | Best Practices & Tips | Related Alerts
Overview
Overview
ID775 is an integration process that creates and maintains service contracts in e-automate based on contract and invoice data received from an external source system. That source can be a CEOJuice alert — such as the ConnectWise integration — or a custom process where the client is responsible for pushing data directly into the import tables. The process is designed as a flexible framework, meaning it can receive and process contract data from a variety of billing or management platforms and translate that information into properly structured contracts within e-automate. It runs on a schedule and processes any new or updated contract records that have been staged for import since the last run.
The process handles both creating new contracts and updating ones that already exist in e-automate. For new contracts, it builds a fully configured contract record — including billing dates, customer assignment, pricing, and line items — by inheriting settings from a pre-configured contract template. For existing contracts, it updates key fields such as the billing customer, purchase order number, end date, and cancellation or termination status to keep eAutomate in sync with the source system.
Line items are synced as serviceable items on the contract; this process does not support contracts that include equipment or meter groups. ID775 supports cloning, allowing clients to run multiple instances simultaneously — each pulling from a different source system and creating contracts in e-automate independently.
ID775 also includes an option for invoice renumbering. Once a contract is billed in e-automate and an invoice is generated, the process can identify that invoice and rename it to match the original invoice number from the source system. This helps organizations maintain consistent invoice numbering across both platforms, simplifying reconciliation and record-keeping.
Run Schedule: Weekdays, every 15 minutes
Type of Output: Data push
* * *
Sample
Sample
Jump to: Contract Header | Contract Item Details | Contract Billing/Contact Tab | Email Output
Contract Header
Contract Header
Fields updated on the header level of the contract:
- Contract number
- Customer
- Contract Type
- Contract Bill Code
- Contract Status
- Billing Method
- Contract Start Date
- Contract End Date
- Billing Cycle
- Billing Period
- Use Equipment Base Rates
- Base Rate
- Contract Base Distribution Code
- Activated on Date
- Terminated Date
- Termination Code
- Accrual Cycle
Contract Item Details
Contract Item Details
Fields updated on the item records on the contract:
- Item number
- Description
- Quantity
- Unit base rate
- Base rate
- Start dates
- End dates
- Base distribution code
- Bill code
- Override Taxable
- Branch
- Location Customer
Contract Billing/Contact Tab
Contract Billing/Contact Tab
Fields updated on the Billing/Contact tab:
- Bill to customer
- Branch
- Bill contract
- Billing group
- Tax code
- Terms
- Sales Rep
- Report group
- Contact name
- Blanket PO
Email Output
Email Output
An email will be sent when a new contract is created or when a contract is updated.
* * *
Variables
Variables
Variable W: Integration - Select the integration from the list to use with this subscription to ID775. **Required.
Variable 4: Default Contract Template - The name of the default contract template in e-automate. This template would be used if there is no matching contract template specified in the import table. The default is **ContractDefault. **Required.
Variable 5: Default Item Template - the name of the default item template in e-automate. This template would be used if there is no matching item template for the product type in ConnectWise. The default is **ItemDefault. **Required.
Variable 11: Default Term Code - Termination code to use when a contract detail line item is terminated on the e-automate contract. See here for further details on the termination code. **Required.
Variable 1: Default Billing Cycle - If there is no match to the billing cycle in the import table, the default value from e-automate to use. Default value is Monthly, must be a valid billing cycle in e-automate.
Variable 2: Contract Prefix - Characters to add to the beginning of the contract number for any contracts created, optional but recommended.
Variable 6: Sync Sales Rep - Option to update the sales rep on the contract record to match the sales rep on the customer record. Default is 0 for no, if you want the sales rep updated, change to 1.
Variable 7: Sync PO Number - Option to sync the value in the PO field of the import table to the PO field of the contract. Only used if the contract invoice number is not pushed to the PO field.
Variable 8: Renumber Invoices - You have the option to renumber the contract invoices in e-automate to match the invoice number from the import table. Set this variable to Yes to renumber the invoices or No to not renumber the invoices.
Variable 12: Invoice Renumber Prefix - If you choose to have the invoices in e-automate renumbered, you will need to select a prefix to use on the invoice.
Variable 9: Use Source PO Number - If variable 8 is set to Yes, and the invoice number is posting to the PO field of the contract, leave this variable set to the default of 1.
Variable 10: User Source Remarks - If variable 8 is set to Yes, and the invoice number is posting to the remarks field, set variable to 1 and update Variable 9 to 0.
* * *
Import Table
Import Table
There are two import tables that will need to be populated for the ID775 process:
ZCJ_ImpSCContractHeader - one row per contract/invoice from the external system
ZCJ_ImpSCContractDetails - one row per line item on the contract/invoice.
Below is a list of the column names in the import tables that are either required to be populated or are optional to be populated in the tables. The full list of columns in the import tables is in the spreadsheet attached at the bottom of this post.
**Please review the spreadsheet for the full list of columns. This is not an exhaustive list of all columns in the table. The required columns are subject to change as new integrations and features are added. Always double-check with CEO Juice for the most current requirements.**
ZCJ_ImpSCContractHeader
ZCJ_ImpSCContractHeader
- ImpContractHeaderID — The unique identifier for each record in the import table. Automatically assigned when the record is created. **Do not populate.
- SourceSystem — Identifies which external system the record originated from (e.g., ConnectWise). Used to distinguish records when multiple integrations are writing to the same import table. **Required!!
- SourceContractID — The unique identifier for the contract in the source system. Used to match the incoming record to an existing contract in e-automate, and used as the contract number if no contract number is provided. **Required!!
- SourceInvoiceID — The unique identifier for the invoice in the source system associated with this contract record.
- SourceRecordID — An optional integer identifier for the record in the source system.
- ContractNumber — The contract number to be assigned to the contract in e-automate. If not provided, the next contract number from e-automate is used.
- ContractStatus — The status of the contract in the source system.
- CustomerNumber — The customer number used as the primary method to match the customer record in e-automate. **Required!!
- CustomerName — The customer name, used as a fallback matching method if the customer number does not return a match in e-automate.
- SourceCustomerID — The unique identifier for the customer in the source system. Used as an alternate matching method via the sync mapping history when customer number and name matching are unsuccessful.
- BillToCustomerNumber — The customer number of the billing customer, if the billing customer is different from the primary customer. Matched to e-automate using the same methods as the primary customer.
- BillToCustomerName — The name of the billing customer, used as a fallback if the billing customer number does not return a match.
- BillToCustomerID — The unique identifier for the billing customer in the source system, used as an alternate matching method for the billing customer.
- StartDate — The start date of the contract. Used as both the contract start date and activation date when creating the contract in e-automate. **Required!!
- EndDate — The expiration date of the contract in e-automate.
- CancelledFlag — Indicates whether the contract has been cancelled in the source system. When set, the process will apply termination to the corresponding e-automate contract if the cancellation date has passed.
- DateCancelled — The date the contract was cancelled in the source system. Used in conjunction with CancelledFlag to set the termination date on the contract in e-automate.
- BillingCycle — The billing frequency for this contract (e.g., Monthly, Quarterly). Falls back to the default billing cycle configured in the alert variables if not provided.
- InvoiceNumber — The invoice number from the source system associated with this contract record. Depending on the configuration, this value is written to the PO field or the Remarks field on the contract in e-automate, and is also used during invoice renumbering.
- InvoiceDate — The date of the invoice in the source system.
- InvoiceTotal — The total amount of the invoice from the source system.
- ContactName — The name of the contact to be associated with the contract in e-automate.
- PONumber — The purchase order number from the source system. Written to the PO field on the contract in e-automate if the sync PO number option is enabled in the alert configuration.
- RowsExpected — The number of detail line item records expected for this contract header. The process uses this value to verify that all line items have been written before processing begins. If the actual count does not match, the record is skipped until the data is complete. **Required!!
- EventRevision — Identifies the specific version of the alert that created or is associated with this record. **Required!!
- EventOutputID — Identifies the specific alert subscription instance associated with this record. Used to scope processing to the correct subscription when multiple instances are running. **Required!!
- ProcessedFlag — Indicates whether this record has been successfully processed. Set to 1 after the contract has been created or updated in e-automate. **Required to be set to 0 upon insertion of records.
- ProcessedDate — The date and time this record was successfully processed. **Do not populate.
- EAContractID — The ID of the corresponding contract in e-automate, populated after the record has been processed. **Do not populate.
- ErrorLog — Stores any error messages encountered while attempting to process this record, for review and troubleshooting. **Do not populate.
- CreateDate — The date and time this record was inserted into the import table. **Do not populate.
- LastUpdate — The date and time this record was last modified. **Do not populate.
- ContractTemplate — The name of the contract template to use when creating this contract in e-automate. Overrides the default template defined in the alert subscription variables if provided.
ZCJ_ImpSCContractDetails
ZCJ_ImpSCContractDetails
ImpContractDetailID — The unique identifier for each detail record in the import table. Automatically assigned when the record is created. **Do not populate.
ImpContractHeaderID — Links this detail record to its parent contract header record. This value may be left blank when the record is first inserted; the process will automatically resolve it using the source system, source contract ID, and source invoice ID before processing begins.
SourceSystem — Identifies which external system this record originated from. Must match the SourceSystem value on the parent header record. **Required!!
SourceProductID — The unique identifier for the product or service in the source system. Used in sync tracking to maintain a record of the mapping between source products and e-automate items. **Required!!
SourceContractID — The unique identifier for the contract in the source system. Used alongside SourceSystem and SourceInvoiceID to resolve the link back to the parent header record when ImpContractHeaderID is not provided. **Required!!
SourceInvoiceID — The unique identifier for the invoice in the source system. Used together with SourceSystem and SourceContractID to identify the parent header record when ImpContractHeaderID is not provided.
CatalogItemID — An optional catalog identifier for the item from the source system.
ItemIdentifier — The item number or code used to look up a matching item in e-automate's item catalog. If a match is found, the existing item is used on the contract detail. If no match is found, a new item is created using the item template. **Required!!
ItemTemplate — The name of the item template to use when creating a new item in e-automate if no existing item match is found. Overrides the default item template configured in the alert subscription variables.
ItemDescription — The description of the item from the source system. Used when creating a new item in e-automate, and as the contract detail description if no CustomerDescription is provided.
CustomerDescription — A customer-facing description for this line item. Takes priority over ItemDescription when populating the description on the contract detail line in e-automate.
Quantity — The quantity for this line item on the contract. **Required!!
UnitPrice — The per-unit price for this line item. Written to the unit base rate field on the contract detail in e-automate. **Required!!
ExtendedPrice — The total price for this line item (quantity multiplied by unit price). Written to the base rate field on the contract detail in e-automate.
Taxable — Indicates whether this line item is taxable. Defaults to taxable if not provided.
LocationCustomerID — The e-automate customer ID for the location or site to be assigned to this contract detail line. If provided, the process validates that the customer exists in e-automate before using it. If the customer is not found, the line item falls back to the primary contract customer as the location.
EventRevision — Identifies the specific version of the alert associated with this record. **Required!!
EventOutputID — Identifies the specific alert subscription instance associated with this record. **Required!!
ProcessedFlag — Indicates whether this detail record has been successfully processed. Set to 1 after the contract detail line has been created or updated in e-automate. **Required to be set to 0 upon insertion of records.
ProcessedDate — The date and time this record was successfully processed. **Do not populate.
EAContractDetailID — The ID of the corresponding contract detail line in e-automate, populated after the record has been processed. **Do not populate.
EAItemID — The ID of the corresponding item in e-automate, populated after the item has been matched or created during processing. **Do not populate.
ErrorLog — Stores any error messages encountered while attempting to process this detail record, for review and troubleshooting. **Do not populate.
CreateDate — The date and time this record was inserted into the import table. **Do not populate.
LastUpdate — The date and time this record was last modified. **Do not populate.
* * *
Alert Functionality
Alert Functionality
Jump to: Import Tables | Data Completeness Check | Customer Matching | Contract Creation | Updating Existing Contracts | Contract Line Item Processing | Invoice Renumbering
Import Tables
Import Tables
There are two import tables that need to be populated before a contract can be created or updated. If the contract integration is a CEO Juice alert (ID964 ConnectWise, ID913 Autotask, etc), then these import tables are populated by those alerts. If you are using the 'Client' integration, you will need to populate the required columns in each table. See the Import Table section for the table schema for the two import tables.
Data Completeness Check
Data Completeness Check
The process pulls unprocessed records from the ZCJ_ImpSCContractHeader table where the ProcessFlag is equal to 0. The process runs a data completeness check for each header. If the RowsExpecteds is set for the header, the actual count of detail rows for the header is calculated. If these two numbers don't match, the header record is skipped.
This ensures that the contract is not updated in e-automate until all line items for the contract are in the import table.
Customer Matching
Customer Matching
There are three ways that the customer from the import table is linked to a customer in e-automate:
The customer number from the table is a direct match to a customer number in e-automate.
SourceCustomerID is a lookup that checks a running record of past syncs to find a customer that was matched in a prior run.
The customer name is a direct match to a customer name in e-automate.
If no customer can be matched, the contract is skipped, and an error is recorded against that record for review.
A separate Bill-To customer is also found using the same matching methods. If the incoming data includes a billing customer that is different from the primary customer, the process attempts to find and assign that record. If no Bill-To match is found, the primary customer is used as the billing customer.
Contract Creation
Contract Creation
Once the customer is identified, the process checks whether a matching contract already exists in eAutomate. It searches in two ways:
- By contract number — looks for a contract with the matching number assigned to the matched customer.
- By previously synced mapping — checks the sync history for a contract that was created from the same source contract in a prior run.
If no matching contract is found, a new contract is created. The process:
- Generates a contract number from the source contract ID, applying any configured prefix.
- Calculates the last billing date using the first available value from: invoice from-date, the earliest line item date, or the contract start date.
- Calculates the next billing date by adding the billing cycle period to the last billing date.
Sets the PO number to either the source invoice number or the source PO number, depending on configuration. - Writes the source invoice number into the Remarks field in a structured format, if configured to do so.
- Creates the contract record in e-automate with an Active status.
- Copies all remaining settings from the contract template — including GL account assignments, accrual configuration, billing group settings, and any other template-defined properties — to the new contract.
- Inherits tax settings (tax code, tax exempt status) and branch assignment from the primary customer record, overriding whatever the template carried.
- Populates the billing address on the contract from the Bill-To customer's address fields, respecting whether that customer uses a separate billing address or their primary address.
- If sales rep sync is enabled, it assigns the sales rep from the customer record to the contract.
Updating Existing Contract
Updating Existing Contract
If the contract already exists, it is updated with the following fields from the incoming data:
- Bill-To customer
- PO number (if configured)
- End date
- Cancellation/termination status and date (if the contract is flagged as cancelled in the source system and the cancellation date has passed, the contract is marked as terminated using the configured termination code)
- Remarks field with the source invoice number (if configured)
Contract Line Item Processing
Contract Line Item Processing
After the contract is created or confirmed, the process processes each line item from the incoming data. For every line item:
Item lookup — the process first attempts to find a matching item in eAutomate's item catalog using the item identifier from the source data.
Item creation — if no match is found, a new item is created using the item template specified on the line item, or the default item template if none is specified. The new item inherits settings (such as GL accounts and tax configuration) from the template item.
Location assignment — if the line item specifies a location customer (a sub-location or site), the process validates that the location exists in eAutomate. If it does not, the line item falls back to the primary customer as the location.
-
Contract detail lookup — the process checks whether a contract line already exists for this item and location on the contract.
If no line exists, a new contract detail line is created with the quantity, unit price, extended price, description, and start date from the incoming data.
If a line already exists, it is updated with the current quantity, pricing, and description from the incoming data.
Invoice Renumbering
Invoice Renumbering
If invoice renumbering is enabled, the process runs a post-processing step after all contracts and line items have been handled. This step identifies eAutomate invoices that were generated from synced contracts and renames them to match the original source invoice number. The renumbering works as follows:
Matching — the process looks at recently generated contract invoices in eAutomate and matches them back to synced contracts. It identifies the source invoice number either by reading it from the contract's Remarks field (where it was written during contract creation or update) or from the PO number field, depending on which option was configured.
Regular invoice renumbering — non-void invoices are renamed to the source invoice number, with an optional prefix character prepended if configured. If multiple invoices match the same source number, subsequent invoices receive a suffix of
-R2,-R3, and so on to ensure uniqueness.Void invoice renumbering — voided invoices are renamed using the source invoice number with a
-V1,-V2suffix appended to indicate they are void versions.Uniqueness check — before renaming any invoice, the process verifies that the new invoice number does not already exist elsewhere in eAutomate to prevent conflicts.
Cleanup — after renumbering, the process updates any related document queue references and accounts receivable references to reflect the new invoice numbers. It also evaluates the billing flag on each contract: if all invoices for a contract have been voided, the contract's billing flag is turned off to prevent it from generating further invoices.
* * *
Best Practices & Tips
Best Practices & Tips
* * *
Related Alerts
Related Alerts
ID832 Halo Contract Sync
ID913 Autotask Contract Sync
ID964 ConnectWise Agreement Sync
* * *
0 Comments