Importing Existing Consumers into Enablement Services

If you have used Bloom's core API before, you have likely created Consumers. These can be imported into enablement services with the ImportUser mutation.

  1. Get the Bloom consumer identifier (UUID), the same one used in the core HTTP consumer endpoints.
    1. This user must have email address and phone number set.
    2. Below is an example valid user:
    {
        "data": {
            "id": "2d6872a1-e6e9-4735-a82f-0df00a7e14d1",
            "type": "consumers",
            "attributes": {
                "ssn": "123456789",
                "date_of_birth": "1986-06-14",
                "emails": [
                    {
                        "email_address": "[email protected]",
                        "type": "personal",
                        "primary": true
                    }
                ],
                "name": {
                    "first_name": "Buzz",
                    "last_name": "Inga"
                },
                "addresses": [
                    {
                        "id": "5693df1b-f743-4f3c-9449-57b9a7c0b243",
                        "line1": "123 Main St",
                        "city": "Athens",
                        "state_code": "FL",
                        "zipcode": "37745",
                        "primary": true
                    }
                ],
                "phones": [
                    {
                        "phone_number": "1234567890",
                        "type": "personal",
                        "primary": true
                    }
                ]
            }
        }
    }
    

  2. Call the ImportUser mutation.
mutation ImportUser {
    importUser(input: { id: "2d6872a1-e6e9-4735-a82f-0df00a7e14d1" }) {
        user {
            id
            email
            phoneNumber
            status
            syncedAt
            closedAt
            name {
                first
                middle
                last
            }
        }
    }
}
  1. A sample response:
{
    "data": {
        "importUser": {
            "user": {
                "id": "2d6872a1-e6e9-4735-a82f-0df00a7e14d1",
                "email": "[email protected]",
                "phoneNumber": "1234567890",
                "status": "VERIFIED",
                "syncedAt": null,
                "closedAt": null,
                "name": {
                    "first": "Buzz",
                    "middle": null,
                    "last": "Inga"
                }
            }
        }
    }
}
  1. Now you can use this user just like any other enablement services user. The user id is the same as the one that you imported.
    1. In the above example, that would be 2d6872a1-e6e9-4735-a82f-0df00a7e14d1