Fluent Commerce Logo
Docs
Sign In

Customer

Feature

Changed on:

20 Nov 2023

Overview

This module creates customers in Fluent when an order is created in Adobe and before it is pushed to Fluent.

Key Features:

  • Creates a customer when one doesn’t exist in Fluent after an order is placed in Adobe.
  • The key identifier of a customer is its username (customer email in Adobe). When a customer is pushed to Fluent, it will carry a prefix of the 
    `retailer ID`
     it belongs to. That means the same 
    `username/email`
     will generate a new customer in Fluent for different 
    `retailers`
    . There is also no distinction between a guest user and a registered user when they are pushed to Fluent. If the same email is used for guest checkout and a registered checkout, both orders will be linked to the same customer in Fluent.
  • This is not an integration to keep customers in sync between the two systems. It does not update the customer after it has been created in Fluent. A customer is only created if one doesn’t exist in Fluent when an order is placed. If an existing customer places subsequent orders then this integration will not be executed, meaning no customer updates will be pushed should they exist. The order will use the existing details that are present at Fluent.

Detailed Technical Description

The customer extension listens for events emitted by the order module whenever an order is placed. This is a system event called 

`fluent_order_push_before`
. As the extension supports multi-retailer setups, customers will carry retailer identification prefixed at the 
`username`
. For example: 
`username`
`1_jonh.doe@fluentcommerce.com`
.

The entry point of this module is the observer FluentConnector\Customer\Observer\SetFluentCustomerId class that listens for the event “fluent_order_push_before event”. This Observer uses two services; 

`FluentConnector\Customer\Service\GetCustomer`
 and 
`FluentConnector\Customer\Service\CreateCustomer`
. The first one is responsible for checking if the customer exists in Fluent and the second one is for creating customers in Fluent.

No alt provided

Failures running the customer flow above will also cause a failure to create order flow.

Customer Events

Create Customer

Name

Description

Parameters

fluent_customer_create_payload_prepare_after

Allows customization of the customer payload used to on the next phase to build the mutation request to Fluent.

order of type OrderInterface

request_data of type CustomerCreateDataInterface



fluent_customer_create_prepare_query_fields

Allows customization of the fields passed to the createCustomer mutation.

field_list of type array

fluent_customer_create_prepare_query_variables

Allows customization of the variables passed to the createCustomer mutation.

variables of type array

request_data of type CustomerCreateDataInterface



Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo