I have an issue.
here is my flow:
agentA-->taskRouter-->agentB.
I know how to pass data(some additional customer info) from taskRouter to agentB(by attribute), but I don't know how agentA pass data to my taskrouter.(or how taskrouter receive the data)
Twilio developer evangelist here.
To pass data to other agents on a task through Flex, you can add further attributes to your task from within the Flex interface.
You would need to build a Flex plugin that allows you to add that data. I have an example Flex plugin that adds a text input to the task panel and allows agents to use it to set the customer name in the task attributes.
Once you have access to the task object, you can update the attributes with the function:
task.setAttributes(newAttributes);
setAttributes does overwrite existing attributes, so ensure you don't lose all the existing attributes like so:
const newAttributes = { ...task.attributes, name: this.state.name };
task.setAttributes(newAttributes);
This will update the attributes on the task that another agent will then see when they are assigned the task.
Related
Is there a way to programmatically query (using .net SDK) list of running pipelines by data annotations?
I can set data annotation when I run pipeline as explained here, but not sure how to query pipelines or filter pipelines using the same?
According to the API documentation, query pipelines by annotation is not supported. Filter parameter support following:
Gets or sets parameter name to be used for filter. The allowed
operands to query pipeline runs are PipelineName, RunStart, RunEnd and
Status; to query activity runs are ActivityName, ActivityRunStart,
ActivityRunEnd, ActivityType and Status, and to query trigger runs are
TriggerName, TriggerRunTimestamp and Status. Possible values include:
'PipelineName', 'Status', 'RunStart', 'RunEnd', 'ActivityName',
'ActivityRunStart', 'ActivityRunEnd', 'ActivityType', 'TriggerName',
'TriggerRunTimestamp', 'RunGroupId', 'LatestOnly'
I want to write custom code to support the behavior below:
Parent A has a field called "ABC" Each Child task of Parent A has this field "ABC" as Read-only "ABC" edited in the Parent should filter down to each child every time its updated. Obviously this wouldn't be a true live sync but should call the same value as soon as the end user refreshes the page to see the updated value.
I really, want a Scripted Function that reads custom fields on a parent-task for change, and if changed carries that value over to the child-task. I am using "Script Runner" but I cannot figure out how to do this. Could you please provide the script that can be used in script runner and also i want to automate the job for all the issue's & sub-task in our instances.
I know this can be done through custom script listener but i need a script that can accomplish this task.
You can easily do this with a Scripted Field. The documentation is quite good.
Basically you first have to get your parent issue. The issue object has a method getParentObject() that does this:
Issue getParentObject()
If this issue is a subtask, return its parent.
Returns:
The parent Issue, or null if the issue is not a subtask.
And then you can get the value of your parent issue's custom field. Assuming this is a simple Text field, it would look something like this:
String customFieldName = "My fancy custom field"
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()
Collection<CustomField> customFields = customFieldManager.getCustomFieldObjectsByName(customFieldName)
parentIssue.getCustomFieldValue(customFields.first()) as String
I am working with Microsoft bot development framework, using its node.js sdk.
I have been looking for a way to save all the messages of a conversation. I set persistConversationData to true, and tried to access the conversationData using session.conversationData. However, it is empty.
1- Is there a builtin method to access all the messages within a conversation?
2- If persistConversationData is not for that, can anyone please explain its usage.
Thank you so much.
By default, messages will not be persisted by the Microsoft Bot Framework. For stateful operations, you can use the Bot State API the following ways:
Set userData. The persisted data will be available to the same user across different conversations.
Set conversationData. The persisted data will be available to all the users within the same conversation.
Set privateConversationData. The persisted data will be available to the given user in the given conversation.
Set dialogData for storing temporary information in between the steps of a waterfall.
According to the documentation, conversationData is disabled by default. If you want to use it, you have to set persistConversationData to true.
tl;dr You have to take care of persistence for yourself. E.g.
// ...
var bot = new builder.UniversalBot(connector, { persistConversationData: true });
bot.dialog('/', function (session) {
let messages = session.conversationData || [];
messages.push(session.message);
session.conversationData = messages;
});
I am using the http://grails.org/plugin/audit-logging plugin and am only interested in auditing a single field in a large domain class. I could specify a lengthy 'ignore' list, but ideally I want to specify the whitelist of fields instead, so that if new fields are added, it is not necessary to maintain the ignore list to avoid them getting automatically audited which could be a performance risk.
Is this possible? I didn't see mention of it in the docs for the plugin.
I think you could do this using the event handlers only instead of the standard audit logging. You would set auditing like this
static auditable = [handlersOnly: true]
You could create a white list
def whiteList = ['name','age',...]
Then create on* events to handle a save, delete or change event and iterate through the white list to look up that key in the old and new map:
def onChange = {oldMap, newMap ->
whiteList.each{propName->
if(oldMap[propName] != newMap[propName]) {
//
}
}
}
This could be a very basic question, but hopefully someone will be able to answer it.
I am receiving messages (HL7) using a custom receive pipeline. Inside my custom pipeline, I am promoting properties into the context. I have set up a map where I need to access these properties. However, I would like to access these properties on the send side. The reason why it needs to be on the send side is because I am attaching my map to the send port, so I assume that the message will have already hit the MessageBox and will be mapped on the send side. Hopefully that makes sense...
I know that there are a few 3rd party tools I can use, but I was hoping that there's a simple functoid, or some code I can enter in a scripting functoid that will access the context for me.
Would someone be able to point me in the right direction with this?
There is, indeed a C# functoid that allows access to context properties but it seems to only work with maps on a Receive Port or inside an Orchestration.
You can use the Context Accessor Functiod to do this... Combine it's pipeline component with yours and it should work... Beware it should be handled within the same thread...
http://contextaccessor.codeplex.com/
I don't know if this is possible. However, I had a similar requirement to access message context properties and I was able to populate a message with the context properties in an orchestration thanks to
Greg.Forsythe's excellent instructions
I had a similar situation to access the context properties to get the filename property in the my map. I did the below steps without using any external functoids. Hope this helps someone
Steps:
create a new schema say "FileSchema"
FileNode(rootNode)
-FileName (fieldElement)
Click the schema and in the properties target namespace - clear the namespace.
make the FileName property distinguished. Rt.Click FileName and show promotions and add FileName to Distinguished property tab.
In your target schema, add the field FileName. for me I added it to a SQL schema, since I need the filename for every row in the database
In your orchestration, use the message assignment shape and type the below
// create a variable varFileXML of type System.XML.XMLDocument
// I'm creating a xml same like the file schema and loading that to the XML variable and then assigning that to the Message of type FileSchema
varFileXML = new System.Xml.XmlDocument();
varFileXML.LoadXml("<FileNode><FileName>FileName_0</FileName></FileNode>");
Msg_FileSchema = varFileXML;
//Get the FileName to a variable of string type
varFileName = Msg_FlatFileSchema(FILE.ReceivedFileName);
varFileName = System.IO.Path.GetFileName(varFileName);
//Access the filename property from the message and assign the variable to that
Msg_File.FileName = varFileName;
Now that we got the FileName in to the message you can use that in mapping to your target schema
I used a transform shape to create a new inline map with source as your target schema and fileschema together and the destination as the target schema.I mapped the filename from the fileschema to my target schema the filename property
this is one of the many ways to get the context property. Hope it helps
thanks & regards
Silam