LeadPerfection Integration - Jobs

What information is required to have a job created in OCC?

In order for a job to be created in OCC, the following data elements must be completed:


  1. The user from LeadPerfection MUST be mapped to a user in OCC and their mapping must be active.
  2. We make an api call to the api/SalesApi/GetSalesApptDetailDateRange endpoint and search for a range of: 2 days previous to 30 days in the future.
  3. For each appointment that is returned, we look at the slr_id value of that appointment to determine if we have a corresponding LeadPerfection user mapped to an OCC user.
  4. If there is NO mapped user we ignore it.
  5. If there is a mapped user, we create / update it utilizing the following mapping:
    1. Customer Name: {appointment.CustName}
    2. Name: {appointment.CustName} {appointment.ProductID}
    3. Email: {appointment.email} (we look at the appointment.email and appointment.email2 and if both exist we put both email addresses comma-separated in this value)
    4. Lead Source: {appointment.Source}: {appointment.SubSource}
    5. Job Address:
      1. Line 1: {appointment.Address1}
      2. Line 2: (hard coded to an empty string as there is no address 2 in LeadPerfection)
      3. City: (LeadPerfection returns a CSZ value which is a comma separated value of City, State Zip [example Middle River, MD 21220] and we split that value on commas and take the first value)
      4. State: (LeadPerfection returns a CSZ value which is a comma separated value of City, State Zip [example Middle River, MD 21220] and we split that value on commas and take the second value and split it again on spaces taking the first value)
      5. Postal Code: (LeadPerfection returns a CSZ value which is a comma separated value of City, State Zip [example Middle River, MD 21220] and we split that value on commas and take the second value and split it again on spaces taking the second value)
    6. Phone Number (Phone):
      1. Name: (hardcoded to Phone)
      2. Number: {appointment.Phone}
    7. Phone Number (AltPhone1):
      1. Name: (hardcoded to AltPhone1)
      2. Number: {appointment.AltPhone1}
    8. Phone Number (AltPhone2):
      1. Name: (hardcoded to AltPhone2)
      2. Number: {appointment.AltPhone2}
    9. Assigned User: appointment.slr_id (or Slr_id)
    10. Metadata:
      1. lead_perfection_id: {appointment.ID}
      2. lead_perfection_salesperson: {appointment.SalesRepName}
    11. Appointment:
      1. Start Time: {appointment.ApptDate} (based upon the company’s time zone)
      2. End Time: {appointment.ApptDate} + 2 hours
      3. Appointment Note Text: {appointment.Notes)
      4. Metadata:
        1. lead_perfection_id: {appointment.ID}

Are there any options for other mappings for job creation?

No, there aren’t any options for data mappings or job creation.

When should an update in LeadPerfection be reflected in OCC?

There is a job that runs every 15 minutes at 5, 20, 35, and 50 minutes after the hour.

What happens if a Lead is deleted in LeadPerfection?

The information created in OCC would be orphaned and unlinked between LeadPerfection and OCC. There is no update to reflect that in OCC and no updates will be pulled to a job(s) in OCC.

What happens if an Appointment is deleted in LeadPerfection?

Much like if a contact or Lead is deleted in LeadPerfection, NO update for appointment(s) will be pulled to a job(s) in OCC.

Do updates in OCC push back to LeadPerfection?

No, there are no updates which are made in OCC pushed back to LeadPerfection.

Can I make status changes in OCC and have them show up in LeadPerfection?

Currently, there is an ability to update a result and result reason on an appointment in OCC and have that reflected back in LeadPerfection "immediately". There is NO ability to change the Job’s status in OCC and have that reflected back in LeadPerfection.


Under the appointments tab, for each of the appointments that come over from LeadPerfection will have an option to result each of those appointments.



After selecting the icon to result it gives you the ability to select a result to save the changes.



Once that change is saved it is accessible on the Appointment back in LeadPerfection.

  • Result goes to the Disp (disposition) field on the appointment back in LeadPerfection

What happens when I change the assigned user on the Appointment in LeadPerfection?

Once an appointment has a representative which has been changed to a different user it should be picked up on the 15 minute synchronization timeframe. Please note the SAME rules still exist where there must be a user linked between OCC and LeadPerfection AND it must be active AND it must be scheduled in the timeframe of 2 days prior to 30 days from the current date.