Zendesk Connect Destination
When you enable Zendesk Connect from the Segment web app:
- Your changes appear in the Segment CDN in about 45 minutes, and then Analytics.js starts asynchronously sending all your analytics data to Segment's servers, and onwards to Connect.
- Your Zendesk Connect real-time feed starts showing visitor data.
If you plan on having both a production and development environment, make sure you enter your Connect API keys into the corresponding Segment sources.
Connect is supported on the client-side, server-side and on mobile.
Connect needs to identify users and their data to track who we should message. Segment will pass your UserID and any traits that you store on that user to Connect. (Note: Segment refers to user data as "traits"; Connect refers to user data as "attributes".)
1analytics.identify({2userId: '019mr8mf4r',3traits: {4name: 'Michael Bolton',5email: 'mbolton@example.com',6phone: '1234567890',7},8context: {9device: {10type: "ios",11token: 'XXXYYYZZZ'12}}});
Segment traits correspond to specific top level attributes within Connect. These attributes are used to send and customize messages on various channels:
namemaps to Connect'sfirst_nameandlast_nameattributes recommended for targeted copy.emailmaps to Connect'semailattribute required for email campaignsphonemaps to Connect'sphone_numberattribute for sms & voice campaignscontext.device.tokenmaps to Connect'sapnsorfcmattribute for iOS and Android Push.timezonemaps to Connect'stimezoneattribute recommended to use Connect's time of day message delivery feature (note - Connect only accepts Olson name values) These are automatically collected if you're using Segment's mobile SDKs.
Connect allows aliasing, which enables you to join an anonymous pre-signup ID with a post-signup userID. When you send an identify call that has an anonymous user, that user will be created using the anonymous id you supply in the identify call. Later, when you want to update this anonymous user's id to their actual id, you can do so by using Segment's alias method. The following is an example alias call from Segment's Analytics.js library:
analytics.alias('019mr8mf4r');
Events and their properties are used to trigger and customize message campaigns within Connect:
1analytics.track('Signed Up', {2plan: 'Startup',3source: 'Analytics Academy'4});
Connect's campaign filters allow you to target specific segments of users based on events, event properties, and attributes. Having specific events and attributes allow you to better target your audiences with custom messaging:

Once a user is sent a message, you will often want to measure whether or not they reach a specific goal. Events are used to calculate if users reach these goals:

Connect shows all received events on the Connect Settings > Events page. Searching for your Segment events will show if it has been received in the last 24 hours and how many times.

If your Segment events do not appear, they have not yet been received by Connect.
Now that everything is hooked up, you can start messaging your users! Check out the following guides at Connect: