Newer Version Available

This content describes an older version of this product. View Latest

Business Objects API

Business Object API is a feature designed to facilitate integrations of external systems and processes with TPM related SObjects.

SObjects are complex in nature as they require specific attributes and processes to be executed when manipulating them to ensure data is consistent and correctly calculated. Business Object API acts as a middle layer transforming simplified payloads into the required SObject records.

Business Object API features are:

  • Same behavior when used from within Salesforce LWC components and API
  • Supports up to 10000 records per transaction
  • Input payload validation through Schema validation
  • Extensive configurability and extension capabilities through point & click customization and APEX class plugins
  • Transactional integrity
  • Out of the box operations logging and traceability

Installing Base Business Object API Configurations

In order to install base Business Object API configurations in an org for a Sales Organization, execute the following APEX snippet:

1cgcloud.TPMSetupData.setupBOApi('<sales org>');

You can track the install progress through the related Batch Run Status record.

Process Overview

When a Business Object API request is received, the following steps are executed in order to process the request for each input:

  1. Spawn a Queueable job for each input record.
  2. Input validation: Based on the workflow configuration records, the received input is validated against the expected schema. If the validation fails, an error is emitted and the process stops
  3. Transformation phase: At this point, all the Workflow Steps defined for the Workflow start executing in the defined order:
    1. For each Workflow Step:
      1. Find entities to be sent as input to the workflow step
      2. Execute the Workflow Step for each found input: The workflow step APEX class will be executed for each input
    2. After all Workflow Steps are executed, the output object is completed
  4. Business Logic Save: The generated output object is passed to the relevant Business Logic save function. This will generate all the required SObject DML operations
  5. Database Commit: After all the Steps are executed, data is committed to the Database

If the system detects any DML Row Lock exception during steps 3, 4 or 5, the operation will be retried.

All Business Object API requests are logged into the Business Object API Transaction Log SObject for traceability.