Notify and dispatch jobs with Skedulo API using Salesforce

Job notifications to resources from the Skedulo API using Salesforce.

Dispatch/Notify

Global Notification inputs are used for all API requests that dispatch job notifications to resources and are defined in the following way:

global Notification(Id jobId, Id resourceId)
  1. Log in to your Skedulo account in Salesforce.
  2. Create a new job, or find the jobId of a job that you want to dispatch or send a notification to the resource.
  3. Open the Developer Console. a. Click the Settings cog in the upper-right corner. b. Select Developer Console.
  4. Select Debug -> Open Execute Anonymous Window, or press Ctrl + E.
  5. Enter the following code using the correct jobId to dispatch the job and notify the resource.

    sked.ApiInput.Notification input = new sked.ApiInput.Notification('<jobId>', null);
    System.debug(sked.SkeduloAPI.dispatch(input));
    
  6. Click Execute.

  7. Select the Debug Only filter in the Execution Log and open the USER_DEBUG event to view the log and confirm the job has been dispatched.

If the job has been despatched correctly, the log results should display the resourceId and method of notification, with no errors, for example:

  14:20:22:372 USER_DEBUG [2]|DEBUG|Notification:[jobId=a0G2v00002YM4OVEA1, results=(ResourceNotification:[error=null, protocol=sms, resourceId=a0X2v00000MKTovEAH])]

Logs that show no results (results=()) or an error message have not dispatched correctly:

  14:06:24:900 USER_DEBUG [2]|DEBUG|Notification:[jobId=a0G2v00002YmO4dEAF, results=()]

Last modified August 1, 2019: updated to end of connected pages (8161217)