Combining the power of two great tools of Salesmate - Workflows and Sequences you can auto-enroll a contact or multiple contacts to a sequence using the webhooks.
You could create a workflow or directly call the below API.
To create a workflow, Click on Profile Icon>>Setup>>Sales Automation>>Workflow Management>>Create a workflow on "Contacts" Module.
Execute the workflow on contact creation.
You can apply specific condition, say tag equals to "enroll_contact"
Under Actions, Select "Call Webhooks"
Method:
POST
Request / URL to notify:
https://apis.salesmate.io/v3/sequences/{{sequenceId}}/enroll
Example: https://apis.salesmate.io/v3/sequences/00e28332-1b85-4924-ab38-aca131590d94/enroll
Field Name | Description |
sequenceId |
Sequence Id is used to uniquely identify your Sequence. To Fetch Sequence id, Click on particular Sequence name->Copy the unique id from URL. |
Headers:
Field Name | Description |
Content-Type | application/json |
SessionToken | You can find it under your profile icon top right corner >> My account >> Access Key >> Session Key / Session Token |
x-linkname | Your Salesmate URL/ domain name |
Example:
Content-Type | application/json |
sessionToken | 677ef771-6ac1-11e9-ad1e-7f600c29e1d7 |
x-linkname | salesmateio.salesmate.io |
Body: raw - JSON (application/json)
{
"smtp": {{smtpId}},
"fromNumber": "{{fromNumber}}",
"sequenceId": "{{sequenceId}}",
"startFromStage": "{{StageId}},
"startFromDate": "{{Contact.createdAt}}",
"contacts": ["{{Contact.id}}"] ,
"isImmediateExecutionOfFirstStageEnabled": true/false
}
Example:
SMTP | 0 | To send emails via Salesmate. |
xxx |
An id of your SMTP via which you want to send emails. You can fetch by heading to the Emails >> Right Click on the page >> Inspect element >> Compose any email. It will fetch smtp details. Select id of an email. |
|
fromNumber |
Your Salesmate number via which you want to send out the texts. This number should have SMS capability and should be specified with country code. Required only when you have Texts Stage in a Sequence. |
|
startFromStage | StageId of the sequence from where you would like this sequence to be executed for the contact/s being enrolled. |
startFromDate |
Date when would like the sequence to be initiated in yyyy-dd-mm format. |
isImmediateExecutionOfFirstStageEnabled | If you want to immediately execute the Sequence select true, if you want to schedule the Sequence to select false. |
contacts |
An array of contactIds which you would like to enroll in the sequence. Go in Contacts and fetch relevant ids. |
Just for your reference to understand what the Contact Id is :
Contact ID can be fetched by adding the "ID" column on the List view from "Manage Column"
Step -1
Manage Column
Steps -2
Add "ID" Field
Step -3
Column available for "ID"
Note: Here only the contact Id ["{{Contact.id}}"] variable needs to be specified in the array of contacts as it will enroll contacts one by one as they are created/updated or based on the logic that you have set as an "Execute on" step of the workflow.
Comments
0 comments
Article is closed for comments.