User Agent Information in Delivery Estimate API

User Agent Information in Delivery Estimate API

User’s device details are an important attributes to determining where the delivery dates are performing well. For some retailers, the mobile version of dates may work better and for some others, the Desktop. So, capturing this information will help Fenix to do some analysis on those lines and empower more conversion in the respective cohorts.

API Changes

When retailers integrate Fenix via the the headless API, they can send the browser’s useragent or a set of values that represent the useragent object.

In the EDD delivery request object, either of the following information can be added to send the information.

The User Agent Raw String

This value should contain the raw user agent string without any modifications.

"userAgentInfo":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0"
Sample Request
{ "sessionTrackId": "MTc0NDI1MTYwNzk3MC13d3cua3VpdS5jb20tMTA5OTc=", "fenixSSID": "MTc0NDI1MTYwNzk3MC13d3cua3VpdS5jb20tMTA5OTc=", "buyerZipCode": "94086", "monetaryValue": 89, "pageType": "PDP", "responseFormat": "json", "skus": [ { "sku": "15027-RG-L", "quantity": 1 } ], "buyerAddress": { "country": "US", "zipcode": "94086" }, "userAgentInfo": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0" }

 

Formatted User Agent Details

This process follows retailers to parse the user agent details locally and send the formatted data in the delivery request object.

"userAgentDetail": { "browserName": "Safari", "browserVersion": "18.1.1", "osName": "iOS", "osVersion": "18.1.1", "deviceName": "Apple iPhone", "deviceBrand": "Apple", "deviceCpu": "Unknown", "deviceCpuBits": "Unknown", "layoutEngineName": "AppleWebKit", "layoutEngineVersion": "605.1.15", "webviewAppName": "Unknown", "webviewAppVersion": "??", "networkType": "Unknown" }

Out of the available fields, Fenix would need the following values at a minimum.

  • browserName

  • osName

  • deviceName

  • deviceBrand

Sample Request
{ "sessionTrackId": "MTc0NDI1MTYwNzk3MC13d3cua3VpdS5jb20tMTA5OTc=", "fenixSSID": "MTc0NDI1MTYwNzk3MC13d3cua3VpdS5jb20tMTA5OTc=", "buyerZipCode": "94086", "monetaryValue": 89, "pageType": "PDP", "responseFormat": "json", "skus": [ { "sku": "15027-RG-L", "quantity": 1 } ], "buyerAddress": { "country": "US", "zipcode": "94086" }, "userAgentInfo": { "browserName": "Safari", "browserVersion": "18.1.1", "osName": "iOS", "osVersion": "18.1.1", "deviceName": "Apple iPhone", "deviceBrand": "Apple", "deviceCpu": "Unknown", "deviceCpuBits": "Unknown", "layoutEngineName": "AppleWebKit", "layoutEngineVersion": "605.1.15", "webviewAppName": "Unknown", "webviewAppVersion": "??", "networkType": "Unknown", "remoteAddress": null, "remoteHost": null, "remoteUser": null } }