Attach your own ID with traceId
Add your own request or lead ID to a form link and get it back on the webhook for that submission.
Every visit to an InsurGrid form gets a trace ID: one value that follows the visitor through the form, any carrier login after it, and into the webhooks you receive. InsurGrid creates one automatically. If you'd rather it was your ID, such as a request ID, lead ID or CRM record ID, put it on the form link and it comes back to you on the webhook for that submission.
That way you can match each submission to your own record directly, without matching on names or email addresses.
Add it to the link
Add traceId to the form's link as a query parameter:
https://link.insurgrid.com/jane-smith/form/f_9c2a7b1e4d/apartment-intake-acme?traceId=REQ-48213It works the same with other parameters, for example when embedding:
https://link.insurgrid.com/jane-smith/form/f_9c2a7b1e4d/apartment-intake-acme?embed=1&traceId=REQ-48213The parameter name is case-sensitive: traceId, with a capital I.
Nothing needs setting up in InsurGrid first. Any published form link accepts it, on staging (link-staging.insurgrid.com) and production (link.insurgrid.com).
If you leave it off
traceId is optional. Without it, InsurGrid generates a trace ID for each visitor: a random UUID such as 3f6c1a9e-8b2d-4e57-a1c0-7d94e2b5f018. It behaves exactly like one you supply. It covers the whole visit and comes back as data.trace_id on the same webhooks. The only difference is that you have no record of it on your side until the first webhook arrives.
So you can add traceId to some links and not others. Links without it keep working as they always have.
What a valid trace ID looks like
64 characters or fewer.
A longer value is ignored on the form-submission event, which then shows trace_id: null. The form still submits normally, so there is no error to warn you.
Letters, digits, -, _ and . only.
Other characters can be dropped or rejected along the way. Spaces and non-English characters are the usual problem.
URL-encoded.
Use encodeURIComponent (or your language's equivalent) when you build the link.
Not personal data.
The ID is stored with the submission and appears in logs. Use an opaque ID, never an email address, name or phone number.
A UUID, or your own prefix plus a number (REQ-48213, lead_9f2a7b), is ideal.
One ID per person
Generate a separate link for each person you send the form to, each with its own ID.
Everything that happens on a link carrying a traceId is filed under that ID. If you put the same ID on a link you send to many people, or on a button on your public website, every one of those submissions arrives with the same trace_id and you can no longer tell them apart.
For a link shared with many people, leave traceId off and let InsurGrid create one per visitor.
Where you get it back
The ID comes back as trace_id inside data, on both webhook events.
form-submission
Sent when the person submits the form. trace_id is the value from the link:
The full payload is in Webhook events & payloads.
client-submission
If the form hands the person over to log in to their insurance carrier, the policy data that comes back from that login arrives later as a client-submission event. It carries the same trace_id:
The same applies to an ordinary policy-connect link (one without /form/ in it): add ?traceId= and it comes back on client-submission.
When trace_id is null
Treat trace_id as optional and handle null. You will see it when:
the value on the link was longer than 64 characters;
the submission didn't start from a browser visit to a link, for example a document uploaded directly in the dashboard.
How long the ID lasts
The ID is held in the visitor's browser and stays active while they keep using InsurGrid, until they have been away for an hour. So:
Reloading the page, going back a step, or carrying on to a carrier login all keep the same ID. Nothing extra needs adding to later pages.
If the same browser opens a link without a
traceIdwithin that hour, it reuses the last ID. In practice that only matters when one person tests several links in a row, as in the next section.Opening a link with a different
traceIdalways switches to the new one straight away.
Test it
Build a link with a test ID, e.g.
?traceId=test-001, on a published form.Open it in a new private or incognito window so no earlier ID is carried over.
Submit the form all the way to the confirmation screen.
Check the
form-submissionevent that reaches your endpoint (or the webhook logs in the dashboard).data.trace_idshould betest-001.
For each new test, use a new ID and a fresh private window.
Related
Delivery & de-duplication: de-duplicate on
submission_id, nottrace_id, because one trace ID can cover more than one event.
