Lead Partner Algorithm
The lead partner algorithm is used to determine which partner is assigned to a
service request order (SRO).
The function considers these input parameters to return the Out Partner ID value:
- In Partner ID
- Incident Number
- Customer Number
- Ship To
- SRO Type
- Unit Number
Using the values listed above, the system performs these steps as part of the algorithm that returns the lead partner:
- If the partner ID field passed in is populated, then assign the Out Partner ID to the In Partner ID and stop.
- If the incident number is populated, obtain the owner from the Incidents form. If the owner is populated, assign the Out Partner ID to the owner partner ID and stop.
- If the customer/ship to combination and SRO type are both populated, then look for a matching customer/SRO type record on the Customer/SRO Types form, Service Partner field. If found and the service partner is populated, then assign the Out Partner ID to that default value and stop.
- If the unit number is populated, then look for a matching unit record in the Service Partner field on the General tab of the Units form. If found and the service partner is populated, then assign the Out Partner ID to the service partner of the unit and stop.
- If the customer/ship to combination is populated, then look for a matching customer ship to record in the Service Partner field on the Codes tab of the Customer Ship Tos form. If found and the service partner is populated, then assign the Out Partner ID to the service partner of the customer and stop.
- If all are blank, then assign the Out Partner ID to blank.
Note: Before it returns
the partner ID that is found in the above logic, the function verifies
the existence of the partner within the system by querying the partner
table. If the partner ID is not found, the function returns a NULL value.
The lead partner algorithm is used in these areas:
- Incidents form: Assigns the lead partner on the service order created for the incident to SRO cross reference.
- Service Order Automatic Generation Utility form: Assigns the lead partner on the service orders created by the utility.
- Service Orders form: Assigns the lead partner for new records or for existing records where the customer/ship to combination has been updated.