In short
- The standard Last Activity field is a date with no time, and custom activity records do not update it.
- Add your own Last Contact Date/Time and Last Contact Type fields to Lead and Opportunity.
- Stamp them when a call or text is logged: a flow or Apex trigger on the activity object, or a scheduled batch.
- Test the update against validation rules on the parent, and send errors to an admin.
Why the standard Last Activity date is not enough
- It is a date only. "Today" does not tell a manager if the lead was called this morning or a minute ago.
- It comes from Tasks and Events. Calls and texts on a custom activity object do not move it.
- It does not say what kind of contact it was: a call, a text or an email.
Calls with transcripts go to a custom activity object, because Task and Event cannot hold long text. Texts from an SMS platform may land on their own object too. So the field your reports rely on misses the contacts that matter.
Add last contact fields to Lead and Opportunity
- Last Contact Date/Time: a date/time field.
- Last Contact Type: a picklist with Call, SMS, Email and any other channel you log.
- Optional: Last Contact Direction (inbound or outbound), and Last Outbound Contact for follow-up reports.
Stamp the last call date from call activity
Trigger on the call record
A record-triggered flow or an Apex trigger on the call activity object runs after a call is created.
Find the parent
Read the lead or opportunity lookup on the call.
Compare dates
Only update when the call is newer than the stamped date, so imported history does not overwrite recent contact.
Stamp both fields
Set Last Contact Date/Time to the call time and Last Contact Type to Call.
Apex handles bulk loads better than a flow when a call platform sends records in large groups. Write the trigger to update all parents in one operation.
Talk through your project
A free call about your integration, your CRM or whatever you are stuck on. Honest advice, even if you never hire us. No obligation.
Stamp the last SMS date from text activity
If texts land on an object you control, use the same trigger or flow pattern. If an SMS platform’s managed package writes its own records in a way a trigger cannot reach, use a scheduled Apex batch instead: find texts logged since the last run and stamp the parents.
- Set Last Contact Type to SMS.
- Set an "SMS responded" flag when an inbound text comes in, for follow-up reports.
- Keep the same "only if newer" rule as calls.
Why last activity flows fail
- Validation rules on the parent. A flow that updates an account fails if the account is missing a required address.
- Two automations stamping the same field with different rules. Keep one owner per field.
- Old Task automation still running after calls moved to a custom object, creating double activity.
- No error alerts. Route flow errors to an admin, and document how each field is updated.
We have fixed last activity flows that failed on validation rules and missing fields. Documenting how the field is set saves the next admin from guessing.
Use the last contact date in reports
- Leads with no contact since a set date, by owner.
- Opportunities with no outbound contact since the last inbound text.
- Last contact type by stage, to see which channel moves deals.
Want help with this?
Book a free call about your CRM, integrations or reporting, or map your systems first with our free tech stack diagram builder.
