Yes, this can be achieved using the Endear Triggers available in Shopify Flow. Shopify Flow is a Shopify app that allows you to create workflows that modify your shopify data based on specific triggers.
You can create a Shopify workflow that will let you tag your orders in Shopify using the Endear "Message Attribution Changed" trigger. Whenever a message attribution (a sale attributed to a message in Endear) is created, updated, or deleted, you can use that information to modify the order affected in your shopify instance.
Since we have these three distinct states, we need to account for all of them when creating our workflow.
How to create a workflow using the Message Attribution Changed
Install both the Shopify Flow and Endear applications (Learn How)
Add the Message Attribution Changed trigger.
Add a condition to check if the message attribution is deleted or not.
If the attribution is not deleted,
We will add a condition to check if the tag we will be adding to the order already exists. This way we prevent orders from being tagged multiple times.
If the tag already exists, we do not have to make any changes.
If the tag does not already exist, we will add a tag to the order.
If the attribution is deleted, we will set an action to remove the tag from the order.
Here is a reference image of how the workflow should look.
Endear Trigger Properties
Days to convert
Number of days between message and order
Message id
ID of Endear message
Message type
Email or SMS message
Message sender id
ID of Endear user that sent the message
Message sender username
Username of Endear user that sent the message
Message sender email address
Email address of Endear user that sent the message
Message sender phone number
Phone number of Endear user that sent the message
Message sender first name
First name of Endear user that sent the message
Message sender last name
Last name of Endear user that sent the message
Message attribution id
ID of Endear message attribution
Message attribution create date
Create date timestamp of Endear message attribution
Message attribution update date
Update date timestamp of Endear message attribution
Message attribution is deleted
Whether message attribution is deleted
Message sender first name initial
First name initial of Endear user that sent the message
Message sender last name initial
Last name initial of Endear user that sent the message