Customer
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 it belongs to. That means the same
`retailer ID`
will generate a new customer in Fluent for different`username/email`
. 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.`retailers`
- 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`
`username`
`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`
`FluentConnector\Customer\Service\CreateCustomer`

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 |