A payload schema defines the structure of the JSON body that ERP Manager sends to an ERP endpoint. You create the schema record with its connection and HTTP settings, then define its fields on the Fields tab.
Before you begin
Configure at least one client connection.
Steps
In the sidebar, select Payload Schemas. The list of existing schemas opens.
On the Payload Schemas screen, select Create. The Create Payload Schema form opens.
In Client connection, select a client connection. Client connection is a required field. The schema belongs to the client connection you select.
In Name, enter a name for the schema. Use a name that is unique.
In Endpoint, enter the API path. Enter the path without a leading slash, for example
create-sale-order.In Method, select the HTTP method. Method is a required field. The options are POST, PUT, PATCH, and DELETE.
In Root type, select the root JSON structure. Root type is a required field. The options are Object and Array. Choose Object for a single JSON object, or Array for a JSON array.
Select Save. On the empty form Save is unavailable, and it becomes available after you enter values. ERP Manager creates the schema and opens its detail view. The detail view has the General and Fields tabs.
Select the Fields tab. The Payload Fields table opens.
On the Fields tab, select Create Payload Field to add a field. The Create Payload Field form opens.
In the form, enter a Name and select a Data type.
Select Save. On the empty form Save is unavailable, and it becomes available after you enter values. The new field appears in the Payload Fields table with its Name and Data Type.
Repeat the field steps until all fields are defined.
Result
The payload schema is saved and appears in the Payload Schemas list with its name, method, endpoint, and root type.
If something goes wrong
If Save is unavailable, check that Client connection, Method, and Root type each have a value.
If a field does not appear in the table, confirm that you selected Save on the field form. Unsaved field forms are discarded if you navigate away.
Related

