Number selection works the same way for every channel. When you send an outbound message, the integration walks a fixed priority hierarchy and picks the first instance that matches. Only the tag and override syntax changes between WhatsApp, iMessage, and SMS - the decision logic does not.
Selection Priority Hierarchy
The system evaluates these rules in order and uses the first one that resolves to a connected instance:In every case the system only considers connected instances. If the rule resolves to a disconnected instance, it raises an error rather than silently falling through - see Number Selection Errors.
Per-Channel Syntax Reference
The patterns below are interchangeable in concept - pick the row for the channel you’re sending on.N is the instance index; +1234567890 is the target number.
Priority Rules in Detail
1. Manual Override
Add the override pattern for your channel anywhere in the message -
{ WA#N } for WhatsApp or {IM#N} for iMessage - where N is the instance index, to force a specific instance.- When used: The message contains a manual override pattern.
- Example:
"This message will go via the 2nd instance { WA#2 }" - Behavior:
- Extracts the instance index from the pattern.
- Validates that the instance exists and is connected.
- Removes the pattern from the message before sending.
2. Temporary Switch (iMessage)
Use
{TEMP-IM#N} to send a single message from a different account without permanently changing the contact’s assigned account.- When used: You want to send one message from a different number without changing the contact’s normal account assignment.
- Example:
"Quick update from our support line {TEMP-IM#3}" - Behavior:
- Temporarily routes the message through the specified account.
- Does not change the contact’s default account assignment.
- Removes the pattern from the message before sending.
- Future messages to this contact continue using their normal account.
3. Contact Tags
Tag a contact with
wa: +1234567890 (or im: / sms:) to always use a specific number for that contact.- When used: The contact has a number tag for the channel.
- Example: Contact tagged with
wa: +15551234567 - Behavior:
- The system scans the contact’s tags for the channel’s number pattern (
wa:,im:, orsms:). - It finds the connected instance whose phone number matches the tagged number.
- If a match is found, that instance is used for the message.
- The system scans the contact’s tags for the channel’s number pattern (
4. User Assignment
When a contact is assigned to a user in your CRM, the system uses that user’s instance for the channel being sent on.
- When used: The contact is assigned to a specific user who has an instance assigned to them.
- Behavior:
- The system looks up the user the contact is assigned to in your CRM.
- It finds the instance assigned to that user for the channel being sent on.
- If that instance is connected, it’s used for the message.
5. Default Instance
Always set one instance as the “default” for each location to ensure reliable fallback behavior.
- When used: No specific override, tag, or user assignment resolves.
- Behavior:
- Uses the instance marked as “default” for the location.
- Only considers connected instances.
6. Any Available Instance
- When used: As the final fallback.
- Behavior:
- Selects any connected instance with a phone number.
Advanced Configuration Examples
Example 1: E-commerce Setup
Example 2: Agency Client Management
Best Practices
Setup Recommendations
1
Always set a default
Ensure one instance is marked as default for fallback scenarios.
2
Document your strategy
Keep a record of which numbers are used for what purposes.
3
Test your setup
Send test messages to verify number selection works as expected.
4
Monitor regularly
Check instance connection status daily.
Error Prevention
1
Validate manual overrides
Ensure
{ WA#N } / {IM#N} patterns reference existing, connected instances.2
Maintain contact tags
Keep
wa:, im:, and sms: tags updated when instances change.3
Review user assignments
Regularly verify that assigned users have connected instances.
4
Health monitoring
Set up alerts for instance disconnections.
Troubleshooting Workflow
1
Check the error code
Identify the specific error (101-106).
2
Verify instance status
Confirm which instances are connected.
3
Review configuration
Check user assignments, tags, and default settings.
4
Test the resolution
Send a test message to verify the fix worked.
5
Document issues
Keep a log of common problems and solutions.
What’s Next?
- Number Selection Errors: Error codes 101-106 and how to resolve them
- Multiple Instances Overview: Use cases, benefits, and setup
- Full Setup Guide: Connect instances and configure assignments
Support
If you need help with the setup or onboarding:- WhatsApp Support: Chat on WhatsApp
- Email: support@goghl.ai

