Search Results cac_sync_task




Overview

APPS.CAC_SYNC_COMMON is a shared PL/SQL utility package in Oracle E-Business Suite, originally created in February 2004 as part of the CRM synchronization infrastructure. As its name implies, the package consolidates commonly reused procedures and functions that support synchronization processing across the CRM application modules. The package is declared AUTHID CURRENT_USER, meaning its SQL statements execute with the privileges of the invoking user, which is consistent with its role as a helper library invoked from multiple calling contexts rather than as a standalone application entry point.

The package is documented in ETRM with an API classification of OTHER. It is referenced by three other packages, confirming its role as a low-level dependency rather than a top-level business API. The header comment block explicitly states the package was implemented "for the commonly used procedure or function," and the source carries a version stamp of 120.4 dated September 2005. The package declares shared constants — sync_success and sync_failure, both VARCHAR2(7) — and the exception invalid_num_of_records, all of which are inherited by dependent synchronization routines.

Key Procedures and Functions

The package exposes ten documented procedures and functions, each supporting a distinct piece of synchronization plumbing:

  • GET_SEQID — A function returning a NUMBER, used to obtain a sequence identifier for synchronization records.
  • IS_SUCCESS — A function that accepts a return status string and returns a BOOLEAN, allowing callers to normalize EBS return-status conventions (for example, 'S'/'E') into a simple success test.
  • PUT_MESSAGES_TO_RESULT — A procedure that writes status, user message, and optional token name/value pairs into a task record structure (cac_sync_task.task_rec) so results can be surfaced through the standard EBS message stack.
  • APPS_LOGIN — A procedure accepting a user identifier; it establishes the APPS session context required for downstream synchronization work.
  • GET_USERID — A procedure that resolves a user name to an internal FND user identifier.
  • GET_RESOURCEID — A procedure that maps a user identifier to the associated resource identifier used by CRM resource modules.
  • GET_TIMEZONEID — A procedure that converts a time zone name to its corresponding identifier.
  • GET_MESSAGES — A function returning the accumulated message text for the current session context.
  • GET_TERRITORY_CODE — An explicitly private function that converts a country into a CRM territory code.
  • PUT_MESSAGE_TO_EXCL_RECORD — A procedure that records a message against an excluded record, supporting error reporting during synchronization runs.

Tables Accessed

The package reads and writes through APPS synonyms for the following objects:

  • FND_USER — Used by the user-name and user-id resolution routines (GET_USERID, APPS_LOGIN) to validate and translate login identities.
  • FND_TERRITORIES_TL — Used by GET_TERRITORY_CODE to translate country designations into CRM territory codes.
  • HZ_TIMEZONES — Used by GET_TIMEZONEID to resolve time zone names to internal identifiers.
  • JTF_RS_RESOURCE_EXTNS — Used by GET_RESOURCEID to link a user to the corresponding CRM resource record.
  • JTA_SYNC_CONTACT_MAPPING_S — The synchronization sequence source supporting GET_SEQID and contact-mapping logic.
  • DUAL — Used for single-row expression evaluation and sequence access.

Usage Notes

CAC_SYNC_COMMON is not intended for direct end-user invocation. It is a helper library called by other synchronization packages — the ETRM metadata records three dependent packages — typically in the context of CRM contact and task synchronization. The APPS_LOGIN procedure is the most commonly searched entry point; it is invoked internally to establish the APPS environment before other synchronization APIs execute, and is not the same as the interactive EBS login form. Customizations should treat this package as a dependency rather than an extension point: Oracle does not certify the package as a public API, and its signature may change between releases. Personnel building custom synchronization code or debugging failed sync runs should invoke these routines only through the supported calling packages, or replicate the underlying lookups (FND_USER, HZ_TIMEZONES, JTF_RS_RESOURCE_EXTNS) directly in their own code to avoid dependency on an unsupported private library.