arazzo: 1.0.1
info:
title: Amazon Connect Update User Identity Info
summary: Read a user, update their identity information, then re-read to confirm the change.
description: >-
Safely edits an agent's identity information. The workflow describes the user
to confirm the account exists, updates the user's first name, last name, and
email, and then describes the user again to verify the new email took effect.
Every step spells out its request inline so the flow can be read and executed
without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: usersApi
url: ../openapi/amazon-connect-users-api-openapi.yml
type: openapi
workflows:
- workflowId: update-user-identity
summary: Update an agent's identity information and confirm the change.
description: >-
Confirms a user exists, updates their identity info, and re-reads the user to
verify the update.
inputs:
type: object
required:
- instanceId
- userId
- firstName
- lastName
- email
properties:
instanceId:
type: string
description: The identifier of the Amazon Connect instance.
userId:
type: string
description: The identifier of the user account to update.
firstName:
type: string
description: The agent's updated first name.
lastName:
type: string
description: The agent's updated last name.
email:
type: string
description: The agent's updated email address.
steps:
- stepId: readUser
description: >-
Describe the user to confirm the account exists before editing it.
operationId: DescribeUser
parameters:
- name: InstanceId
in: path
value: $inputs.instanceId
- name: UserId
in: path
value: $inputs.userId
successCriteria:
- condition: $statusCode == 200
outputs:
username: $response.body#/User/Username
onSuccess:
- name: userExists
type: goto
stepId: updateIdentity
criteria:
- condition: $response.body#/User/Id != null
- stepId: updateIdentity
description: >-
Update the user's identity information with the supplied name and email.
operationId: UpdateUserIdentityInfo
parameters:
- name: InstanceId
in: path
value: $inputs.instanceId
- name: UserId
in: path
value: $inputs.userId
requestBody:
contentType: application/json
payload:
IdentityInfo:
FirstName: $inputs.firstName
LastName: $inputs.lastName
Email: $inputs.email
successCriteria:
- condition: $statusCode == 200
- stepId: confirmUpdate
description: >-
Re-read the user and confirm the email now matches the supplied value.
operationId: DescribeUser
parameters:
- name: InstanceId
in: path
value: $inputs.instanceId
- name: UserId
in: path
value: $inputs.userId
successCriteria:
- condition: $statusCode == 200
- condition: $response.body#/User/IdentityInfo/Email == $inputs.email
outputs:
updatedEmail: $response.body#/User/IdentityInfo/Email
outputs:
username: $steps.readUser.outputs.username
updatedEmail: $steps.confirmUpdate.outputs.updatedEmail
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.