How to use a custom date/time ticket attribute as ticket start date with Web Service Methods

Hi,

We're trying to use Web Service Methods to create ticket tasks (e.g. 'Deliver Furniture') whose start date/time is based on a ticket's custom date/time attribute (e.g. 'Delivery Time'). The end goal is remind our facilities staff to deliver furniture at a specific time, since the event/space booking ticket request is often submitted weeks before the delivery.  Having a task start date will allow us to send a timed reminder email and/or allow us to get it into a more user-friendly report or calendar view (ideally Outlook).

The web service is creating the task successfully, but I cannot figure out how to pass the 'Delivery Time' value over to the Web Service Method. Is this possible to achieve with a single Web Service step using 2 parameters, or should I be creating multiple methods to GET and PATCH this date/time information into the task?

What I've tried so far:

  • POST​​​​​​​ with [Our URL]/TDWebApi/api/[Our ticketing app ID]/tickets/{{ticketId}}/tasks
  • 2 Parameters:
    • ticketId (String from ticket ID)
    • start (UTC_DateTime from ticket custom date/time attribute 'Delivery Time') * I also tried String, and couldn't even pass it over as text in the Task Description
  • Body:
    • {
      "Title":"Deliver Furniture",
      "StartDate":"{{start}}",
      "CompleteWithinMinutes":"60",
      }

Thanks,

Stephen

Asked by Stephen Wichuk on Fri 11/29/24 12:57 PM
Sign In to leave feedback or contribute an answer

Answer (1)

Mark Sayers Mon 12/2/24 12:20 PM

Hi Stephen,

Is it just not passing a value at all when that step executes, or what is the result exactly?

Sincerely,
Mark Sayers
Sr Support Consultant, CS

No feedback
Correct - the result is not passed at all when used in a Workflow Web Service step - I've tried with custom attributes, and also the standard 'Created' attribute, neither work. If I use Web Service Methods \ Test Request and manually enter a fake / string UTC_DateTime value in the parameters section, that value passes OK to generate the task. - Stephen Wichuk Mon 12/2/24 12:45 PM
Have you tried it without putting quotation marks around the parameter reference? I believe date and date/time type custom attributes supply their own quotation marks when the value of that field is passed, so it could be throwing off the call in question. - Mark Sayers Mon 12/2/24 1:59 PM