Chord Analytics
Chord CDP
CDP Functions
6 min
note functions are only available to chord users who are assigned a developer role on the platform due to the technical nature of this feature all other roles can view existing functions but cannot edit or delete functions for additional support, please reach out to help\@chord co introduction in chord, functions are customizable data workflows that process, transform, or enrich the raw data flowing through your brand’s stack chord functions are javascript snippets that run before data is sent to a particular destination they let you tailor how data is handled—whether it’s standardizing event names, enriching user profiles, or formatting data for downstream tools—so you can keep your insights clean, consistent, and actionable in other words for marketers , chord cdp functions are more like custom built control panels they give your team the flexibility to reshape data in real time, enrich it with external info, or even decide what gets sent where—perfect for brands needing more control, precision, and adaptability for developers , chord cdp functions offer broader execution power they act like real time serverless functions with support for external api calls, persistent key value storage, and conditional logic you can reshape event streams on the fly, enrich payloads, or build highly dynamic routing logic—ideal for engineering teams looking for full control over their pipeline behavior some additional use cases for functions include filtering out unwanted events , e g dropping events from certain test sources normalizing event data , e g standardizing the event type (“page view”, “pageview”, “pageview” → “page”) so downstream schema remains clean enrichment , such as adding geo location data, parsing user agent, or pulling additional data from external apis or your warehouse routing/changing destinations , such as dynamically change which table/destination an event is sent to create a function to create a function, developer users can follow the steps below log into the chord data platform click into the chord cdp navigate to the functions tab click the "+ new function" button click into the function name field at the top left and give your function a name or title click the ✔️ icon to save the function name add your function code into the space below click the "save" button to save your function debugging functions chord cdp comes with a functions debugger and editor that allows you to run a function on sample data within a function, you have access to logs which will emit debug / information messages here, you can instrument your javascript to print out event contents, branching logic, and intermediate values to help trace what the function is doing additionally, you can check the last run result tab within a specific function to see what the function returned whether it dropped the event, modified it, or forwarded it this tab will include logs, errors, or additional metadata about that run you will be able to see exactly how the function behaved for the latest event and catch transform/filter mistakes edit functions log into the chord data platform click into the chord cdp navigate to the functions tab find the existing function you'd like to edit click the ✏️ icon under the actions column next to the function you want to edit delete functions log into the chord data platform click into the chord cdp navigate to the functions tab find the existing function you'd like to delete click on the three vertical dots under the actions column next to the function you want to delete click the 🗑️ icon to delete the desired function