We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Aug 31, 2022 12:30 AM
I'm using an API to generate contacts and tasks for those contacts.
I need that task's due date and time to be specified.
All references I've found for the due date mention using the timestamp property, however this has never worked. The reminder due date is set, but in the same manner. Unset due date and time.
Reminder set using this --> DateTimeOffset.Now.AddDays(5).ToUnixTimeMilliseconds()
how we set Due Date &Time ???
api.Engagement.Create(new EngagementHubSpotModel()
{
Engagement = new EngagementHubSpotEngagementModel()
{
Type = "TASK",//used for file attachments
OwnerId = TaskOwnerId
},
Metadata = new
{
body = TaskBody,
subject = TaskSubject,
status = "NOT_STARTED",
taskType = "CALL",
priority = "MEDIUM",
timestamp = DateTimeOffset.Now.AddDays(5).ToUnixTimeMilliseconds(),
sendDefaultReminder = true,
reminders = DateTimeOffset.Now.AddDays(4).ToUnixTimeMilliseconds()
},
Associations = new EngagementHubSpotAssociationsModel()
{
ContactIds = new List<long>() { 3351 } //use the ID of the created contact from above contact.Id.Value
},
Attachments = new List<EngagementHubSpotAttachmentModel>()
{
//new EngagementHubSpotAttachmentModel()
//{
// Id = fileId
//}
}
});
Sep 26, 2022 2:00 AM
I'm using an API to generate contacts and tasks for those contacts.
I need that task's due date and time to be specified.
All references I've found for the due date mention using the timestamp property, however this has never worked. The reminder due date is set, but in the same manner. Unset due date and time.
Reminder set using this --> DateTimeOffset.Now.AddDays(5).ToUnixTimeMilliseconds()
how we set Due Date &Time ???
Sep 1, 2022 1:20 PM
Hi, @DSapphire 👋 Thanks for providing your example. Hey, @JBeatty, do you have any experience here?
Thank you for taking a look! — Jaycee
Sep 21, 2022 3:14 AM - edited Sep 21, 2022 3:16 AM
Hello @Jaycee_Lewis,@JBeatty Thank you for your response, however we still don't understand how to set the task's due date and time via an API call.
-In all reference seen like dd timestame property in engangement but, in this class not feasible.
so , please suggest us.
Here, seen but not possible to do like this
We eagerly await your thoughtful response and solutions.
Sep 12, 2022 12:47 AM
Hello @Jaycee_Lewis, Thank you for your response, however we still don't understand how to set the task's due date and time via an API call.
We eagerly await your thoughtful response and solutions.