arazzo: 1.0.1 info: title: D&B Contact Search And Enrich summary: Find a principal or contact, then enrich the organization they are associated with. description: >- A people-to-company discovery flow. The workflow searches for named principals or contacts matching the supplied criteria, captures the D-U-N-S Number of the organization tied to the first contact, and retrieves the requested Data Blocks for that organization. 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 sourceDescriptions: - name: dnbDirectPlusApi url: ../openapi/dnb-direct-plus-openapi-original.yml type: openapi workflows: - workflowId: contact-search-and-enrich summary: Search contacts, then enrich the first contact's organization. description: >- Runs searchContacts with the supplied criteria, takes the D-U-N-S Number of the organization tied to the first contact candidate, and retrieves Data Blocks for that organization. inputs: type: object required: - accessToken - searchTerm properties: accessToken: type: string description: A valid Direct+ OAuth 2.0 bearer access token. searchTerm: type: string description: Free-form contact search term (name, title, etc). countryISOAlpha2Code: type: string description: ISO 3166-1 alpha-2 country code to scope the search. pageSize: type: integer description: Maximum number of contact candidates to return. default: 10 blockIDs: type: string description: Comma-separated Data Block IDs to retrieve for the organization. default: companyinfo_L2_v1,principalscontacts_L1_v2 steps: - stepId: searchContacts description: >- Find named principals or contacts matching the supplied criteria, returning a paginated candidate list. operationId: searchContacts parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: searchTerm in: query value: $inputs.searchTerm - name: countryISOAlpha2Code in: query value: $inputs.countryISOAlpha2Code - name: pageSize in: query value: $inputs.pageSize successCriteria: - condition: $statusCode == 200 outputs: firstContactName: $response.body#/searchCandidates/0/contact/fullName firstOrgDuns: $response.body#/searchCandidates/0/organization/duns - stepId: enrichOrganization description: >- Retrieve the requested Data Blocks for the organization tied to the first contact candidate. operationId: getDataBlocksByDuns parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: duns in: path value: $steps.searchContacts.outputs.firstOrgDuns - name: blockIDs in: query value: $inputs.blockIDs successCriteria: - condition: $statusCode == 200 outputs: duns: $response.body#/organization/duns primaryName: $response.body#/organization/primaryName outputs: contactName: $steps.searchContacts.outputs.firstContactName organizationDuns: $steps.searchContacts.outputs.firstOrgDuns organizationName: $steps.enrichOrganization.outputs.primaryName