Order Management System for Salesforce Commerce Cloud
What Is an Order Management System?
An order management system (OMS) is everything that happens after clicking the buy button. OMS supports all the stages in your company’s sales process; from order creation through delivery and even returns.
It also helps you organize and automate key parts of the purchasing/fulfillment processes for you and the customer.
Why do Sellers Need an Order Management System?
Online OMSs are centralized platforms that allow for the monitoring of all orders, regardless of how they were received.
Also, OMS can increase the efficiency of your order management process. Automating many steps that previously required manual involvement may increase customer satisfaction and enhance your cash flow and profitability. Additionally, it helps you meet customers’ expectations to have flexibility in ordering, picking up, receiving, and returning products.
Advantages of having OMS
Having OMS will provide a lot of advantages. The list below is the key benefits:
- Order flow automation from shopping to shipping; flow automation will help control costs and generate revenue by automating manual processes and reducing errors. As this process touches everything in the supply chain such as components suppliers and packaging services or distribution centers.
- Inventory management; Manage inventory-related activities such as checking and maintaining availability, picking, packing, and shipping. This gives better visibility into sales and helps you optimize inventory levels so that you meet customer demands while minimizing excess stock as it coordinates orders and inventory across multiple channels which leads to efficiently matching orders to inventory as well as keeping you updated on inventory levels to prevent stock-outs
- Analytics and Reporting; OMS platforms can deliver fulfillment reporting and insights so you can track order fill time, costs related to fulfillment like picking, packing, and shipping, and even product defect and return rates, however, monitoring these is the first step to identifying inefficiencies and developing a plan to address them.
- Robust customer care/satisfaction; Customers can use OMS to track order status also customer care team can track order status and have full visibility of the order life-cycle, and it connects commerce to customer service.
Salesforce Order Management System (OMS)
Cloud-based OMS provided by Salesforce.
Why SOM?
- Cloud-based OMS; Software as a service (SaaS) has faster and easier deployment, “pay as you grow,” options for better scalability and access from anywhere there’s an internet connection with a browser or mobile app, which doesn’t require that you maintain hardware or install the software.
- Easy to create/assign roles and permission sets, roles and permission sets work together to determine what users can see and do inside SOM.
- High performance and reliability.
- Robust partner and third-party party ecosystem with AppExchange. One of Salesforce’s best features is its sizable “app store” for business software.
- Ease and flexibility of customization. By using a combination of declarative tools and settings (“clicks not code”), users may configure both the user experience and business logic. They can even further personalize these aspects by using Apex code and Lightning Web Components from Salesforce.
- The Salesforce OMS interface utilizes the Lightning interface as such customer care can browse order information in a minimal number of clicks. Moreover, with Salesforce Lightning App Builder, the screens are highly customizable to match users’ preferences without development engagement.
- Salesforce OMS uses Salesforce Flows; SF Flows allow you to build complex business automation using clicks instead of code. Since you won’t need a Salesforce developer’s assistance to tackle the bulk of difficult business requirements, Flows will be your best buddy as an admin!
- Avoid cross-platform integrations and middleware and keep order data centralized and accessible. As a result, additional Salesforce services like Marketing Cloud, Service Cloud, Einstein, OMNI Channel, etc., can access order data.
SOM & SFCC Compatibility
Salesforce Commerce Cloud (SFCC) offers eCommerce solutions for B2C (business to consumer) and B2B (business to business) customers.
Why Salesforce Order Management system and SFCC better together
- ZERO CODE integration; Salesforce Order Management natively supports integration with SFCC.
- Order and customer data are flowing from SFCC to OMS in real time and seamlessly
- Less work for the Customer Care team.
- Salesforce B2C commerce has an OOB cartridge named “plugin_ordermanagement” which supports the following main functionalities:
- Real-time order history search and view order status.
- The customer can initiate a return.
- Shoppers can cancel an order.
SFCC & SOM Integration checklist
SOM doesn’t need any code to integrate with SFCC. Instead, some configurations need to be made on both sides. To avoid spending hours to figure out why orders aren’t flowing from SFCC to SOM correctly:
- Make sure that both SFCC and SOM support the same set of applicable currencies.
- When creating the order delivery method into SOM, make sure that the “Reference Number” is matched with SFCC shipping method ID.
- When you set up Payment Gateways in SOM, make sure that “External Reference” is matched with SFCC Payment Process.
- Pay extra attention to giving the proper permission (access) to the B2C permission set when you create a custom record type such as Payment Method or Accounts.
- Custom attributes from SFCC are automatically mapped to SOM objects. You must ensure that the field ID and data type match. And the B2C permission set must have the appropriate read/write access.
- Pay more attention to data mapping between SFCC and SOM as in some instances SOM stores two or more SFCC attributes into a single field as such Account.Name consists of SFCC address company name, first name, and last name, so in such cases, you should pay attention to the SOM data field length limitation.
- Custom attributes from SFCC to SOM are automatically mapped. However, if there is an object that doesn’t support custom attribute auto-mapping such as “Account”, “OrderDeliveryGroup”…etc., you should write an APEX code to map those attributes accordingly.
SOM Order Life Cycle
The milestones listed below can be used to summarize the order life cycle:
- Summary Creation
- Allocation – Fulfillment
- Invoicing
Order Summary Creation
Order Summary pulls data from an underlying Order representing the original transaction order. Considering that the order is the original for the order summary; The order summary consolidates all order information; from capture through fulfillment, payment collection, shipping, delivery, and service, and displays it in a single view.
Order Allocation – Fulfillment
Fulfillment is the process of assembling and shipping a customer’s order. Unlike allowing customers to select and purchase items in person at a retail location, an e-commerce merchant is responsible for packing the shipment with the correct products and getting the package in transit after placing an order online. In other words, the order fulfillment process streamlines the allocation, assignment, picking, packing, and shipment of order items.
The actions listed below show a straightforward fulfillment process.
- A customer places an order through your storefront.
- Order Management receives the order details and a summary is created.
- The order is allocated to a fulfillment location and assigned to a fulfillment order.
- Order items from the fulfillment order are retrieved from available inventory (picked) and packed for shipping.
- The order items are shipped (fulfilled).
Order Invoicing
Order Management creates an order payment summary for each order as part of the Order Summary creation process. The order payment summary represents a set of payment records that use the associated payment method with the order summary. The payment details dynamically update the order payment summary. So, you can see an order’s balances across multiple payments, including authorization, capture, and refund amounts.
The authorization, capture, and reconciliation of payments occur as orders move through stages in the fulfillment workflow. The timing for invoice generation usually takes place when the order status changes to fulfilled. However, Your Salesforce admin can automate payment capture, invoice generation, and refund processing to help manage your payment transaction needs.
SOM Payment Gateway Adapter
Salesforce Order Management (SOM) process payment transaction via a Payment Gateway adapter, Payment gateway adapters represent the bridge between your payments platform in Salesforce and an external payment gateway, Salesforce Order Management (OM) provides this capability with a number of App Exchange plugins for integrating with a variety of payment gateways as such Adyen, Cybersource,..etc.. additionally, Salesforce provides the capability to create a custom payment gateway adapter as needed due to absence of Payment Gateway from App Exchange or the existing Payment Gateway application doesn’t meet the business requirements.
Custom Payment Gateway Adapter
Salesforce offers two types of payment gateways, prior start creating your custom adapter below is a brief description for each type:
- Synchronous Gateway Adapter; following describes the process flow of payment transaction processing:
- The gateway receives transaction information from the Salesforce payment platform.
- The Salesforce platform waits for a gateway response that contains the final transaction status.
- Salesforce will create a payment transaction only if the transaction ends successfully.
- Asynchronous Gateway Adapter; following describes the process flow of payment transaction processing:
- The payments platform first sends transaction information to the gateway.
- The gateway responds with an acknowledgment that it received the transaction.
- The Salesforce platform creates a pending transaction.
- The gateway sends a notice with the final transaction status.
- The platform then updates the pending transaction’s status according to the gateway notification response.
SOM Customization Best Practices
To apply customization to SOM and obtain its best performance:
Do:
- Bulkify Your Code: Making your code capable of effectively handling several records at once is the process of bulkifying it.
- Querying Large Data Sets Salesforce has a governance cap on how many records SOQL queries can return, which is 50,000. The SOQL query for loop must be used if you are working with huge data sets that exceed the heap size limit.
- Use SOQL for Loops. We can use our query directly as the iterable variable in our for loop instead of allocating the results of our query to a variable. This leads to some behind-the-scenes modifications in how the query is executed. Allowing the results to be chunked and handled a lot more effectively and transparently, keeping us from hitting heap limits.
- Use of Map of SObject when we need to retrieve the values of records based on looped SObject records from various SObjects. If so, we can get the values using a Map of SObjects and avoid using SOQL in a “for” loop.
- Use Database Methods while doing DML operations.
- Make reusability of Apex Code if you can, and split up larger methods into smaller ones to make your code more modular and simpler to read and maintain. Writing scalable and reusable code that may be used in another functionality or module is a critical best practice for Apex Code. Making code generic will enable it to be reused with the least amount of alteration.
- Code test coverage when we want to put Apex code into production, Salesforce requires that we have at least 75% code coverage.
- Write One Trigger per Object per event. The purpose of Salesforce’s Apex triggers is to help you automate particular processes. You can execute unique actions before and following Salesforce events using Apex triggers. The best practice when writing Apex triggers is to construct one trigger for each object.
- Use Asynchronous Apex Asynchronous method-written Apex receives a unique separate set of higher governor restrictions.
Don’t:
- Avoid DML/SOQL Queries in Loops. Some of the most expensive activities we can carry out with Salesforce Apex include SOQL and DML, and both have stringent governor restrictions attached to them. Considering how easily and unintentionally we can go beyond these boundaries, especially when triggers are involved, piling them into a loop is a recipe for disaster.
- Avoid Hardcoding IDs in Apex programming, avoid hard-coding the Id. Apex code deployment between sandbox and production may fail if the id is different.
- Don’t mix Apex, Process Builders, Workflow Rules, and Record-Triggered flows based on the demands of the business and the Salesforce team supporting it, every object should have an automation plan. Generally speaking, you should select one automation tool for each item. One of the many unavoidable situations in older orgs is the mixing of Process Builders and Record-Triggered flows with Apex triggers or, more recently, Process Builders and Auto launched flows/processes.