--- title: "Service Bus search definitions" slug: "service-bus-search-definitions" description: "Automate message assignment in D365 F&SCM using Service Bus search definitions for efficient processing of received data and dead letter queues." tags: ["Concept topic"] updated: 2026-03-20T09:42:08Z published: 2026-03-20T17:44:08Z canonical: "docs.staedean.com/service-bus-search-definitions" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Service Bus search definitions You can use Service Bus search definitions to automatically assign Connectivity Studio messages to received data records from a Service Bus. ### Purpose You can indicate to which source of received data records a search definition is applied: - Service Bus queue or topic subscription (**Dead letter** = **No**). The assigned messages are used to import the received data into D365 F&SCM. - Service Bus dead letter queue (**Dead letter** = **Yes**). The assigned messages are used to further process the dead letter data into D365 F&SCM. For example, you can set a production order '**On hold**' when a dead letter is received on the export of a production order. ### Elements The key filter elements of a search definition are: - **Service Bus namespace**: The name of the applicable Service Bus namespace. - **Entity name**: The name of the applicable Service Bus queue or Service Bus topic - **Subscription**: If the entity is a topic, also define the applicable Service Bus topic subscription. - **Content info**: A Service Bus queue or topic message has a **Content** field, which value is available on the received data record. You can use the content value as filter option to find the applicable search definition. - **Subject info**: A Service Bus queue or topic message has a **Subject** field, which value is available on the received data record. You can use the subject value as filter option to find the applicable search definition. ### Search For each received data record, a matching search definition is searched for in a fixed sequence. Does a matching search definition exist for the combination of: 1. Service Bus namespace, Entity name, Subscription, Content info, Subject info. 2. Service Bus namespace, Entity name, Subscription, Content info. 3. Service Bus namespace, Entity name, Subscription, Subject info. 4. Service Bus namespace, Entity name, Subscription. > [!NOTE] > **Notes** > > - The **Subscription** is only considered if the **Entity name** is a topic. > - It can occur that several matching search definitions exist. If so, these rules are applied: > - If no priority is defined (Priority = 0), the first found matching search definition is applied. > - If priorities are defined (Priority > 0), the matching search definition with the lowest priority is applied. ### Result If a matching search definition is: - Found, the defined message and company are assigned to the received data record. - Not found, no message is assigned to the received data record. In this case, usually, you must adjust the applicable Service Bus search definitions. ## Related - [Data import from Azure Service Bus queue or topic subscription](/data-import-from-azure-service-bus-queue-or-topic-subscription.md) - [Set up Service Bus queue connector](/set-up-service-bus-queue-connector.md) - [Set up Service Bus search definition](/set-up-service-bus-search-definition.md) - [Reassign message to data received from Service Bus dead letter queue](/reassign-message-to-data-received-from-service-bus-dead-letter-queue.md) - [Reassign message to data received from Service Bus queue or topic subscription](/reassign-message-to-data-received-from-service-bus-queue-or-topic-subscription.md) - [Import received Service Bus data](/import-received-service-bus-data.md) - [Receive data from Service Bus queue or topic subscription](/receive-data-from-service-bus-queue-or-topic-subscription.md) - [Receive data from Service Bus dead letter queue](/receive-data-from-service-bus-dead-letter-queue.md)