Common operations

Common Operations

Query

  • The connector has a hard-coded list of default fields it will return.

Searching

CCH Axcess allows searching using the Filters filter. When using the connector you can pass this filter using the row filter {Filters: [array_of_filters_here]}.
Example:

 
// Picking up records that were modified after a certain time

/** @type Parameters<API.connections.cchaxcess.Connection["queryOne"]["Client"]>[0]["rowFilter"] */
const rowFilter = {
    Filters: [
        {
            Field: "1534",
            Operator: "1",
            Value: "2024-04-10",
            AndOr: "0"
        }
    ],
};

for await (const client of this.cchaxcess.query.Client({ rowFilter })) {
}

 

  • Possible values of Field option:

    • ClientGUID=1505, ClientTypeCode=1509, ClientID=1514, ClientSortName=1515, LastUpdatedDtTm= 1534, EmailAddress=1612, OfficeGuid=1700, BusinessUnitGuid=1701, ClientResponsibleStaffGuid=1702, CRSPositionGuid=1703, ReturnGroupGuid=1704, ClientStatusCd=1705

  • Possible values of Operator option:

    • Equals=0, Greater Than=1, Less Than=2, Like=3, IN=4

  • Possible values of Value option:

    • When Field: "ClientTypeCode" : Corporation=CR, Employee Plan=EP, Fiduciary=FD, Individual=IN, Exempt Organization=EX, Partnership=PR, Sole Proprietorship=SP, Other (Custom)=OT

    • When Field: "ClientStatusCode": Active=AC, Inactive=IA, OnHold=OH, LitigationHold=PL, Terminated=TR.

  • Possible values of AndOr option: AND=0, OR=1.

Ordering

CCH Axcess allows ordering by a specific field usingSortParamAndOrder parameter. When using the connector you can pass this filter using the row filter.

  • Example: {SortParamAndOrder: { Order: "1", SortParamArray: ["0", "1"] }}

  • Possible values of Order option:

    • Ascending=0

    • Descending=1

  • Possible values of SortParamArray option:

    • ClientID=0

    • ClientSortName=1

Getting additional fields

  • CCH Axcess doesn’t return all field values in the Client's list response. When using the connector you can pass extraFields property filter to get additional fields.

    • Example: { extraFields: ["additionalFields", "AddressList"] }

    • Attention: When you pass the extraFields property filter, the connector will make one request for each filter value to each record.

Possible values of extraFields property filter:

 
 
 

Value

 

Extra request to

 

Description

 

additionalFields

Client?id={ClientID}

Connector returns Client object with additional fields

AddressList

Client/{ClientID}/AddressList

Connector returns Client object with list of addresses

EmailList

Client/{ClientID}/EmailList

Connector returns Client object with list of emails

InstantMessengerList

Client/{ClientID}/InstantMessengerList

Connector returns Client object with list of instant messenger

PhoneList

Client/{ClientID}/PhoneList

Connector returns Client object with list of phones

responsibleStaffs

Client/{ClientGuidId}/ResponsibleStaffs

Connector returns Client object with list of responsible staffs

clientContactList

ClientContact/Assigned/{ClientGUID}

Connector returns Client object with list of assigned Client Contacts

clientContactListAdditionalFields

ClientContact/{ClientContactGUID}

Connector returns Client object with list of assigned Client Contacts with additional fields

 
 

Examples

 
const cchaxcess = await ctx.connections.cchaxcess();

// EXAMPLE: query client by ClientID with all possible extraFields
/** @type Parameters<API.connections.cchaxcess.Connection["queryOne"]["Client"]>[0]["rowFilter"] */
const queryOneRowFilter = {
    Filters: [
        {
            Field: "1514",
            Operator: "0",
            Value: "331788589,
            AndOr: "0"
        }
    ],
    SortParamAndOrder: { Order: "1", SortParamArray: ["0", "1"] }
};

const extraFields = ["additionalFields", "AddressList", "EmailList", "InstantMessengerList", "PhoneList", "responsibleStaffs", "clientContactList", "clientContactListAdditionalFields",];
let clientById = await cchaxcess.queryOne.Client({ rowFilter: queryOneRowFilter, propertyFilter: { extraFields: extraFields, } });

// EXAMPLE: Picking up records that were modified after a certain time
/** @type Parameters<API.connections.cchaxcess.Connection["queryOne"]["Client"]>[0]["rowFilter"] */
const rowFilter = {
    Filters: [
        {
            Field: "1534",
            Operator: "1",
            Value: "2024-04-10",
            AndOr: "0"
        }
    ],
    SortParamAndOrder: { SortParamArray: ["0"], Order: "0" },
};

for await (const client of cchaxcess.query.Client({ rowFilter, limit: 5, propertyFilter: { extraFields: ["additionalFields"] } })) {
}