Build your own

Add your own data service or custom engine to Pipeline API, or derive new properties from the ones it already returns with a short script. Combine the result with our device detection, IP intelligence, and geolocation data in one response.

An example element, a date of birth in and a star sign out

{
  "dateofbirth": "1992-11-05",
  "starsign": "Scorpio"
}

Example A custom flow element that turns a date of birth into a star sign

What you need to know

🔗

A pipeline is a chain of elements. The evidence from a request, such as its headers and IP address, goes in at one end. Each element adds its properties, and an element can read the properties the elements before it added.

Evidence, the request's headers and IP address go in. Our engines add device and location properties. Your element adds your own data. Derived properties add new properties worked out from those. One result, your application reads every property from one place. Evidence headers, IP Our engines device, location Your element your own data Derived new properties One result every property

Your application reads every property from one result, whichever element added it.

Read about Pipeline API

🔗

This example shows a very simple flow element which takes a date of birth and returns a star sign. Although a basic (and not all that useful) flow element, the example demonstrates how you can start to implement your own flow elements.

On-premise custom flow element, C#
public class SimpleFlowElement
    : FlowElementBase<IStarSignData, IElementPropertyMetaData>
{
    public override string ElementDataKey => "starsign";
    public override IEvidenceKeyFilter EvidenceKeyFilter =>
        new EvidenceKeyFilterWhitelist(
            new List<string>() { "date-of-birth" });
    protected override void ProcessInternal(IFlowData data)
    {
        StarSignData starSignData = (StarSignData)data.GetOrAdd(
            ElementDataKey, CreateElementData);
        if (data.TryGetEvidence(
            "date-of-birth", out DateTime dateOfBirth))
        {
            var monthAndDay = new DateTime(
                1, dateOfBirth.Month, dateOfBirth.Day);
            foreach (var starSign in _starSigns)
            {
                if (monthAndDay > starSign.Start &&
                    monthAndDay < starSign.End)
                {
                    starSignData.StarSign = starSign.Name;
                    break;
                }
            }
        }
        else
        {
            starSignData.StarSign = "Unknown";
        }
    }
}

The full C# on-premise example

Read the custom element example

🔗

A derived property is worked out by rules from properties that other elements have already returned, such as banding a number or combining two answers into one. Each one is a single YAML or JSON file, so adding a property takes no code.

The script below says whether a browser is a recent release. Where a property it names cannot be read, it returns no value and a message naming that property, rather than a guess.

A derived property script, YAML
Format: 1
Name: BrowserCurrency
Version: 0.1.0
Output:
  Name: BrowserCurrency
  Description: Whether the browser making the request is a recent release.
  ValueType: string
  IsList: false
  IsMandatory: true
  Category: General
  Values:
    - Name: Current
      Description: Released in the last twelve months.
    - Name: Dated
      Description: Released more than twelve months ago.
Checks:
  Known:  { Property: device.BrowserReleaseYear, Gt: 0 }
  Recent: { Property: device.BrowserReleaseAge,  Lt: 12 }
Rules:
  - When: { Failed: Checks, Eq: 0 }
    Then: Current
  - Else: Dated

Add scripts to a .NET pipeline with the FiftyOne.Pipeline.DerivedProperty package, and try one in your browser with the script tester.

Read about derived properties

🔗

You can combine our device detection and geolocation results with your internal user profile data in the same pipeline.

A single API call can return the data from the services you combine. Your application reads the combined response.

Read about Pipeline API

🔗

If you want to offer your data service through Pipeline API, talk to us about deployment and sales support.

Talk to us

Pick one to find out more

Each heading opens a short answer, with code where there is some, and a link to the documentation for more.

Read the custom element example
Why build your own?

Why build your own?

Sell your data services to others

If you want to offer your data service through Pipeline API, talk to us about deployment and sales support.

Add properties without code

Derived properties turn the properties you already have into new ones, with rules in one short file.

Streamline the data services you use

You can combine our device detection and geolocation results with your internal user profile data in the same pipeline.

A single API call can return the data from the services you combine. Your application reads the combined response.