How to deal with SalesforceException: HTTP Method 'PATCH' not allowed I've the the Salesforce module mapping in place integrated with Commerce module and I've the following SalesforceException when purchasing the order:

SalesforceException: HTTP Method 'PATCH' not allowed. Allowed are HEAD,GET,POST


What's happening and how to deal with or debug this problem?
The format of the HTTP SFDC API callback for inserting/upserting records is:

/services/data/v20.0/sobjects/ObjectName/customExtIdField__c/Id


The ObjectName is the Name of an Salesforce table i.e. 'Contact' or 'Account'. And Id is the Id of a specific record you want to update in the table.

The possible cause of the error for that would be that you're calling SFDC API with the invalid data.

Please check if your REST URL is correct, probably your objectId is not passed through. E.g. If you have dependencies between the other objects, check if these were created in the first place, before creating your main object.

Related:


Update records using Salesforce REST API - Patch method not working