There is a cliente that needs that follow up tasks are created if a task of type call is not successfull. So in order to have this we need to create a trigger like this:
This job only applies to tasks related to the lead object, not other objects. It should work this way:
1. A Lead record is assigned a task with the subject "Llamada de Seguimiento 1".
2. After 24 hours of being created this first task, a second task (related to the same record), should be generated with subject "Llamada de Seguimiento 2"
3. After 24 hours that the second task is being created a third task should be created, with subject "Llamada de Seguimiento 3".
Important: if any of the tasks at some point, are marked with value "Exitosa" on field Resultado_Llamada__c of the activity object, this will stop the subsequent tasks from being created. Since the call has being completed, we don't need more follow up tasks.