Class WorkflowCreator

    • Constructor Detail

      • WorkflowCreator

        public WorkflowCreator​(String pathWorkspaceSid,
                               String friendlyName,
                               String configuration)
        Construct a new WorkflowCreator.
        Parameters:
        pathWorkspaceSid - The workspace_sid
        friendlyName - A string representing a human readable name for this Workflow.
        configuration - JSON document configuring the rules for this Workflow.
    • Method Detail

      • setAssignmentCallbackUrl

        public WorkflowCreator setAssignmentCallbackUrl​(URI assignmentCallbackUrl)
        A valid URL for the application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/api/taskrouter/handling-assignment-callbacks) for more details..
        Parameters:
        assignmentCallbackUrl - A valid URL for the application that will process task assignment events.
        Returns:
        this
      • setAssignmentCallbackUrl

        public WorkflowCreator setAssignmentCallbackUrl​(String assignmentCallbackUrl)
        A valid URL for the application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/api/taskrouter/handling-assignment-callbacks) for more details..
        Parameters:
        assignmentCallbackUrl - A valid URL for the application that will process task assignment events.
        Returns:
        this
      • setFallbackAssignmentCallbackUrl

        public WorkflowCreator setFallbackAssignmentCallbackUrl​(URI fallbackAssignmentCallbackUrl)
        If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL..
        Parameters:
        fallbackAssignmentCallbackUrl - If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL.
        Returns:
        this
      • setFallbackAssignmentCallbackUrl

        public WorkflowCreator setFallbackAssignmentCallbackUrl​(String fallbackAssignmentCallbackUrl)
        If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL..
        Parameters:
        fallbackAssignmentCallbackUrl - If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL.
        Returns:
        this
      • setTaskReservationTimeout

        public WorkflowCreator setTaskReservationTimeout​(Integer taskReservationTimeout)
        An integer value controlling how long in seconds TaskRouter will wait for a confirmation response from your application after assigning a Task to a worker. See Task Assignment Callback for more information. Defaults to 120 seconds. Maximum value is 86400 (24 hours).
        Parameters:
        taskReservationTimeout - An integer value controlling how long in seconds TaskRouter will wait for a confirmation response from your application after assigning a Task to a worker.
        Returns:
        this
      • create

        public Workflow create​(TwilioRestClient client)
        Make the request to the Twilio API to perform the create.
        Specified by:
        create in class Creator<Workflow>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Created Workflow