To learn more about webhooks, please visit our standard API documentation. If you are unable to view, please reach out to support@sighten.io and they will provide access.
The Milestone Webhook Statuses + DAL
The milestone webhook is sent to the configured endpoint whenever a milestone is submitted for approval, rejected, or approved. Depending on your level of integration, you may only want to consume to “Submit for Approval” webhook as that can be used as a trigger to transfer information in real-time. You may also want to complete the full operational process via the API; they will result in utilizing other APIs to post approvals or rejections, and leave comments. With the automatic update from the webhook, you can pull down all the homeowner, usage, project, quote, report, or change order data that you need without any additional user interaction: simply fire off another request to pull down the data. You can learn more about the DAL here.
Fields in the Milestone Webhook
Upon receiving the milestone webhook, most integrated partners store down the following:
site (uuid) - this is the site UUID - this ID is 1:1 with a job in Sighten. You may want to use this to create a new record in your portal and maintain the job sync, or use the identifier to find a job that already existing in your portal.
quote (uuid) - this is the quote UUID is similar to the site ID, except that it is not 1:1; there can be any number of quotes on a given job (or site). The quote ID is also important here because it signifies and helps access all the contracted details. Please note that if a change order task is completed within the milestone for a different quote, and then the webhook is sent, the quote UUID will still be the initial quote.
sub_tasks > data > documents > uuid - you will need to store this information and make a GET request to: /api/v1/document/{uuid}/download/ to download the document. You will take the document uuid where the "creation_type" is "UPLOADED".
You can also access a direct link for the document via: /api/v1/document/{uuid}/preview
There is A LOT more data in the contract webhook. If you have any questions, please reach out to support@sighten.io.
Milestone Webhook and Re-signs
Given a re-sign utilizing a different quote completed within a milestone, when a webhook is sent for that milestone, it will contain the original quote UUID. To get the new quote ID, make the following request and store the UUID:
GET /api/data/workflow/?metrics=s_quote_id"e_id={original_quote_id}
Then you can make all DAL requests via the quote
path with the new UUID.
Sample Milestone Webhook
{ "comments":[ { "commentor_first_name":"Sighten", "comment":"Sighten Bot submitted milestone Construction & Signoff for approval.", "commentor":"sightenbot@sighten.io", "timestamp":"2018-08-30T15:11:33.442761Z", "uuid":"b6f4916e-9d54-4f6c-b45a-1524e67bf8d6", "thread":"None", "commentor_last_name":"Bot" }, { "commentor_first_name":"Sighten", "comment":"Sighten Bot approved milestone Construction & Signoff.", "commentor":"sightenbot@sighten.io", "timestamp":"2018-09-04T17:11:58.241730Z", "uuid":"fc192f3b-4b67-467e-ab4d-3ff4594c0fe9", "thread":"None", "commentor_last_name":"Bot" } ], "tasks":[ { "description":"Indicate that all equipment required for installation has been obtained", "uuid":"78a88ad2-dfd7-43c3-9233-bb733b563a38", "assigned_to":{ "email":"operations@sighten.io", "organization":"e62239df-7f3a-4ead-b4cd-500541f8b094", "last_name":"Operations", "uuid":"87066329-aac9-4979-91c1-cbeaa4c6abc5", "organization_name":"Sighten Solar", "first_name":"Generic" }, "sub_tasks":[ { "data":False, "instructions":"None", "label":"Mark Complete", "uuid":"d5ab54fe-639e-4901-9371-9b2ffda0a19b", "document_status":"NOSTART", "category":"CHECKBOX", "status":"INCM", "required":False }, { "data":{ "envelopes":[ ], "documents":[ ] }, "instructions":"None", "label":"Equipment Delivered", "uuid":"59a452df-4b6d-4c1d-9145-cd2e98e20c3e", "document_status":"NOSTART", "category":"DOCUMENT", "status":"INCM", "required":False } ], "name":"Equipment Delivered", "status":"APPROVED" }, { "description":"Upload signed city or county inspection job card", "uuid":"9cd85c68-8e8b-4721-b7d9-ca021aaca6b0", "assigned_to":{ "email":"operations@sighten.io", "organization":"e62239df-7f3a-4ead-b4cd-500541f8b094", "last_name":"Operations", "uuid":"87066329-aac9-4979-91c1-cbeaa4c6abc5", "organization_name":"Sighten Solar", "first_name":"Generic" }, "sub_tasks":[ { "data":{ "envelopes":[ ], "documents":[ { "date_created":"2018-08-30T15:10:57.769239Z", "creation_type":"UPLOADED", "uuid":"189bd7c0-2e6f-45cb-a00e-33ca4fe297d2", "name":"Silver-Inspection (Passed).pdf", "document_group":"b6bdddf9-9d3e-4d0d-b44f-ae97a41753ef", "document_type":"OTH" } ] }, "instructions":"None", "label":"Inspection Completion", "uuid":"030904c4-a51d-4b55-b9fe-8df2eb2d79d1", "document_status":"UPLD", "category":"DOCUMENT", "status":"COMP", "required":False } ], "name":"Inspection Completion", "status":"APPROVED" } ], "pending_task_count":0, "ready_task_count":0, "uuid":"7a605ec8-d276-4d6c-bd47-52a483e28783", "rejected_task_count":0, "date_updated":"2018-09-04T17:11:58.049354Z", "ready_to_submit":True, "site":"157802b4-99aa-4437-b250-934df337766a", "name":"Construction & Signoff", "status":"APPROVED", "task_count":2, "quote":"8ba871ae-3282-420c-af3f-ddc41ac50273", "assigned_to":{ "email":"operations@sighten.io", "organization":"e62239df-7f3a-4ead-b4cd-500541f8b094", "last_name":"Operations", "uuid":"87066329-aac9-4979-91c1-cbeaa4c6abc5", "organization_name":"Sighten Solar", "first_name":"Generic" }, "milestone_definition":"01362295-1d44-4eea-9234-898bb3073709", "approved_task_count":2, "description":"" }