Configure ATP API for the manage order operations agent

  • リリースバージョン: Australia
  • 更新日 2026年03月12日
  • 所要時間:4分
  • Create an Available-to-Promise (ATP) API call that enables the manage order operations agent to check product availability and determine the earliest possible delivery date when customers request expedited shipping.

    始める前に

    Application scope must be set to Order Exception AI Agents.

    Role required: admin

    このタスクについて

    The demo data for the manage order operations agent includes a sample implementation called orderExpeditionCheckDemo as part of the sn_ord_ops_aias.orderExpeditionCheckEP extension point. To enable real-world functionality such as checking on-hand quantities and delivery dates from external Enterprise Resource Planning (ERP) systems like SAP or Oracle, you should replace the demo data implementation with your custom ATP API.

    手順

    1. Log in to the ServiceNow instance.
    2. Navigate to All > Scripted Extension Points > Scripted Extension Points.
    3. Search for the sn_ord_ops_aias.orderExpeditionCheckEP scripted extension point in the API Name field.
    4. Select sn_ord_ops_aias.orderExpeditionCheckEP to view the sample script included in the demo data.
    5. Select the Create implementation related link to create your own implementation of the sn_ord_ops_aias.orderExpeditionCheckEP extension point.
    6. On the Script Include orderExpeditionCheckEP form, fill in the fields.
      For description of the Script Include form fields, see Script includes.
    7. Edit the getAvailability function in the script to implementation your own logic for checking product availability and delivery dates.
      Function name Description Input and output
      getAvailability
      Placeholder function meant to be overridden. This is where you would implement the logic to:
      • Query external inventory or ERP systems.
      • Determine if the product is available.
      • Calculate the earliest delivery date based on requested date and stock levels.

      Input: The getAvailability function takes order number of the Customer order record and the revised date requested by the customer as input.

      Output:
      {
      	"isAvailaible": <true/false – denotes if stock is available>, 
      	"earliestDelivery": <earliest delivery date in yyyy-MM-dd format>, 
      	"isError": <true/false – denotes if there is any failure in the API call>, 
      	"errorMessage": <error message string in case of failure> 
      }
    8. Select Update.
    9. オプション: Validate your implementation by requesting order changes from the Business Portal using the Now Assist Virtual Assistant.