MonetizationOS Docs
Workflows ReferenceType Definitions

WorkflowContext

type WorkflowContext = {
  botTags: WorkflowBotTag[];
  city: string | null;
  clientIP: string | null;
  continent: string | null;
  cookies: Record<string, string>;
  countryCode: string | null;
  isEUCountry: boolean;
  isVerifiedBotRequest: boolean | null;
  latitude: number | null;
  longitude: number | null;
  metroCode: string | null;
  network: WorkflowNetwork;
  originalUserAgent: string | null;
  postalCode: string | null;
  properties: Record<string, unknown>;
  rawUrl: string | null;
  referer: string | null;
  region: string | null;
  regionCode: string | null;
  timezone: string | null;
  tls: WorkflowTls;
  userAgent: string | null;
};

Properties

botTags

botTags: WorkflowBotTag[];

Tags identifying the bot associated with the request, if any.


city

city: string | null;

clientIP

clientIP: string | null;

The IP address of the original HTTP request client, if forwarded by the client.


continent

continent: string | null;

Continent code, e.g. 'EU'. Derived from countryCode when the CDN does not provide it.


cookies

cookies: Record<string, string>;

Selected cookies from the original HTTP request Cookie header, if forwarded by the client.


countryCode

countryCode: string | null;

ISO 3166-1 alpha-2


isEUCountry

isEUCountry: boolean;

If the country is an EU member state. Derived from countryCode when the CDN does not provide it.


isVerifiedBotRequest

isVerifiedBotRequest: boolean | null;

If the request was verified as coming from a bot. A null value indicates that no determination could be made. For more detailed bot information, see the 'botTags' property.


latitude

latitude: number | null;

longitude

longitude: number | null;

metroCode

metroCode: string | null;

network

network: WorkflowNetwork;

originalUserAgent

originalUserAgent: string | null;

The user agent of the requester, ignoring any supplied override.


postalCode

postalCode: string | null;

properties

properties: Record<string, unknown>;

Additional properties contributed by middleware workflows. These are not set by default and will only contain values if middleware workflows have added them.


rawUrl

rawUrl: string | null;

The full URL of the original HTTP request, if forwarded by the client.


referer

referer: string | null;

The Referer header from the original HTTP request, if forwarded by the client.


region

region: string | null;

Region name, e.g. 'Texas'. Null behind Fastly, which sends only regionCode.


regionCode

regionCode: string | null;

ISO 3166-2 subdivision code without the country prefix, e.g. 'TX'.


timezone

timezone: string | null;

IANA time zone name, e.g. 'America/Chicago'. Behind Fastly, which sends none, the timezone of its POP.


tls

tls: WorkflowTls;

userAgent

userAgent: string | null;

On this page