I have many e-shops, every shop has it's own ladline twilio phone number.
All phone numbers redirect calls to my single mobile phone.
The problem is - I don't know from which shop the call is.
Is there any solution to tag somehow redirected calls?
I need to know that client is calling to shop1, so I would not ask him which shop is he calling.
If my mobile phone could handle 10 SIM cards, I would know which SIM is accepting the call.
Thanks
Twilio Evangelist here. I think the best way to do this is with a 'Whisper', using <Number url=''>.
The idea is that when you use a <Dial> you can specify the number as just test:
<Response>
<Dial>+447123456789</Dial>
</Response>
But you can also use the <Number> tag:
<Response>
<Dial>
<Number>+447123456789</Number>
</Dial>
</Response>
This allows you to use the attributes of <Number>, and one of those is url=. This can point to some TwiML that is executed on the called parties side. As a result, the customer calls your shop, which calls your mobile, which runs TwiML such as:
<Response>
<Say>Incoming call from shop 'Owl Emporium'</Say>
</Response>
Then you know the call is from 'Owl Emporium' instead of 'Strigiformes R Us' (or whatever your shops are called). The customer who called you will not hear this message, we call it a 'whisper'.
An alternative solution is to use the callerId attribute so that the call is from one of your shops. You can then add this to your address book, but you won't have the customers number available as easily, so you'll need to grab that from your application if you want to call them back. It depends on which works best for you.
Hope this helps!
Related
I want to add a "payonbill" feature for my shop so i am using the checkmo payment method to do so. I added a new module with this configuration:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<payment>
<checkmo>
<active>1</active>
<model>Magento\OfflinePayments\Model\Checkmo</model>
<order_status>processing</order_status>
<title>Check / Money order</title>
<allowspecific>0</allowspecific>
<group>offline</group>
<payment_action>authorize_capture</payment_action>
</checkmo>
</payment>
</default>
</config>
By doing so that payment status will migrate to processing and the payment action will be triggered for authorization. When doing so i am no longer able to even place an order on the shop for this method. The problem actually is there because of the payment_action. When i remove that it works again.
Is there a way to handle this scenario? When someone can pay on bill i would like to trigger the event sales_order_invoice_pay as well and continue the flow.
Best
Pim
I fixed the issue by actually removing the stuff i previously did and by implementing this module:
https://github.com/dominicwatts/autoinvoice
The actual problem was that all was working fine but in the end for the offline payment the invoice is generated when booking it inside admin. Bypassing the status won't generate the invoice for you.
Is it possible to receive the previous message that the user have send to the chatbot (without using quick replies or postback buttons). Example:
User: "Can you call a friend?"
Bot: "Who should I call?"
User: "Tim"
In the API I now have just the information "Tim", without knowing if I should call him or text him or make him a sandwich or whatever. So I basically I want to add some Postbackdata or metadata additionally to the text "Can you call a friend" (intent: 'CALL'), so the message "Tim" will come with that data.
Is there a way without storing the data into a database? AWS Lambda with ClaudiaJs.
I found the metadata field in the FB API which turns out to be the wrong field for that since it is only for communicating between several apps?!
What you are looking for a called a "slot-based bot", or slot-filling, basically meaning that you have a "slot", or blank that needs to be filled in before your bot can perform an action. In your example you have two slots: action and person
Actions could be: call, text, message
Person: name of a person, friend, etc.
I don't think any of the message frameworks (Slack, Facebook, etc) will provide you with the information you need. You will need to build this logic out yourself.
You can look at using wit.ai stories to achieve this.
Look to this similar Stack Overflow question and answer.
You can reverse order of conversation, and at beginning user writes some text or send you something else. After receiving, you should send to user buttonsTemplate, where postbacks will be like "CallTo&Tim" where instead of Tim you can put every text you need to pass to next executor(and you also can store previous user message here). Than just make substring of postback, check it`s type and do whatever you want.
I have downloaded program-ab-0.0.4.3, so that I can make use of AIML 2.0 features.
I want to make a API call based on users input. Any guidance on how do i do it ?
I read about oob tags and sraix, there are some oob tag examples in aiml folder in program-ab-0.0.4.3, but when i run it to understand how it works, it just outputs the tag as a result
Ex: Human: what is the weather like?
Sraix ‘WHAT+IS+THE+WEATHER+LIKE’ failed
Robot: I used my lifeline to ask another robot, but he didn’t know.
Perhaps we should try a web search.
<oob><search>what is the weather like</search></oob>
Please help me to know how do i call any API based on user input and give customized output to user based on API response
Thanks
Your api call should look something like this. Change service to XML if you are using an XML to pass data.
For more details refer here https://www.botlibre.com/forum-post?id=13020078
<category>
<pattern>*</pattern>
<that>What is your postal code</that>
<template>You live in <sraix service="JSON" hint="code/name">URL_GOES_HERE</sraix>.</template>
</category>
In golang, is there a way to pipe a variable to part of a web form?
For example, sending "123 Random St." to the Street address part of https://www.dominos.com/en/pages/order/#/locations/search/ and so on? I found pizza_party*, but the GUI used is no longer available, I have also found pizzadash**, but this uses a credit card where I want to use cash. I even found a list of golang ones, but the links that they use doesn't work anymore.***
Therefore, my goal is so: order a pizza in golang through the dominos website API!
NOTE: Please suggest a package or function with example!
NOTE: I do not want to make a web scraper/data getter.
NOTE: Your answer must work on at least one box of my linked website.
NOTE: I want to fill out links similar to the provided link from the linux command line.
*https://github.com/coryarcangel/Pizza-Party-0.1.b
**https://github.com/bhberson/pizzadash
***https://golanglibs.com/top?q=pizza
This is how you post any form values onto an online form. Provided you know the POST endpoint of the service.
func main():
resp, err := http.PostForm(targetPostUrlHere,
url.Values{"Service_Type": {"Delivery"},
"Address_Type_Select": {"House"},
"Street": {"123 E 24th St"},
"Address_Line_2": {"4D"},
"City": {"New York"},
"Region": {"NY"},
"Postal_Code": {"10027"}})
}
**Note: The field keys and values are guesstimates. You must inspect the actual key names expected in the form.
In your case, https://www.dominos.com/en/pages/order/ is an endpoint for the form page. Once the form is filled and submitted, the information is submitted using POST method akin to the code afore-mentioned to a dedicated CREATE endpoint (C in the CRUD), which normally can be found in the <form> html tag.
<form action="posttargetendpoint" method="POST">...</form>
Once the POST operation is successful, usually a web service would redirect you to another page. In your case, it is https://www.dominos.com/en/pages/order/#/section/Food/category/AllEntrees/
However, any good web service wouldn't expose the POST endpoint in the clear since it is the vulnerable point of attack. You're welcome to find out by inspect he Domino's page source and adjust the field values in the Go code accordingly.
Now to make a command line prompt to wrap around the PostForm code, I suggest you look into https://github.com/codegangsta/cli which is a very nice package for creating quick command line app.
I assume you mean pipe information originating from your backend to another site on behalf of a user?
The standard way of passing information between domains is via HTTP params, usually via a GET request, but this capability would need to be supported by established protocols the remote site. You can also use an iframe to embed the page of another site onto your page, however, you wouldn't be able to remotely interact, call JS code, or even query the page at all. Cross-domain security safeguards justifiably prohibit such capability, and generally speaking, interacting on behalf of the user via their browser is also restricted for security reasons.
However, if you're looking to emulate user behavior such as with a bot or web scraper from your own host or browser then that's a different story. There are tons of frameworks provide rich capability for interacting with a page. I'd recommend checking out Selenium, which acts as a virtual browser. There are also tons of libraries in Python for processing data from HTML and structured data. You might want to check out Beatiful Soup and Scrapy.
Hope this helps.
I have created an email service in force.com.Can anyone help me out of how to use thta in apex classes.say,i wanna send mail when user registration is successful??
Many Thanks,
Sandhya Krishnan
I assume you want to send an email directly from Apex code, either in a Trigger or from a page controller ... ? If so, this page can get you started:
http://www.forcetree.com/2009/07/sending-email-from-your-apex-class.html
Clearly you don't want to hard-code your email template into your classes, so make sure to read at least through the part that shows how to look up the template dynamically. That should be enough to get you on your way.