arazzo: 1.0.1
info:
title: ServiceNow Cart Checkout
summary: Add a catalog item to the cart, review the cart contents, then submit the order.
description: >-
The shopping-cart checkout path through the Service Catalog API. The
workflow adds a catalog item to the current user's cart with a quantity and
variable values, retrieves the cart to review its contents, and submits the
cart as a single service catalog request, returning the request number. The
Service Catalog API wraps the cart item and order result under a result
object. Every request is written inline.
version: 1.0.0
x-realizes-capability-ids:
- BC-600.30
x-capability-derivation:
method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
min_confidence: 0.7
sources:
- capability_id: BC-600.30
capability_name: IT Service Management
spec: servicenow-cart-api-openapi.yml
confidence: 0.8
model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: cartApi
url: ../openapi/servicenow-cart-api-openapi.yml
type: openapi
workflows:
- workflowId: cart-checkout
summary: Add an item to the cart and check out.
description: >-
Adds a catalog item to the cart, reviews the cart, and submits the cart as
an order.
inputs:
type: object
required:
- itemSysId
properties:
itemSysId:
type: string
description: The sys_id of the catalog item to add to the cart.
quantity:
type: integer
description: The quantity to add.
variables:
type: object
description: The variable name/value pairs required by the catalog item.
steps:
- stepId: addToCart
description: >-
Add the catalog item to the current user's cart with the supplied
quantity and variables.
operationId: addItemToCart
parameters:
- name: sys_id
in: path
value: $inputs.itemSysId
requestBody:
contentType: application/json
payload:
sysparm_quantity: $inputs.quantity
variables: $inputs.variables
successCriteria:
- condition: $statusCode == 200
outputs:
cartItemId: $response.body#/result/cart_item_id
- stepId: reviewCart
description: >-
Retrieve the current cart to review its contents before submitting the
order.
operationId: getCart
successCriteria:
- condition: $statusCode == 200
- stepId: submitOrder
description: >-
Submit all items in the cart as a single service catalog request.
operationId: submitCartOrder
successCriteria:
- condition: $statusCode == 200
outputs:
requestNumber: $response.body#/result/request_number
requestId: $response.body#/result/request_id
outputs:
cartItemId: $steps.addToCart.outputs.cartItemId
requestNumber: $steps.submitOrder.outputs.requestNumber
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.