Sessions
About sessions
When a user tells Delivery Gateway they need a delivery, DGW creates a session. A session is the process of setting up a delivery, from selecting the delivery method to providing the user details and then confirming the delivery.
- Lightweight frontend integration: When only the Delivery Gateway frontend is integrated to your e-commerce platform, our Web Plugin creates and manages sessions.
- Full backend integration: Your e-commerce platform's backend is connected to the Delivery Gateway backend and uses the Merchant API to handle sessions.
The full integration sequence looks like this:
Session ID
The session ID is the main identifying information of a session. It is automatically generated whenever you create a new session. To update an existing session, you always need the session ID.
Session details
During a full session, the session is updated with the necessary information regarding one or more deliveries. It can receive default settings from the merchant configuration and provider configuration, but you can individually override each and every one of these settings during the process.
For example, the currency of the session determines which currency is shown to display prices during the session. The default currency is the one specified in the merchant configuration. Similarly, you can configure the language of the session: the default value is that of the browser or OS locale.
You can also update pricing for a session, overriding any of the pre-configured pricing rules. For example, you can create special promotions or offer free shipping by updating the pricing value.
Authenticated customers
A Delivery Gateway session doesn't require customer authentication: a session can be executed in a full with an anonymous user. However, authenticating a customer has several potential benefits, such as saving and reusing addresses, or offering previously selected pickup points.
An authenticated customer is referred to by its reference ID. This is generated and assigned to the customer by your system. During a session, an authenticated customer can create, update, and delete their address information, including email address and phone number.
Delivery options
By default, the merchant configuration and the provider configurations determine what delivery methods and which providers are available for a session. However, you can always override these settings during a session: for example, you can enable home delivery even if it's disabled by default, or disable a provider that is otherwise available.