Planhat will receive any Segment data you send in without any issues, but Planhat only acts on two types of calls: Identify and Track.
The Segment track call always contains a "user id" - which typically is the end-user id in your own database/system.
If we have the sync with end-users in your system(s) up and running, then matching an event from Segment to an end-user (and customer) in Planhat is trivial. If we don’t have the sync - then Planhat will need more information from the Segment calls to link the end-user to a customer/account.
If you have this information in the tracking call then Planhat will automatically create a new end-user profile (if it didn’t exist before), link it to the correct Customer, and log the activity/event as expected.
Often, this information is not included in the Track event, in which case we’d have to wait for an “Identify” call before we can link an end-user to a Customer.
When we receive a track/identify event from Segment we first look for a matching end-user in Planhat. Both email and "externalId" is leveraged if provided, but either of them is enough.
Planhat first looks for the parameter "data.user_id" in the request from Segment, if that is not present we look for "data.traits.id". We assume the email will be sent as: "data.traits.email"
If we don't find a matching user, during the Identify event, we have the opportunity to automatically create a user on the corresponding company profile, provided your providing your customerId as part of the request.
By default we look for your companyId in "data.traits.companyId" (this should then match the externalId on the Company tab in the import template)
Note: Planhat will drog the request without an error if you:
- don't provide a customer-id matching the companyExternalId in Planhat along with
- the track request, and
- a matching user (that also cannot be found in Planhat)