Is it possible to add text in the activation rectangle in PlantUML?
Something like this:
The code for the above diagram:
#startuml
activate Alice
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
deactivate Alice
#enduml
Related
I need some help. I need to create a case in a Account with all the details basically, all the fields, using REST API but it I am not able to figure out, how to insert a record for creating a case.
Could you please guide me, how to create a case using REST API in Salesforce?
Do you use a library such as https://pypi.org/project/simple-salesforce/0.3/ or do you need to craft the REST messages manually?
You'd need to do it in 2 calls, login first (unless you have session id already) and then
POST to
https://yourinstance.my.salesforce.com/services/data/v48.0/sobjects/Case
with header
Authorization Bearer <session id goes here, sometimes called "access token" too>
and body
{
"Subject": "Hello world",
"Description": "Lorem ipsum dolor sit amet...",
"Origin":"Web",
"AccountId" :"0010g00001mbqU4"
}
should work like a charm (pass an account id value right for your org and you might have more fields to fill in).
So now "only" how to log in. That's a bigger topic and depends if it's a backend thing or you'll have a human interacting with it, maybe logging in to SF and then coming back to your org. There's bit of reading on that (simpler if you'd use SOAP API to log in)
For example this would work if I didn't redact all sensitive stuff
POST to
https://login.salesforce.com/services/oauth2/token
with header
Content-Type application/x-www-form-urlencoded
and body
grant_type=password
&client_id=(ask your admin for "connected app")
&client_secret=(ask your admin for "connected app")
&username=redacted%40example.com
&password=redacted
Should return
{
"access_token": "<session id here, use it as Authorization header in next calls>",
"instance_url": "<use this as base url of all next calls>",
"id": "<call GET to this (with the Auth header) to learn more about user",
"token_type": "Bearer",
"issued_at": "1593684589157",
"signature": "redacted"
}
Again - don't do it all by hand if you can, use one of Python libraries for Salesforce.
from simple_salesforce import Salesforce
sf = Salesforce(
username='user name of salesforce account',
password='password',
security_token='token')
Sample data
data ={
"Name" : "ABCD",
"Contact" : "123456789",
"Description":"Radio has damaged because of handling."
}
create record
x = sf.Account.create(data)
Caused by: gherkin.parser.ParseError: Parse error Found scenario_outline when expecting one of: comment, row, tag. (Current getState: examples
#config-cms-iwc-tests.yml #login
Feature: CMS IWC - Login Page
#login-01
Scenario Outline: Validate Login pop up.
Given user navigate to iwc for <zone> in <language>
When user clicks on Login link
Then Login Popup should be displayed
And Login popup heading should be displayed
Examples:
## ${iwc-test.login}
#login-02
Scenario Outline:Validate Forgot Your Password Link
Given user navigate to iwc for <zone> in <language>
And user clicks on Login link
#Then Login Popup should be displayed
When user clicks on Forgot Your Password link
Then Forgot Password popup should be displayed
And Forgot Password popup heading should be displayed
Examples:
## ${iwc-test.login}
As #ou_ryperd mentioned the parser expects tabular data. You have to send the data in the examples table as shown below.
Examples:
|zone|language|
|1 | lang1 |
|2 | lang2 |
I am new to the Alexa Developing, i used ApiToBot third party application to create and build the intents and responses,
I used HTTPS method to contact the server.
Then i successfully deployed the project into the alexa developer account.
while i'm testing the application i stuck into the error.
Right now i have to Intent and their responses are from HTTPS server.
After opened the skill i received a welcome response, after that i called one intent i received response.
but i call second intent it is not showing the response and vise-versa.
Only one intent is working.
I hope this is your request and this was your response.
If that the case, your response has shouldEndSession parameter is set to true. What that means is that, once your response is read, Alexa will end the session and closes the skill. You are no longer inside the skill. Whenever you want Alexa to wait for user response, keep the session alive by setting shouldEndSession parameter set to false.
Ex: you response should be
{
"body": {
"version": "1.0",
"response": {
"outputSpeech": {
"type": "SSML",
"ssml": "<speak><p>Followers of user id 641 is [Martijn Verbove Anton Cooee Found Ryze Rebekah Radice Jonah Lupton Mila Chervenkova💪 David Morrison Tiep Vu Nicholas Tenhue Deepak Laxmi Narasimha Feda Jaan Lolly Daskal Hämorrhoiden selbst behandeln SF Ali Nicole Hardin Pradeep Chopra WhatUsersDo Alice Jones Arpit Maheshwari Мартин Стојчевски Pete Roome Dean Pikock.com Chad Scira Phil Hendrix] </p></speak>"
},
"shouldEndSession": false
}
}
}
Read this answer to know more about keeping the session alive using ask-nodejs-sdk
More info about Response Object here.
In our situation for lazy approval, the user responded with "Yes I approve" instead of the one word "yes, ok, approve, approved"
And user got return mail from system as follow
<<< Start>>>
-----Original Message-----
From: exampleWbesite#exampleDomain.com
Sent: exampleUser1 12:55 PM
To: exampleUser2
Subject: RE: ACTION: something Approval Required for something else
Nintex Workflow was unable to interpret your response. Please try again with a clear indication of your approval outcome.
Valid 'approved' responses are:
approve
approved
ok
yes
Valid 'declined' responses are:
decline
declined
no
reject
rejected
Yes I approve.
My question is "Is it the default behavior of Lazy approval or something else went wrong".
Lazy Approval requires the response to be on a single line by itself.
In this case, if the phrase "Yes I approve" was one of the valid approval responses, the result would have been an approval.
I am developing a site in Visualforce and would like to offer user a simple form to send me feedback via email. There would be 3-4 fields like name, user's email, reason and feedback and "send" button. Clicking the send button should automatically send that message to my email address.
I do not want to store the form data in salesforce at least for now...All the stuff I found online about visualforce/apex and email is about saving that data to salesforce too.
Can I just make use of apex's email capabilities and send out email without storing that data anywhere in salesforce?
Thanks,
Calvin
It's not required to insert/update/delete any records in the database when executing an action on a VisualForce page. You can leverage the Outbound Email functionality to send out your notification. For something like this, you will probably want to familiarize yourself with the SingleEmailMessage methods.
A simple example to get you going:
public PageReference actionSend() {
String[] recipients = new String[]{'myemailaddress#somedomain.com'};
Messaging.reserveSingleEmailCapacity(recipients.size());
Messaging.SingleEmailMessage msg = new Messaging.SingleEmailMessage();
msg.setToAddresses(recipients);
msg.setSubject('Test Email Subject');
msg.setHtmlBody('Test body including HTML markup');
msg.setPlainTextBody('Test body excluding HTML markup');
msg.setSaveAsActivity(false);
msg.setUseSignature(false);
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {msg}, false);
return null;
}
If you are interested in sending these outbound messages from a dedicated email address (something like noreply#somecompany.com), you can set these up through the Setup -> Administration Setup -> Email Administration -> Organization-Wide Addresses menu. Once you have created an org-wide address, grab the Id from the URL and use the setOrgWideEmailAddressId(Id) method on your instance of Messaging.SingleEmailMessage.