First things first, what is a Context in SalesIQ Scripts?
A Context is a data definition that is used to collect multiple inputs to perform a single action. So, all the inputs defined in the context will be collected and the context handler will be invoked. In that case, the context handler is a piece of SalesIQ script which is invoked after collecting all the inputs for a particular context.
What is the Context ID?
- The context_id is a unique identifier for any context that is available in the Context handler of the Zobot. You can use the context action in case you want to use a set of questions in a particular context to invoke/perform an action.
- context_id accepts only text as the value. The value must be the name of a context handler block.
- Say you own an e-commerce website. If you want to create a lead in Zoho CRM using the name, email and phone number of the visitor, you can specify questions to get these details from the visitor in the same context and give it a context ID say, leaddetails.
Why should you used Context ID in your scripts?
Each Zobot script consists of a lot of contexts and each context has a unique context ID. When all the inputs defined in a context are collected, the context handler will be invoked. Only when you use the right context ID inside the Context Handler, the Zobot will know which action to execute for which context.
What is Context Re-using?
- Context re-using can be done if you want to reuse the answers collected in a context earlier in questions that come later in the same context.
- For example, if you use the context with context_id leaddetails to collect the name and email of a visitor who is likely to buy a product from your site and you want to include the name of the visitor in the next question, you can use the same context again with additional questions added to the same context.
Note:
You can use any number of contexts but when you switch from one context to another, answers from the previous context will not be available in the context handler. For example, if you use the context with context_id leaddetails to collect the visitor name, email and phone to create a lead and then switch to the next context with context_id typeofservice, answers to questions in leaddetails will not be available in the context handler.
To learn more about this, start building your own Zobot right away.
Regards,
Michelle