To Create a Custom Endpoint

You use the Web Service Endpoints (SM207060) form to create a custom endpoint.

If you need to use a custom endpoint, you can either create an endpoint from scratch or extend an existing endpoint with the needed API. This procedure describes how to create a custom endpoint from scratch. To learn how to extend an existing endpoint, see To Extend an Existing Endpoint.

To Create an Endpoint from Scratch

Note:
You can create an endpoint that has the latest version of the contract only.
  1. Open the Web Service Endpoints (SM207060) form.
  2. In the Endpoint Name box, type the name of the new endpoint.
    Note:
    For details on the characters that can be used in the endpoint name and version, see Naming Rules for Endpoints.
  3. In the Endpoint Version box, type the version of the new endpoint.
  4. Add the needed entities, fields, and actions to the contract of the created endpoint, as described in the sections below.
  5. Click Save on the form toolbar.

To Add a Top-Level Entity to the Contract of the Endpoint

  1. In the Endpoint Name box, select the name of the endpoint to which you want to add an entity.
  2. In the Endpoint Version box, select the version of the endpoint to which you want to add an entity.
  3. In the left pane, select the Endpoint node.
  4. On the toolbar of the left pane, click Insert, and in the Create Entity dialog box, do the following:
    1. In the Object Name box, type the name of the entity. This is the name of the API object that you will use in the code of your application to work with the entity.
      Note:
      For details on the characters that can be used in the entity names, see Naming Rules for Endpoints.
    2. In the Object Type box, select Top-Level.
    3. In the Screen Name lookup box, select the form to which the entity should correspond.
    4. Click OK.
  5. Add the needed fields, actions, or nested entities to the entity, as described in the sections below.

To Add a Report Entity to the Contract of the Endpoint

  1. In the Endpoint Name box, select the name of the endpoint to which you want to add an entity.
  2. In the Endpoint Version box, select the version of the endpoint to which you want to add an entity.
  3. In the left pane, select the Endpoint node.
  4. On the toolbar of the left pane, click Insert, and in the Create Entity dialog box, do the following:
    1. In the Object Name box, type the name of the entity. This is the name of the API object that you will use in the code of your application to work with the entity.
      Note:
      For details on the characters that can be used in the entity names, see Naming Rules for Endpoints.
    2. In the Object Type box, select Report.
    3. In the Screen Name lookup box, select the report to which the entity should correspond.
    4. Click OK.

    The Fields tab is populated with the fields for each parameter of the report.

  5. Optional: Modify the list of fields, as described in To Add Fields to an Entity.

To Add a Linked or Detail Entity to Another Entity

  1. In the Endpoint Name box, select the name of the endpoint to which you want to add an entity.
  2. In the Endpoint Version box, select the version of the endpoint to which you want to add an entity.
  3. In the left pane, select the entity node to which you want to add a linked or detail entity.
  4. On the toolbar of the left pane, click Insert.
  5. In the Field Name box of the Create Entity dialog box, which opens, type the name of the field that should be used to access the nested entity, and specify the values of other elements in one of the following ways:
    • If you want to insert an entity that already exists in the contract, select the Use Existing Entity check box, and select the needed entity in the Entity Type box.
    • If you want to insert a new entity, in the Object Name box, type the name of the entity, and in the Object Type box, select the type of the entity: Linked or Detail.
    Note:
    For details on the characters that can be used in the entity names, see Naming Rules for Endpoints.
  6. Click OK. The new entity appears in the contract.
  7. Add fields to the created entity, as described in the following section.

To Add Fields to an Entity

  1. In the Endpoint Name box, select the name of the endpoint to which you want to add an entity.
  2. In the Endpoint Version box, select the version of the endpoint to which you want to add an entity.
  3. In the left pane, select the entity node to which you want to add fields.
  4. On the Fields tab of the right pane, do one of the following:
    • Click Populate on the tab toolbar. In the Populate Fields dialog box, select the MYOB Acumatica object whose fields you want to include in the entity and the fields that you want to include, and click OK. The selected fields are added to the contract.
    • Click Add Row on the tab toolbar; then type the name of the new field in the Field Name column of the added row, select the MYOB Acumatica object whose field you want to include in the entity in the Mapped Object column, and select the field that you want to include in the Mapped Field column.
    Note:
  5. Click Save on the form toolbar.

To Add an Action to an Entity

Note:
You can add actions that are performed on multiple records (such as the removal of all records or those the user selects) to processing forms only. Actions that can be performed on multiple records are not supported for data entry and maintenance forms.
  1. In the Endpoint Name box, select the name of the endpoint to which you want to add an entity.
  2. In the Endpoint Version box, select the version of the endpoint to which you want to add an entity.
  3. In the left pane, select the Actions node in the needed entity.
  4. On the toolbar of the left pane, click Insert.
  5. In the Create Action dialog box, which opens, select the needed MYOB Acumatica action, type the name that should be used to invoke this action through the API, and click OK. The dialog box is closed, and the new action is added to the contract.
    Note:
    For details on the characters that can be used in the action names, see Naming Rules for Endpoints.
  6. If the action has parameters, add the parameters to the action as follows:
    1. In the left pane, click the action you have created.
    2. On the Parameters tab of the right pane, do one of the following:
      • Click Populate on the tab toolbar. In the Populate Fields dialog box, which opens, select the MYOB Acumatica object whose fields you want to use as parameters of the action and the fields that you want to use as parameters, and click OK. The selected fields are added to the contract.
      • Click Add Row on the tab toolbar; then type the name of the new parameter in the Parameter Name column of the added row, select the MYOB Acumatica object whose field you want to use a parameter of the action in the Mapped Object column, and select the field that you want to use as a parameter in the Mapped Field column.
      Note:
      • For details on the characters that can be used in the parameter names, see Naming Rules for Endpoints.
      • If you need to add parameters of a workflow action, select the Transition Parameters object as the object whose fields you want to use as parameters. For details about workflow actions, see Action Configuration: General Information.
  7. On the form toolbar, click Save.