» Custom Component Module SDK Documentation

Getting Custom Component List

Function: custom_component_list()

Purpose

This function retrieves the full list of custom components configured within the system. Custom components define modular functional units that can be attached to various resources such as accounts, forms, and other custom components. This operation is used to fetch metadata including component UUIDs, names, descriptions, usage configuration, status, and relation definitions. It is helpful for developers, admins, and automation scripts that need to dynamically inspect available components or reference them for further operations such as assigning forms, building workflows, or managing custom fields.

Parameters

No parameter is required.

Use Case

This function is typically used when an application needs to retrieve all available custom components for configuration, mapping, or referencing within automated workflows. For example, an admin may want to list all components to verify correct setup, or a developer may retrieve components to dynamically assign them to forms or objects. Since custom components form the foundation of the field inspection and data modeling structure, getting this list is essential for building dynamic configurations, validating existing setups, or synchronizing metadata with external systems. 

def custom_component_list():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "PATH_TO_TOKEN_FILE.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        response = exsited_sdk.custom_component.custom_component_list()
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The response contains a list of all custom components along with key metadata such as UUID, status, name, display name, description, usage configuration, and relation type. This output helps developers and QA teams confirm the availability and configuration of components, detect missing components, and understand how each component is mapped within the system. Pagination details are included to support large datasets.

{
    "components": [
        {
            "uuid": "COMPONENT_UUID_1",
            "status": "ACTIVE",
            "name": "COMPONENT_NAME_1",
            "display_name": "DISPLAY_NAME_1",
            "description": "DESCRIPTION_1",
            "use_in": [
                {"resource": "RESOURCE_TYPE_1"}
            ],
            "relation": "RELATION_TYPE_1"
        },
        {
            "uuid": "COMPONENT_UUID_2",
            "status": "ACTIVE",
            "name": "COMPONENT_NAME_2",
            "display_name": "DISPLAY_NAME_2",
            "description": "DESCRIPTION_2",
            "use_in": [
                {"resource": "RESOURCE_TYPE_2"}
            ],
            "relation": "RELATION_TYPE_2"
        }
    ],
    "pagination": {
        "records": NUMBER_OF_RECORDS,
        "limit": LIMIT_VALUE,
        "offset": OFFSET_VALUE,
        "previous_page": "PREVIOUS_PAGE_VALUE",
        "next_page": "NEXT_PAGE_VALUE"
    }
}

Getting Component Record PDF

Function: component_pdf()

Purpose

This function is used to download a PDF version of a specific component record. Each custom component may have forms, fields, and associated data captured during inspections or operational workflows. This API allows users to obtain a complete PDF export of a single component record, which is often required for audits, reporting, sharing with external teams, or archiving. The PDF includes all relevant fields, metadata, and structured content associated with the component instance.

Parameters

Parameter Type Description
component_uuid string Unique identifier of the custom component definition.
component_record_id string The ID of the specific component record for which the PDF must be downloaded.

Use Case

This function is commonly used in inspection workflows or reporting modules where a user needs a downloadable PDF summary of a specific component record. A QA engineer may test this feature to verify that PDFs are generated correctly, contain accurate data, and include all custom fields assigned to the component. Developers may use this to automatically export component records for batch reporting, integration with document management systems, or for generating attachments in automated emails.

def component_pdf():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "PATH_TO_TOKEN_FILE.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        component_uuid = "COMPONENT_UUID_PLACEHOLDER"
        component_id = "COMPONENT_RECORD_ID_PLACEHOLDER"

        response = exsited_sdk.custom_component.custom_component_pdf(
            uuid=component_uuid,
            id=component_id
        )

        pdf_filename = "PATH_TO_SAVE_FOLDER/" + component_id + ".pdf"

        if isinstance(response, bytes):
            with open(pdf_filename, "wb") as file:
                file.write(response)
            print("PDF saved:", pdf_filename)
        else:
            print("Unexpected response type:", type(response))

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns a PDF file.

Getting Custom Component Record Details

Function : custom_component_uuid_details()

Purpose

This function retrieves the details of a specific custom component record using the component UUID and the component record ID. It returns the full custom component data including status, parent references, custom form details, attributes, custom objects, and related linked entities such as accounts.

Parameters

ParameterTypeDescription
component_uuidStringUnique identifier (UUID) of the custom component type/template.
component_record_idStringRecord ID of the custom component instance to retrieve.

Use Case

