I've run into some walls, esp. when it comes to templating and OAuth.
Templating issue:
Header Template
-------------------
MindFlash {{extraData.Data.Description}} Progess
Detail Template
-------------------
#### {{extraData.Data.Description}} Progress {{#each extraData.Data}} **{{Time}}**: Course: {{Name}}<br/> Status: {{Status}}<br/> Status: {{Progess}}<br/> {{/each}}
Exampple data set
-------------------
Array
(
[extraData] => Array
(
[Data] => Array
(
[Description] => Course
[0] => Array
(
[Time] => 1970/01/01 00:00:00
[Name] => School Zones Test (for Marlene) (id# 5057068606017)
[Status] => MissedCompletionDeadline (In-Progress)
[Progess] => (0)
)
)
)
)
Its response was
-------------------
{"id":1010481,"name":"MindFlash Display","headerTemplate":"MindFlash {{extraData.Data.Description}} Progess","detailTemplate":"#### {{extraData.Data.Description}} Progress {{#each extraData.Data}} **{{Time}}**: Course: {{Name}}<br/> Status: {{Status}}<br/> Status: {{Progess}}<br/> {{/each}}","applicationId":233091,"objectType":"CONTACT"}
When I go into the documentation for timeline creation-- https://legacydocs.hubspot.com/docs/methods/timeline/create-or-update-event --
I saw this in the examples:
If event type 123 has a numeric property called presentationId,
the following would also be a valid JSON to send for that
event type:
{
"id":"3",
"objectId":1,
"eventTypeId":"123",
"presentationId":"9876543",
"extraData":{
"name":"JohnDoe",
"weather":"Cloudy"
}
}
Nowhere else do I see a reference to presentationId
I am writing this in PHP and using the Hubspot library I grabbed from Github.
How do I associate this template with the data coming into Hubspot?
=============================
The OAuth issue:
I have a second issue:
When the token ages out, the script is redirected to Hubspot for reauthentication.
I intended to run this app via a cron job that will automatically post its data to Hubspot on a recurring basis. If the script needs to go through a periodic reauthentication every couple days I'm not going to be able to leave it to run in an automated fashion.
Does anyone know if the templating functionality from Hubspot documentation is in production? When I get into the specifics, it seems like there are holes as though the documentation is for as-yet-to-be-released functionality.