Integrating the Contract Wizard with Other Applications
When you integrate your own Salesforce applications with the Contract Wizard embedded in an iframe container, you can make use of several Javascript event notifications to have your container application enable/disable or show/hide items.
The following table shows a list of these events and the parameters passed to them, and the Wizard runtime action associated with each event. Events provide a response in the form in JSON format; examples are provided below for each event.
Event |
Action |
Parameters |
Example Response |
---|---|---|---|
onwizardnext |
Next |
wizardDesignId, wizardDesignName, wizardId, stepDesignId, stepDesignName |
{"action":"onwizardnext","data":{"wizardDesignId":"a29M0000000rSWVIA2","wizardDesignName":"SDProposal-1-25","wizardId":"a28M0000001bmd4IAA","stepDesignId":"a2EM0000000XZSkMAO","stepDesignName":"SDProposal-1-25"}} When the next page is the Wizard "Review" page (in this case, the stepDesignID is "Null" and the stepDesignName is "Review" as this is the last page of the Wizard and not a design-defined step): {"action":"onwizardnext","data":{"wizardDesignId":"a29M0000000rSWVIA2","wizardDesignName":"SDProposal-1-25","wizardId":"a28M0000001bmdOIAQ","stepDesignId":"","stepDesignName":"Review"}} |
onwizardback |
Back |
wizardDesignId, wizardDesignName, wizardId, stepDesignId, stepDesignName |
{"action":"onwizardback","data":{"wizardDesignId":"a29M0000000rSWVIA2","wizardDesignName":"SDProposal-1-25","wizardId":"a28M0000001bmd4IAA","stepDesignId":"a2EM0000000XZSkMAO","stepDesignName":"SDProposal-1-25"}} |
onwizardsubmit |
Submit |
wizardDesignId, wizardDesignName, wizardId |
{"action":"onwizardsubmit","data":{"wizardDesignId":"a29M0000000rSWVIA2","wizardDesignName":"SDProposal-1-25","wizardId":"a28M0000001bmd4IAA"}} |
onwizardabort |
Abort |
wizardDesignId, wizardDesignName, wizardId |
{"action":"onwizardabort","data":{"wizardDesignId":"a29M0000000rSWVIA2","wizardDesignName":"SDProposal-1-25","wizardId":"a28M0000001bmd9IAA"}} |
onwizardstart |
Start |
wizardDesignId, wizardDesignName, wizardId |
{"action":"onwizardstart","data":{"wizardDesignId":"a29M0000000rSWVIA2","wizardDesignName":"SDProposal-1-25","wizardId":"a28M0000001bmd4IAA"}} |
Use the event notification data from your embedded Wizards to drive functionality in your application. For example, each "Next" event in the Wizard could trigger your application to add or display a new tab to the user.