Route messages
Apple Messages that you receive from your customers can be routed to specific agents or teams using Flows.
To do this, you'll need to know how to get the biz-intent-id
and biz-group-id
from the message.
Not sure what biz-intent-id
and biz-group-id
are, or how to set them up? Learn about URL entry points first.
Extract biz-intent-id
and biz-group-id
from a message
biz-intent-id
and biz-group-id
from a messageFollow these steps to learn how to find and pass on the biz-intent-id
and biz-group-id
from an Apple Messages message in Flows.
What you'll need
An installed Apple Messages for Business channel.
A URL entry point for Apple Business messages, containing
biz-intent-id
andbiz-group-id
.At least one message that has been sent to that channel using a URL entry point.
To set this up for Apple Messages that are sent to you without using a URL entry point, follow these steps.
Set up your flow
Go to Flows and set up a new flow. In this example, we'll use the Conversation started trigger.
For the 'Channel', select Apple Messages for Business, then select the specific channel instance you want to use.
For the 'Trigger event', select Conversation started.
For the 'Participant type', select Contact.
Click Save.
Click Add new action.
Under 'Select an action', go to MessageBird API > Conversations > Get Message.
In the 'Message ID' field, search for lastMessageId from the 'Trigger'.
Test the step.
Extract IDs from the test
The test will display data from the most recent message that has been sent to the Apple Messages for Business channel. As long as the most recent message has been sent from a URL entry point with biz-intent-id
and biz-group-id
, then this information will also be present in the test's Output.
Let's take a look at how we can find these IDs.
Here's an example output:
biz-intent-id
biz-intent-id
First, let's find the biz-intent-id
.
In the test output, it's located at meta.referral.metadata.sourceid
.
So in this example, the biz-intent-id
is "question"
.
biz-group-id
biz-group-id
Now, let's find the biz-group-id
.
In the test output, it's located at meta.referral.group
.
So in this example, the biz-intent-id
is "returns_department"
.
Extract IDs without a URL entry point
If the message from the customer has come through a source other than a URL entry point, you will need to do one of the following
Assign the values to variables that are then modified as strings (to avoid null comparisons).
In your conditional, add 'IF'
sourceid
=present
'AND'group
=present
'AND'sourceid
=your value
'AND'groupid
=your value
.
Next steps
Now that you've found this data, you can use it to set up conditional routing.
Last updated