Use Functions to customize your data pipeline

Andy Yeo on July 16th 2020

More of the customer experience is online than ever before. While this offers your business new opportunities to tailor each user’s journey, it also creates a lot of complexity below the hood. Most companies are using 80+ vendor tools to run their business, and half of the enterprises we surveyed maintain 7+ disconnected islands of customer data.

With so many tools both generating and demanding customer data, your business needs a flexible way to unlock new use cases without reinventing the wheel at every turn. Last year at Synapse, our user conference, we announced the developer preview for Functions to allow early users to connect any tool to Segment using custom JavaScript. And since that introduction, more than 200 companies have built almost 2000 functions.

Today, we’re proud to announce that Functions is generally available to all customers, and you can start building now. If you want to learn more, here are a few of the most common ways customers are using Functions.

Zoom with margin

Build your own sources and destinations

While Segment already supports 300+ sources and destinations, you can use Functions to create your own sources and destinations directly within your workspace to bring new types of data into Segment and send data to new tools:

We’ve seen customers primarily use Functions to build a more complete customer view, with a specific lens toward connecting an internal service or an industry-specific tool to Segment. For example, Adversus is an outbound call center platform that used Functions to create a new data source and destination for their new financial automation tool, Fenerum

By integrating Segment to Fenerum using Functions, the Adversus team is able to keep track of changes in user subscriptions and related invoices in real-time. These integrations have also empowered their Finance team to use their data warehouse as a source of truth for their own analysis. 

At Adversus, we need the freedom to control our data and Functions lets us do just that. Integration projects are now done in a few days instead of weeks, and our development team can focus on the core product development instead of internal IT projects. We’re now looking to move even more of our data integrations into the Segment product. Mads Jepsen, Co Founder, Adversus

Balance data quality and flexibility

When your business has multiple business units or products, it can be tough to balance keeping data clean and reliable across the company, while also making it work for every tool your teams use.

For Adevinta, a marketplace specialist with over 30 brands, this had led to serious data inconsistencies in order to optimize their ad performance.

One of their real estate brands, Fotocasa, wanted to advertise to users via Google, Facebook, and Criteo with personalized ads based on whether users want to buy or rent. Their data team wanted to keep the data clean with a single event for House Lead, with properties for type: sell and type: rent to help them avoid reporting on redundant events. However, their ad tools required them to send two separate events for Sell House Lead and Rent House Lead for personalization.

In order to better balance data quality and ad performance, Adevinta created a Source Function to collect a single House Lead event and create separate events downstream so their ad platforms could properly use the data. This quick solution helped them keep their global analytics clean while unlocking better personalization for Fotocasa.

Zoom with margin

Not only does this save them hours of engineering and reporting time, but it also helped them further optimize their ads to create a 4-5x improvement in campaign performance.

Automate away complex workflows

With Functions, you can go far beyond implementing new tools by creating functions that allow you to automate away complex workflows. This is especially true for industries like consumer packaged goods where offline and online data need to interplay to create great experiences.

A multinational CPG business is using Functions to provide delivery visibility for the store owners who distribute their products. They use Foxtrot to manage deliveries in Latin America, and every time a delivery is about to go out, Foxtrot triggers a route created event that contains the IDs of all the stores that are going to get hit on that route.

By plugging that same data into Segment using a Source Function, they can use Segment to match Foxtrot data, customer ID, and store ID. They can then pass that data from Segment to Braze, which triggers a message to the store owners informing them their items are out for delivery. 

Even more impressive is that they were able to complete the entire project within four days, giving them a huge personalization win in less than a week. 

Ready to take your data pipeline to the next level?

Functions is built on AWS Lambda, and we’ve continued to rapidly expand the feature set since our developer preview. We’ve partnered with early users to build in more ease-of-use and reliability to ensure the functions you build can truly become core to your data pipeline. 

Here’s what we’ve improved over the last few months:

  • Error tracking: You can find useful information about errors triggered within your function in both our debugger and in event delivery.

  • Advanced permissions: You now have more control over who can create, edit, or deploy functions in your workspace.

  • Data replay for Source Functions: We’ve built a tool to help establish more reliability for your event pipeline and to help respect GDPR/CCPA compliance.

  • Custom settings for Destination Functions: You can now include configurable fields either required or encrypted for things like API keys, secrets, and event mapping.

  • Autofill for Destination Functions: Test your function with real events from any of the active sources within your Segment workspace.

Functions is a paid product, but every customer is granted a generous set of compute hours to build, test, and use Functions for your business. We invite you to start building within your workspace today

If you want to learn more first, check out our docs, request a personalized demo, or sign up for our upcoming webinar

Download The Customer Data Platform Report 2020

Packed full of market trends, analysis, and insights that we've summarized from talking to our thousands of customers.

Become a data expert.

Get the latest articles on all things data, product, and growth delivered straight to your inbox.