Skip to content

Fine network traffic control

Request processing policies

Braze allows the user the option to control network traffic using the following protocols:

Automatic request processing

RequestPolicy enum value: automatic

This is the default request policy value. With this value, immediate server requests are performed when user-facing data is required for Braze features, such as in-app messages.

The Braze SDK will automatically handle all server communication, including:

  • Flushing custom events and attributes data to Braze servers
  • Updating Content Cards and geofences
  • Requesting new in-app messages

To minimize server load, Braze performs periodic flushes of new user data every few seconds.

Manual request processing

RequestPolicy enum value: manual

This protocol is the same as automatic request processing except:

  • Custom attributes and custom event data are not automatically flushed to the server throughout the user session.
  • Braze will still perform automatic network requests for internal features, such as requesting in-app messages, Liquid templating in in-app messages, geofences, and location tracking. For more details, see the Braze.Configuration.Api.RequestPolicy.manual documentation. When these internal requests are made, locally stored custom attributes and custom event data may be flushed to the Braze server, depending on the request type.

Manually flushing user data

Data can be manually flushed to Braze servers at any time using the following method:

1
AppDelegate.braze?.requestImmediateDataFlush()
1
[AppDelegate.braze requestImmediateDataFlush];

Setting the request processing policy

Set request policy on startup

These policies can be set at app startup time when you initialize the Braze configuration. In the configuration object, set the Braze.Configuration.Api.RequestPolicy as shown in the following code snippet:

1
configuration.api.requestPolicy = .automatic
1
configuration.api.requestPolicy = BRZRequestPolicyAutomatic;
HOW HELPFUL WAS THIS PAGE?
New Stuff!