Salla · Arazzo Workflow

Salla Upsert Customer

Version 1.0.0

Find a customer in a page of results and update them, otherwise create a new customer.

1 workflow 1 source API 1 provider
View Spec View on GitHub ArabicE-CommerceGCCHeadless CommerceMerchantMENAOnline StoresRetailSaudi ArabiaSMBStorefrontArazzoWorkflows

Provider

salla

Workflows

upsert-customer
Upsert a customer into the store directory.
Reads a page of customers and either updates the first existing customer or creates a new one when the directory is empty.
3 steps inputs: email, firstName, lastName, mobile, mobileCode outputs: createdCustomerId, updatedCustomerId
1
findCustomer
Read the first page of customers to determine whether the directory already holds a customer to update.
2
updateExisting
Update the first matched customer with the supplied contact details.
3
createNew
Create a new customer record when the directory held no customer to update.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Salla Upsert Customer
  summary: Find a customer in a page of results and update them, otherwise create a new customer.
  description: >-
    A CRM synchronization pattern for a Salla store. The workflow reads a page
    of customers, branches on whether the directory already holds any
    customers, and either updates the first matched customer in place or
    creates a brand new customer record. 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
  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
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: customersApi
  url: ../openapi/salla-customers-api-openapi.yml
  type: openapi
workflows:
- workflowId: upsert-customer
  summary: Upsert a customer into the store directory.
  description: >-
    Reads a page of customers and either updates the first existing customer or
    creates a new one when the directory is empty.
  inputs:
    type: object
    required:
    - firstName
    - mobile
    - mobileCode
    properties:
      firstName:
        type: string
        description: Customer first name.
      lastName:
        type: string
        description: Customer last name.
      mobile:
        type: string
        description: Customer mobile number.
      mobileCode:
        type: string
        description: Country dialing code for the mobile number.
      email:
        type: string
        description: Customer email address.
  steps:
  - stepId: findCustomer
    description: >-
      Read the first page of customers to determine whether the directory
      already holds a customer to update.
    operationId: listCustomers
    parameters:
    - name: per_page
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      matchedCustomerId: $response.body#/data/0/id
    onSuccess:
    - name: customerExists
      type: goto
      stepId: updateExisting
      criteria:
      - context: $response.body
        condition: $.data.length > 0
        type: jsonpath
    - name: customerMissing
      type: goto
      stepId: createNew
      criteria:
      - context: $response.body
        condition: $.data.length == 0
        type: jsonpath
  - stepId: updateExisting
    description: >-
      Update the first matched customer with the supplied contact details.
    operationId: updateCustomer
    parameters:
    - name: customer_id
      in: path
      value: $steps.findCustomer.outputs.matchedCustomerId
    requestBody:
      contentType: application/json
      payload:
        first_name: $inputs.firstName
        last_name: $inputs.lastName
        mobile: $inputs.mobile
        mobile_code: $inputs.mobileCode
        email: $inputs.email
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      customerId: $response.body#/data/id
    onSuccess:
    - name: done
      type: end
  - stepId: createNew
    description: >-
      Create a new customer record when the directory held no customer to
      update.
    operationId: createCustomer
    requestBody:
      contentType: application/json
      payload:
        first_name: $inputs.firstName
        last_name: $inputs.lastName
        mobile: $inputs.mobile
        mobile_code: $inputs.mobileCode
        email: $inputs.email
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      customerId: $response.body#/data/id
  outputs:
    updatedCustomerId: $steps.updateExisting.outputs.customerId
    createdCustomerId: $steps.createNew.outputs.customerId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/salla-customer-upsert-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

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.

A second provider on the same verified email joins the account you already have.