Cross-Provider Workflow

Salesforce Contact to Mailchimp Upsert and Tag

Version 1.0.0

Create a Salesforce contact, upsert into Mailchimp, then tag the member.

1 workflow 2 source APIs 2 providers
View Spec View on GitHub ArazzoWorkflowsCross-Provider

Providers Orchestrated

salesforce mailchimp

Workflows

salesforce-contact-to-mailchimp-upsert-tag
Create a Salesforce contact, upsert to Mailchimp, then tag.
Inserts a Contact in Salesforce, upserts the same email into a Mailchimp audience using the subscriber hash, then applies a segmentation tag to the member.
3 steps inputs: email, firstName, lastName, listId, subscriberHash, tagName outputs: memberId, salesforceId, tagStatus
1
create-contact
$sourceDescriptions.salesforceRestApi.createRecord
Insert a new Contact record into Salesforce.
2
upsert-member
$sourceDescriptions.mailchimpMarketingApi.putListsIdMembersId
Upsert the contact into a Mailchimp audience.
3
tag-member
$sourceDescriptions.mailchimpMarketingApi.postListMemberTags
Apply a segmentation tag to the Mailchimp member.

Source API Descriptions

Arazzo Workflow Specification

crm-salesforce-contact-to-mailchimp-upsert-and-tag-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Salesforce Contact to Mailchimp Upsert and Tag
  summary: Create a Salesforce contact, upsert into Mailchimp, then tag the member.
  description: >-
    A cross-provider workflow that captures a contact in Salesforce, upserts the
    same person into a Mailchimp audience by subscriber hash, and applies a
    segmentation tag. Demonstrates an idempotent CRM-to-email sync that both
    creates or updates the subscriber and classifies them for targeted sends.
  version: 1.0.0
sourceDescriptions:
  - name: salesforceRestApi
    url: https://raw.githubusercontent.com/api-evangelist/salesforce/refs/heads/main/openapi/salesforce-rest-api-openapi.yml
    type: openapi
  - name: mailchimpMarketingApi
    url: https://raw.githubusercontent.com/api-evangelist/mailchimp/refs/heads/main/openapi/mailchimp-marketing-api-openapi.yml
    type: openapi
workflows:
  - workflowId: salesforce-contact-to-mailchimp-upsert-tag
    summary: Create a Salesforce contact, upsert to Mailchimp, then tag.
    description: >-
      Inserts a Contact in Salesforce, upserts the same email into a Mailchimp
      audience using the subscriber hash, then applies a segmentation tag to the
      member.
    inputs:
      type: object
      properties:
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        listId:
          type: string
        subscriberHash:
          type: string
        tagName:
          type: string
    steps:
      - stepId: create-contact
        description: Insert a new Contact record into Salesforce.
        operationId: $sourceDescriptions.salesforceRestApi.createRecord
        parameters:
          - name: sobjectType
            in: path
            value: Contact
        requestBody:
          contentType: application/json
          payload:
            FirstName: $inputs.firstName
            LastName: $inputs.lastName
            Email: $inputs.email
        successCriteria:
          - condition: $statusCode == 201
          - condition: $response.body#/success == true
        outputs:
          salesforceId: $response.body#/id
      - stepId: upsert-member
        description: Upsert the contact into a Mailchimp audience.
        operationId: $sourceDescriptions.mailchimpMarketingApi.putListsIdMembersId
        parameters:
          - name: list_id
            in: path
            value: $inputs.listId
          - name: subscriber_hash
            in: path
            value: $inputs.subscriberHash
        requestBody:
          contentType: application/json
          payload:
            email_address: $inputs.email
            status_if_new: subscribed
            merge_fields:
              FNAME: $inputs.firstName
              LNAME: $inputs.lastName
        successCriteria:
          - condition: $statusCode == 200
        outputs:
          memberId: $response.body#/id
          memberStatus: $response.body#/status
      - stepId: tag-member
        description: Apply a segmentation tag to the Mailchimp member.
        operationId: $sourceDescriptions.mailchimpMarketingApi.postListMemberTags
        parameters:
          - name: list_id
            in: path
            value: $inputs.listId
          - name: subscriber_hash
            in: path
            value: $inputs.subscriberHash
        requestBody:
          contentType: application/json
          payload:
            tags:
              - name: $inputs.tagName
                status: active
        successCriteria:
          - condition: $statusCode == 204
        outputs:
          tagStatus: $statusCode
    outputs:
      salesforceId: $steps.create-contact.outputs.salesforceId
      memberId: $steps.upsert-member.outputs.memberId
      tagStatus: $steps.tag-member.outputs.tagStatus