arazzo: 1.0.1
info:
title: Salla Abandoned Cart Recovery
summary: Find abandoned carts, look up the shopper, and issue a recovery coupon.
description: >-
A revenue-recovery flow for a Salla store. Abandoned carts are listed, the
flow branches only when at least one cart is found, the shopper behind the
first cart is read for their contact details, and a targeted recovery
coupon is created to win the order back. Each step spells out its request
inline so the flow can be read and executed without opening the underlying
OpenAPI description.
version: 1.0.0
x-realizes-capability-ids:
- BC-420.10
- BC-440.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-420.10
capability_name: Customer Data Management
spec: salla-customers-api-openapi.yml
confidence: 0.85
- capability_id: BC-440.30
capability_name: Discount & Promotion Management
spec: salla-coupons-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: cartsApi
url: ../openapi/salla-carts-api-openapi.yml
type: openapi
- name: couponsApi
url: ../openapi/salla-coupons-api-openapi.yml
type: openapi
- name: customersApi
url: ../openapi/salla-customers-api-openapi.yml
type: openapi
workflows:
- workflowId: recover-abandoned-cart
summary: Issue a recovery coupon to a shopper who abandoned a cart.
description: >-
Lists abandoned carts, reads the customer behind the first one, and creates
a recovery coupon targeted at winning the order back.
inputs:
type: object
required:
- couponPayload
properties:
couponPayload:
type: object
description: The coupon body (code, type, amount, expiry) to create as the recovery incentive.
steps:
- stepId: listAbandonedCarts
description: >-
List abandoned carts and branch only when at least one cart is present.
operationId: listAbandonedCarts
successCriteria:
- condition: $statusCode == 200
outputs:
firstCartCustomerId: $response.body#/data/0/customer/id
onSuccess:
- name: hasCarts
type: goto
stepId: getCustomer
criteria:
- context: $response.body
condition: $.data.length > 0
type: jsonpath
- stepId: getCustomer
description: >-
Read the shopper behind the first abandoned cart for their contact
details.
operationId: getCustomer
parameters:
- name: customer_id
in: path
value: $steps.listAbandonedCarts.outputs.firstCartCustomerId
successCriteria:
- condition: $statusCode == 200
outputs:
customerEmail: $response.body#/data/email
customerMobile: $response.body#/data/mobile
- stepId: createCoupon
description: >-
Create a targeted recovery coupon to win the abandoned order back.
operationId: createCoupon
requestBody:
contentType: application/json
payload: $inputs.couponPayload
successCriteria:
- condition: $statusCode == 201
outputs:
customerId: $steps.listAbandonedCarts.outputs.firstCartCustomerId
customerEmail: $steps.getCustomer.outputs.customerEmail
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.