Opportunity purge
This time-triggered transaction purges all the opportunities for a period greater than the retention days specified in the Opportunity Purge criteria, and those which are either in the status of cancelled or completed.
You can use purge codes pseudo-logic to analyze purges. If the following conditions are met, an opportunity is picked up for purge:
- The last modified date of the opportunity should exceed the retention day period.
- The quote associated with the opportunity should be purged.
- The opportunity should be in pickable status by the purge transaction.
Attributes
The following are the attributes for this time-triggered transaction:
| Attribute | Value |
|---|---|
| Base Transaction ID | OPPORTUNITYPRG |
| Base Document Type | Opportunity |
| Base Process Type | Opportunity Fulfillment |
| Abstract Transaction | No |
| APIs Called | None |
| User Exits Called | None |
Criteria parameters
The following are the criteria parameters for this transaction:
| Parameter | Description |
|---|---|
| Action | Required. Triggers the transaction. If left blank, it defaults to Get, the only valid value. |
| PurgeCode | Required. Cannot be modified. Used for internal calculations, such as determining retention days. Corresponds with the PurgeCode used in Business Rules Purge Criteria. |
| Live | Optional. Mode in which to run. Defaults to Y.
|
| Number of Records To Buffer | Optional. Number of records to retrieve and process at one time. If left blank or specified as 0 (zero), it defaults to 5000. |
| EnterpriseCode | Optional. Enterprise for which the Opportunity Purge needs
to be run. If not passed, then all enterprises are monitored. When the EnterpriseCode is blank, the purge criteria configured for the DEFAULT enterprise is used; not the purge criteria configured for the opportunity's enterprise. |
| CollectPendingJobs | If this parameter is set to "N", the agent does not collect information on the pending jobs for this monitor. This pending job information is used for monitoring the monitor in the System Management Console. |
| ColonyID | Required in a sharded deployment where a table may exist in multiple schemas. Runs the agent for the colony. |
| Task Queue Filter Criteria | Optional. Determines the jobs to be fetched by the agent. The value assigned to this
parameter is matched against the custom value stored in the FILTER_CRITERIA column
of YFS_TASK_Q table, while fetching the jobs. Note:
VOID is a
valid task queue filter criteria value which is used to match records with NULL value in the
FILTER_CRITERIA column of YFS_TASK_Q table.For more information, see Workload segregation for task queue agents. |
Statistics tracked
The following statistics are tracked for this transaction:
| Statistic Name | Description |
|---|---|
| NumOpportunityPurged | Number of opportunities purged. |
Pending job count
For this transaction, the pending job count is the number of records that can be purged from the YFS_OPPORTUNITY table.
Events raised
None.
Tables purged
YFS_OPPORTUNITY
YFS_OPPORTUNITY_EXTENSION