This function is used when a user needs to view or audit a specific custom component record (for example, a Job record). It helps users retrieve configured attributes (like title, description, dates, priority, assigned operators), review linked parent entities (such as accounts), and access related custom objects (such as Materials, Overview, or Milestone) associated with that component record.

def custom_component_id_details():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        response = exsited_sdk.custom_component.custom_component_uuid_details(
            id="CUSTOM_COMPONENT_ID",
            uuid="CUSTOM_COMPONENT_UUID"
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns an object containing the custom component record data. The response includes the record status, record ID, UUID, version, created/updated audit fields, parent entity references, custom form metadata, and a list of attributes (including any metadata values). It may also include attribute groups, linked custom objects with their UUIDs, names, and API links, and related account details including currency, timezone, tax settings, contacts, payment methods, KPIs, and other associated metadata.

{
  "Jobs": {
    "status": "JOB_STATUS",
    "id": "JOB_ID",
    "parents": [
      {
        "type": "PARENT_TYPE",
        "id": "PARENT_ID",
        "email": "PARENT_EMAIL",
        "name": "PARENT_NAME"
      }
    ],
    "custom_form": {
      "uuid": "CUSTOM_FORM_UUID",
      "name": "CUSTOM_FORM_NAME"
    },
    "created_by": "CREATED_BY",
    "created_on": "CREATED_ON",
    "last_updated_by": "LAST_UPDATED_BY",
    "last_updated_on": "LAST_UPDATED_ON",
    "uuid": "JOB_UUID",
    "version": "VERSION",
    "attributes": [
      {
        "name": "ATTRIBUTE_NAME",
        "value": "ATTRIBUTE_VALUE",
        "meta_data": {
          "META_KEY": "META_VALUE"
        }
      }
    ],
    "attribute_groups": [],
    "custom_objects": [
      {
        "uuid": "CUSTOM_OBJECT_UUID",
        "name": "CUSTOM_OBJECT_NAME",
        "link": "CUSTOM_OBJECT_LINK",
        "instances": []
      }
    ],
    "accounts": [
      {
        "status": "ACCOUNT_STATUS",
        "id": "ACCOUNT_ID",
        "name": "ACCOUNT_NAME",
        "display_name": "ACCOUNT_DISPLAY_NAME",
        "description": "ACCOUNT_DESCRIPTION",
        "origin": "ACCOUNT_ORIGIN",
        "invoice_parent_account": "BOOLEAN",
        "type": "ACCOUNT_TYPE",
        "email_address": "ACCOUNT_EMAIL",
        "user_team": {},
        "image_uri": "IMAGE_URI",
        "workflow_status": "WORKFLOW_STATUS",
        "custom_forms": {
          "uuid": "ACCOUNT_FORM_UUID",
          "name": "ACCOUNT_FORM_NAME"
        },
        "currency": {
          "uuid": "CURRENCY_UUID",
          "name": "CURRENCY_NAME",
          "link": "CURRENCY_LINK"
        },
        "time_zone": {
          "uuid": "TIMEZONE_UUID",
          "name": "TIMEZONE_NAME",
          "link": "TIMEZONE_LINK"
        },
        "grant_portal_access": "BOOLEAN",
        "tax": {
          "uuid": "TAX_UUID",
          "code": "TAX_CODE",
          "rate": "TAX_RATE",
          "link": "TAX_LINK"
        },
        "accounting_code": {},
        "communication_preference": [
          {
            "media": "COMMUNICATION_MEDIA",
            "enabled": "BOOLEAN"
          }
        ],
        "addresses": [],
        "website": "WEBSITE",
        "linkedin": "LINKEDIN",
        "twitter": "TWITTER",
        "facebook": "FACEBOOK",
        "created_by": "CREATED_BY",
        "created_on": "CREATED_ON",
        "last_updated_by": "LAST_UPDATED_BY",
        "last_updated_on": "LAST_UPDATED_ON",
        "uuid": "ACCOUNT_UUID",
        "version": "VERSION",
        "custom_attributes": [
          {
            "name": "ATTRIBUTE_NAME",
            "value": "ATTRIBUTE_VALUE"
          }
        ],
        "custom_objects": [
          {
            "uuid": "CUSTOM_OBJECT_UUID",
            "name": "CUSTOM_OBJECT_NAME",
            "link": "CUSTOM_OBJECT_LINK"
          }
        ],
        "billing_preferences": {
          "communication_profile": "COMMUNICATION_PROFILE",
          "invoice_mode": "INVOICE_MODE",
          "invoice_term": "INVOICE_TERM",
          "billing_period": "BILLING_PERIOD",
          "billing_start_date": "BILLING_START_DATE",
          "billing_start_day_of_month": "DAY_OF_MONTH",
          "charging_and_billing_alignment": "ALIGNMENT",
          "payment_processor": "PAYMENT_PROCESSOR",
          "payment_mode": "PAYMENT_MODE",
          "payment_term": "PAYMENT_TERM",
          "payment_term_alignment": "PAYMENT_TERM_ALIGNMENT"
        },
        "contacts": [
          {
            "type": "CONTACT_TYPE",
            "type_display_name": "CONTACT_TYPE_DISPLAY_NAME",
            "billing_contact": "BOOLEAN",
            "shipping_contact": "BOOLEAN",
            "salutation": {},
            "designation": {},
            "first_name": "FIRST_NAME",
            "middle_name": "MIDDLE_NAME",
            "last_name": "LAST_NAME",
            "email": {
              "address": "EMAIL_ADDRESS",
              "do_not_email": "BOOLEAN"
            },
            "address_line_1": "ADDRESS_LINE_1",
            "address_line_2": "ADDRESS_LINE_2",
            "address_line_3": "ADDRESS_LINE_3",
            "address_line_4": "ADDRESS_LINE_4",
            "address_line_5": "ADDRESS_LINE_5",
            "post_code": "POST_CODE",
            "city": "CITY",
            "state": "STATE",
            "country": "COUNTRY",
            "phone": {
              "country_code": "COUNTRY_CODE",
              "area_code": "AREA_CODE",
              "number": "PHONE_NUMBER",
              "full": "FULL_PHONE",
              "do_not_call": "BOOLEAN"
            },
            "fax": {},
            "mobile": {},
            "receive_billing_information": "BOOLEAN",
            "created_by": "CREATED_BY",
            "created_on": "CREATED_ON",
            "last_updated_by": "LAST_UPDATED_BY",
            "last_updated_on": "LAST_UPDATED_ON",
            "uuid": "CONTACT_UUID",
            "version": "VERSION",
            "custom_attributes": []
          }
        ],
        "payment_methods": [
          {
            "processor_type": "PROCESSOR_TYPE",
            "status": "PAYMENT_STATUS",
            "default": "BOOLEAN",
            "processor": {
              "uuid": "PROCESSOR_UUID",
              "name": "PROCESSOR_NAME",
              "link": "PROCESSOR_LINK"
            },
            "reference": "REFERENCE",
            "payment_count": "PAYMENT_COUNT",
            "last_used_on": "LAST_USED_DATE",
            "created_by": "CREATED_BY",
            "created_on": "CREATED_ON",
            "last_updated_by": "LAST_UPDATED_BY",
            "last_updated_on": "LAST_UPDATED_ON",
            "uuid": "PAYMENT_METHOD_UUID",
            "version": "VERSION",
            "use_for_specified_orders": "BOOLEAN",
            "specified_orders": "ORDER_IDS"
          }
        ],
        "discount_profiles": [],
        "kpis": {
          "total_revenue": 0,
          "monthly_recurring_revenue": 0,
          "total_collected": 0,
          "total_refunded": 0,
          "total_outstanding": 0,
          "total_overdue": 0,
          "total_balance": 0,
          "total_credit_balance": 0,
          "total_orders": 0,
          "total_active_orders": 0,
          "last_reactivated_on": "",
          "last_cancelled_on": "",
          "deleted_on": ""
        }
      }
    ],
    "orders": [],
    "quotes": []
  }
}

Creating Custom Component Record

Function : custom_component_create()

Purpose

This function creates a new custom component record for a given custom component type, identified by the component UUID. It allows the record to be linked to parent domains (such as an account), populated with attributes, and created along with related custom object instances.

Parameters

ParameterTypeDescription
component_uuidStringUnique identifier (UUID) of the custom component type for which the record is created.

Use Case

This function is used when a new custom component instance (for example, a Job) needs to be created and associated with an existing domain record. It supports creating structured records with configurable attributes, priorities, attachments, and nested custom objects such as materials, milestones, or overviews.

def custom_component_create():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        request_data = {
            "Jobs": {
                "parents": [
                    {
                        "type": "account",
                        "id": "ACCOUNT_ID"
                    }
                ],
                "attributes": [
                    {"name": "Job_Title", "value": "JOB_TITLE"},
                    {"name": "Job_Description", "value": "JOB_DESCRIPTION"},
                    {"name": "Assigned_Operators", "value": "ASSIGNED_OPERATORS"},
                    {"name": "Start_Date", "value": "START_DATE"},
                    {"name": "Due_Date", "value": "DUE_DATE"},
                    {"name": "Priority", "value": "PRIORITY"},
                    {"name": "Attachment", "value": []}
                ],
                "custom_objects": [
                    {
                        "uuid": "CUSTOM_OBJECT_UUID",
                        "attributes": [
                            {"name": "Attribute_One", "value": "VALUE_1"},
                            {"name": "Attribute_Two", "value": "VALUE_2"},
                            {"name": "Attribute_Three", "value": "VALUE_3"}
                        ]
                    }
                ]
            }
        }

        response = exsited_sdk.custom_component.custom_component_create(
            uuid="CUSTOM_COMPONENT_UUID",
            request_data=request_data
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns an object containing the newly created custom component record. The response includes the record status, generated record ID, UUID, version, linked parent domain information, custom form details, audit fields, saved attributes (with metadata where applicable), created custom object definitions with instance details, and activity logs confirming the creation action.

{
  "Jobs": {
    "status": "JOB_STATUS",
    "id": "JOB_ID",
    "parents": [
      {
        "type": "PARENT_TYPE",
        "id": "PARENT_ID",
        "email": "PARENT_EMAIL",
        "name": "PARENT_NAME"
      }
    ],
    "custom_form": {
      "uuid": "CUSTOM_FORM_UUID",
      "name": "CUSTOM_FORM_NAME"
    },
    "created_by": "CREATED_BY",
    "created_on": "CREATED_ON_ISO",
    "last_updated_by": "LAST_UPDATED_BY",
    "last_updated_on": "LAST_UPDATED_ON_ISO",
    "uuid": "JOB_UUID",
    "version": "VERSION",
    "attributes": [
      {
        "name": "ATTRIBUTE_NAME",
        "value": "ATTRIBUTE_VALUE",
        "meta_data": {
          "META_KEY": {
            "META_ENUM_KEY": "META_ENUM_VALUE"
          }
        }
      }
    ],
    "attribute_groups": [],
    "custom_objects": [
      {
        "uuid": "CUSTOM_OBJECT_UUID",
        "name": "CUSTOM_OBJECT_NAME",
        "link": "CUSTOM_OBJECT_LINK",
        "instances": [
          {
            "instance_uuid": "INSTANCE_UUID",
            "attributes": [
              {
                "name": "INSTANCE_ATTRIBUTE_NAME",
                "value": "INSTANCE_ATTRIBUTE_VALUE",
                "meta_data": {
                  "META_KEY": {
                    "META_ENUM_KEY": "META_ENUM_VALUE"
                  }
                }
              }
            ]
          }
        ]
      }
    ],
    "activity_logs": [
      {
        "activity": "ACTIVITY_MESSAGE"
      }
    ]
  }
}

Linking Domains to a Custom Component Record

Function : component_link_domains()

Purpose

This function links one or more domain records (such as sales orders) to an existing custom component record under a specified custom component type (component UUID). It is used to associate the custom component instance (for example, a Job) with external domain entities.

Parameters

ParameterTypeDescription
component_uuidStringUnique identifier (UUID) of the custom component type.

Use Case

This function is used when an existing custom component record needs to be connected to other domain entities for tracking and relationship management. For example, linking a Job record to one or more sales orders so users can trace related work items, operational tasks, or projects against the correct orders.

def test_component_link_domains():
    SDKConfig.ENABLE_JSON_CONVERSION = True
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        request_data = {
            "id": "CUSTOM_COMPONENT_ID",
            "domain_type": "sale_order",
            "domains": [
                {"domain_id": "DOMAIN_ID_1"},
                {"domain_id": "DOMAIN_ID_2"}
            ]
        }
        response = exsited_sdk.custom_component.component_link_domains(
            uuid="CUSTOM_COMPONENT_UUID",
            request_data=request_data
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns an object confirming the linked domains for the custom component record. The response includes a domains list showing each linked domain type (e.g., sale_order) and the corresponding domain IDs that were successfully associated with the component.

{
  "Jobs": {
    "domains": [
      {
        "domain_type": "DOMAIN_TYPE",
        "domain_id": "DOMAIN_ID"
      }
    ]
  }
}

Updating Linked Domains for a Custom Component

Function : component_link_domains_update()

Purpose

This function updates the domain links for an existing custom component record under a specified custom component type. It allows modifying or replacing linked domain associations (such as accounts or other entities) for the given component record.

Parameters

ParameterTypeDescription
component_uuidStringUnique identifier (UUID) of the custom component type whose domain links are being updated.

Use Case

This function is used when the relationships between a custom component record (for example, a Job) and its linked domains need to be updated. Common scenarios include changing the associated account, reassigning linked entities, or correcting domain relationships to reflect updated business requirements.

def test_component_link_domains_update():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        request_data = {
            "id": "CUSTOM_COMPONENT_ID",
            "domain_type": "account",
            "domains": [
                {"domain_id": "DOMAIN_ID"}
            ]
        }
        response = exsited_sdk.custom_component.component_link_domains_update(
            uuid="CUSTOM_COMPONENT_UUID",
            request_data=request_data
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns an object confirming the updated domain links for the custom component record. The response includes a list of linked domains showing the domain type (such as account) and the associated domain IDs that are currently linked after the update.

ComponentLinkDomainsResponseDTO(
  jobs=LinkDomainsJobsDTO(
    domains=[
      LinkDomainDTO(
        domainType='DOMAIN_TYPE',
        domainId='DOMAIN_ID'
      )
    ]
  )
)

Unlinking Domains from a Custom Component

Function : component_unlink_domains()

Purpose

This function removes existing domain links from a custom component record for a specified custom component type. It allows one or more linked domain entities (such as sales orders or quotes) to be detached from the custom component record.

Parameters

ParameterTypeDescription
component_uuidStringUnique identifier (UUID) of the custom component type from which domains are being unlinked.

Use Case

This function is used when relationships between a custom component record (for example, a Job) and its linked domains need to be removed. Typical scenarios include unlinking cancelled orders, removing incorrect associations, or restructuring relationships between custom components and domain entities.

def test_component_unlink_domains():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        request_data = {
            "id": "CUSTOM_COMPONENT_ID",
            "domain_type": "sale_order",
            "domains": [
                {"domain_id": "DOMAIN_ID_1"},
                {"domain_id": "DOMAIN_ID_2"}
            ]
        }
        response = exsited_sdk.custom_component.component_unlink_domains(
            uuid="CUSTOM_COMPONENT_UUID",
            request_data=request_data
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns an object confirming the domains that were successfully unlinked from the custom component record. The response includes a list of domain entries showing the domain type and domain ID for each unlinked association.

{
  "Jobs": {
    "domains": [
      {
        "domain_type": "DOMAIN_TYPE",
        "domain_id": "DOMAIN_ID"
      },
      {
        "domain_type": "DOMAIN_TYPE",
        "domain_id": "DOMAIN_ID"
      }
    ]
  }
}

Deleting Custom Component Record

Function : custom_component_delete()

Purpose

This function deletes an existing custom component record identified by the component UUID and the component record ID. Once deleted, the custom component record is permanently removed from the system and cannot be retrieved or modified.

Parameters

ParameterTypeDescription
component_uuidStringUnique identifier (UUID) of the custom component type.
component_record_idStringRecord ID of the custom component instance to be deleted.

Use Case

This function is used when a custom component record (such as a Job or project record) is no longer required. Common scenarios include removing obsolete or incorrect records, cleaning up test data, or handling cancellations where the custom component is no longer applicable.

def test_custom_component_delete():
    SDKConfig.ENABLE_JSON_CONVERSION = True
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        response = exsited_sdk.custom_component.custom_component_delete(
            uuid="YOUR_COMPONENT_UUID",
            id="YOUR_COMPONENT_ID"
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns a confirmation response indicating the successful deletion of the custom component record. A successful operation returns a status code of 204 with a success flag set to true.

{'success': True, 'status_code': 204}

Deleting Custom Object Instances from a Custom Component

Function : component_custom_objects_delete()

Purpose

This function deletes all custom object instances associated with a specific custom component record. It removes the linked custom object data (such as Materials, Milestones, or Overview instances) while keeping the parent custom component record intact.

Parameters

ParameterTypeDescription
component_uuidStringUnique identifier (UUID) of the custom component type.
component_record_idStringRecord ID of the custom component from which custom objects are deleted.

Use Case

This function is used when custom object data linked to a custom component record needs to be cleared or reset. Typical scenarios include removing incorrect sub-records, cleaning up associated data before reconfiguration, or deleting nested object instances without deleting the main custom component record.

def test_component_custom_objects_delete():
    SDKConfig.ENABLE_JSON_CONVERSION = True
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        response = exsited_sdk.custom_component.component_custom_objects_delete(
            uuid="YOUR_COMPONENT_UUID",
            id="YOUR_COMPONENT_ID"
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns a confirmation response indicating the successful deletion of the custom object instances. A successful operation returns a status code of 204 with a success flag set to true.

{'success': True, 'status_code': 204}

Changing Custom Component Status

Function: component_change_status()

Purpose

This function updates the workflow status of a specific custom component record. It allows the system to transition the component to a new state based on business workflow rules.

Parameters

Parameter nameTypeRequiredDescription
component-uuidStringYesThe unique UUID of the custom component type.
idStringYesThe unique record ID of the custom component whose status is being changed.

Use Case

This function is used when a custom component (such as Jobs, Tasks, or other domain-specific components) needs to move through different workflow stages. Typical scenarios include marking a job as started, completed, on hold, or transitioning it according to operational or approval workflows.

def test_component_change_status():
    SDKConfig.ENABLE_JSON_CONVERSION = True
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        request_data = {
            "status": "YOUR_STATUS"
        }
        response = exsited_sdk.custom_component.component_change_status(
            component_uuid="YOUR_COMPONENT_UUID",
            order_id="YOUR_ORDER_ID",
            request_data=request_data
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns a confirmation message indicating that the workflow state has been updated successfully. Example response message: “workflow state has been changed successfully”

{
    "message": "workflow state has been changed successfully"
}

Express Update Custom Component Record

Function: component_express_update()

Purpose

This function performs a quick (express) update on a specific custom component record. It allows updating one or more fields directly without submitting the full component structure.

Parameters

Parameter nameTypeRequiredDescription
component_uuidStringYesThe unique UUID of the custom component type.
component_record_idStringYesThe unique record ID of the custom component to be updated.

Use Case

This function is used when only specific fields of a custom component need to be modified without performing a full update. It is ideal for lightweight updates such as modifying a title, updating a priority field, adjusting a date, or updating other express attributes within operational workflows.

def test_component_express_update():
    SDKConfig.ENABLE_JSON_CONVERSION = True
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        request_data = {
            "express_field": "value"
        }
        response = exsited_sdk.custom_component.component_express_update(
            uuid="YOUR_COMPONENT_UUID",
            id="YOUR_COMPONENT_ID",
            request_data=request_data
        )
        print(response)
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns the fully updated custom component object in the response. The returned data includes the component’s current status, record ID, UUID, version number, parent domain information, custom form details, updated attributes, associated custom objects, related orders or quotes, and activity logs. The activity log reflects the update action, confirming that the express update has been successfully applied to the specified component record.

{
  "Jobs": {
    "status": "JOB_STATUS",
    "id": "JOB_ID",
    "parents": [
      {
        "type": "PARENT_TYPE",
        "id": "PARENT_ID",
        "email": "PARENT_EMAIL",
        "name": "PARENT_NAME"
      }
    ],
    "custom_form": {
      "uuid": "CUSTOM_FORM_UUID",
      "name": "CUSTOM_FORM_NAME"
    },
    "created_by": "JOB_CREATED_BY",
    "created_on": "JOB_CREATED_ON",
    "last_updated_by": "JOB_LAST_UPDATED_BY",
    "last_updated_on": "JOB_LAST_UPDATED_ON",
    "uuid": "JOB_UUID",
    "version": "JOB_VERSION",
    "attributes": [
      {
        "name": "ATTRIBUTE_NAME",
        "value": "ATTRIBUTE_VALUE"
      }
    ],
    "attribute_groups": [],
    "custom_objects": [
      {
        "uuid": "CUSTOM_OBJECT_UUID",
        "name": "CUSTOM_OBJECT_NAME",
        "link": "CUSTOM_OBJECT_LINK",
        "instances": []
      }
    ],
    "orders": [],
    "quotes": [],
    "activity_logs": [
      {
        "activity": "JOB_ACTIVITY_LOG"
      }
    ]
  }
}

Looking to build next big project?

With our robust set of tools and resources, you can create custom solutions that integrate seamlessly with our system and take your business to the next level.

Join Our Partner Program