Skip to content
Chapter

FOC

FOC

An FOC item is a free-of-cost article Sharma Distributors can issue, such as a branded umbrella. ERP owns the list. Salesforce has no outbound integration for FOC_Master__c.

Code Name Unit MRP Procurement cost Currency
FOC-UMBRELLA Branded Umbrella Piece 499 210 INR

A blank currency is stored as INR. A blank origin is stored as ERP Synced. A blank status is stored as Approved. A create stores the item as active. The name is required. MRP must be greater than 0. Procurement cost may be 0, and it must not be higher than the MRP.

Saving an item calls Salesforce in the same request. The local row is kept either way. syncStatus is Synced when the call succeeded and Failed when it did not. A first create stores the Salesforce id. An update leaves that id in place.

ERP API What Salesforce receives
POST /api/foc and PATCH /api/foc/{code} PATCH of FOC_Master__c by FOC_Code__c

The JSON ERP posts is on ERP → Salesforce. What Salesforce returns is on Salesforce → ERP.

The service company on that territory is the next chapter, Vendor.