Skip to content

Instantly share code, notes, and snippets.

@adrianmi8
Created January 10, 2019 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianmi8/e58ddec1960480d57e343aeff9674b8f to your computer and use it in GitHub Desktop.
Save adrianmi8/e58ddec1960480d57e343aeff9674b8f to your computer and use it in GitHub Desktop.
Einstein Bot Invocable method for Returns with Zenkraft
public without sharing class BotReturnOrder {
@InvocableMethod(label='Bot Return Order')
public static List<Response> returnOrder(Request[] requests) {
List<Response> resp = new List<Response>();
String orderNumber = requests[0].orderNumber;
Response r = new Response();
return resp;
}
public without sharing class Request {
@InvocableVariable(label='orderNumber' required=true)
public String orderNumber;
}
public without sharing class Response {
@InvocableVariable(label='labelUrl' required=true)
public String labelUrl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment