How do I change language on DocuSign e-mails? - rest

I have set a simple template DocuSign for my client.
I use this template to send request signature with the REST API.
The body and the object mail are been modified in the request :
{
[...]
"emailSubject" : "Document à signer",
"emailBlurb" : "Merci.",
[...]
}
But, for now, the e-mail are in English.. Can I change the language on French ?
I read it is possible to personalize the language of each recipient but for that, I must modify the request.
Is it possible to change the language without personalize the language of each recipient
Thanks in advance,
Frédéric.

Please search for previously asked questions under the #DocuSignAPI tag as this has been answered before. Take a look at the API Documentation in the Developer Center and do a search for emailNotification. You'll see how to set language through there.
Take a look at this previous post:
Embedded DocuSign signing: using recipient's language
You should also take a look at the Signer Resource File which allows additional language settings.

Related

How can I know the spoken language of the assistant?

I want to know in my fulfillment what was the language the user was spoken when the intent was triggered.
Is there a way to know that? I didn't find that information in the request header or in the request data.
Thanks
Guzman
This information is part of the user locale and is part of the JSON body that is sent. You can get this in one of a few ways:
If you're using the node.js library, you can use app.getUserLocale()
If you're using the Action SDK, this is in the JSON at user.locale
If you're using Dialogflow, this is in the JSON at originalRequest.data.user.locale
In each case, the value returned will be something like en-US specifying the language and locale the user is using.
Keep in mind that you will still need to register your Action to handle these languages or language/locale pairs in the Action console.

Message Type on Facebook Messenger using Bot Framework

According to this documentation (https://developers.facebook.com/docs/messenger-platform/reference/send-api/) there will need to be a "messaging_type" property needed to be added to the payload for use on Facebook Messenger bots. Will this be automatically injected into the payload, or is this something we need to handle as a developer?
I stumbled upon this as I am researching how to add certain "tags" to the payload for pro-active messaging.
This issue Will Bot Framework support Facebook messaging_types? states the messaging_type is already set on every message and by default it's set to 'Response' and you can change this using ChannelData.
FranciscoPonceGomez on GitHub
We already support It. It defaults to ‘Response’ and can be changed via ‘messaging_type’ in channeldata.
I will send you a link with the updated documentation soon.
In C# you set the messaging_type like this:
activity.ChannelData = JObject.FromObject(new
{
messaging_type = "MESSAGE_TAG"
});
If you have successfully set the tag could you post your solution as it would really be of help to me and others :-)

Send variable to 3rd party online form

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.

Custom tags in Jira email handler

Is there a way to make a Jire email handler ignore the From field in an email and go for a custom tag instead? I know I could work with the API instead but that's in the pipe. this is a temporary solution that will be used until a more robust system is built.
To clarify what we have today:
Email is sent to inbox, (hr#company.com)
Jira picks is up and creates an issue.
Jira looks at the From field and creates a uses if none exist.
What we're trying to achieve:
Form is filled out, and an area is chosen (hr, facilities etc.).
Form is posted to an API that creates an email (basically a no-reply adress over SMTP) and sends it to the appropriate inbox (for example hr#company.com).
Email lands in the inbox and Jira looks in it and creates an issue in project or label 'HR'.
Jira now looks in the email and finds custom tags named [user] and [user-email] (or something) and creates a user from the tag.
Example email
From: no-reply#company.com
To: hr#company.com
Subject: Some problem
Body: Explanation of problem
Have a good day!
/Mike
[user:"Michael Smith"]
[userEmail:"michael.smith#company.com"]
If we were to implement this system now, we would loose the possibility to create new users because all emails would come from the same "no-reply" adress.
I have searched in the Atlassian forums and such, but with no luck. Have not found anything in the official documentation, but I fear that I might be looking in the wrong place.
I hope that I'm being clear, and that someone has any idea if it is possible.
Thank you!
You need to write your own plugin and create your own Mailhandler.
For example you can use a regex which looks for the tag
[userEmail:"michael.smith#company.com"] and retrieve the emailadress from the string. Do the same for the [user]-tag, if the user doesn't exist.
Here is a tutorial that shows how to create and setup custom Message Handlers:
https://developer.atlassian.com/jiradev/jira-platform/guides/email/tutorial-custom-message-mail-handler-for-jira#Tutorial-Custommessage(mail)handlerforJIRA-Step7:Implementarealmessagehandlerback-end
The rest should be easy from here.

What to return with a Http 406?

I have reviewed RFC2616. For a "406" it states:
Unless it was a HEAD request, the response SHOULD include an entity containing a list of available entity characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content-Type header field. Depending upon the format and the capabilities of the user agent, selection of the most appropriate choice MAY be performed automatically.
But, I'm a little confused about what to return and how. For example, if I have a RESTful'ish resource that can only return JSON, and the accept header specifics that the caller only wants XML, how should I tell him that I can only return JSON?
I think it's safe to respond with a list of the available content types using the Content-Type the resource provides - in your case Json.
It's kind of a "best-effort" approach of the service and it's the responsibility of the client to react to the problem or abandon the request.
For example if you travel abroad (i.e. to Germany) and go to the local butcher. You only speak English and the butcher only speaks German and French. You ask in English for Beef.
Because the butcher doesn't understand you, he responds in German and French asking you to change the language of your request ("Sprechen Sie deutsch?", "Parlez vous Francais?").
Now it's your choice to:
- learn German or French ("Rindfleisch", "Boef")
- try another common language (handsigns, primeval sounds)
- leave and search for a butcher that understands English