> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ravenna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Workflows

> Use the Apple School & Business Manager workflow action in Ravenna to assign devices to an MDM server by serial number.

Use the Apple School & Business Manager action in workflows (Automated actions triggered by ticket events or manual triggers) to move devices to the MDM server that should manage them, for example when a device changes hands between teams or schools.

See the [Apple School & Business Manager setup guide](https://docs.ravenna.ai/integrations/apple-business-manager/setup.md) to connect your organization

## Actions

> [accordion] Assign Devices to MDM Server
>
> Assigns devices, by serial number, to an MDM server in Apple School Manager or Apple Business. Find it in the **Device** group of the workflow builder.
>
> Before sending anything, Ravenna checks each device's current server. Devices already on the target server are left as they are, and only the rest are sent to Apple in one activity. The step then waits up to 30 seconds for Apple to finish.
>
> **Input fields:**
>
> * `Serial Numbers` - 1 to 100 serial numbers. Duplicates are removed and lowercase is accepted.
> * `MDM Server ID` - the ID of the target MDM server. Get it from the [List Apple MDM Servers](https://docs.ravenna.ai/integrations/apple-business-manager/agent-tools.md) agent tool, or from a synced asset's assigned server fields.
>
> **Output data:**
>
> * `Activity ID` - the Apple device activity ID. Empty when every device was already on the server.
> * `Assigned Serial Numbers` - the devices Apple assigned: every requested device that wasn't already on the server.
>
> **Common use cases:**
>
> * Move a device to another team's or school's MDM server from a request form
> * Assign newly purchased devices to the right MDM server before they enroll
> * Reassign devices in bulk during an MDM migration
>
> **When the step fails:**
>
> * **Unknown serial number or MDM server:** the step fails before sending anything. Its message lists the devices by current server and names what isn't in your Apple organization. Fix the inputs and run it again.
> * **Apple doesn't finish for every device:** the step completes only when Apple reports success for every device. If the activity fails for some devices, or is still running after 30 seconds, the step fails with the activity ID and Ravenna never resends it. Check the per-device results in Apple School Manager or Apple Business, or with [Get Apple Device Activity](https://docs.ravenna.ai/integrations/apple-business-manager/agent-tools.md).
> * **Apple is busy:** when Apple rate-limits the request or a read fails temporarily, the step is retried. Each try checks the devices' current servers again first.


## Related topics

- [Workflows](https://docs.ravenna.ai/documentation/workflows/overview.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.