function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RoyGiladRoyGilad 

Deploy lead Assignment rules

Hi All,

Does anyone know how can I deploy from Sandbox to production?

I searched Change-Sets and tried to use Eclipse and even the meta-data API but could not deploy it to production.

Does any one know how to deploy assignment rule?

 

Thank you for your help,

 

Best Answer chosen by Admin (Salesforce Developers) 
etoeto

The dataloader does not help but you can use ant or workbench to download the assignment rules meta data from one org and deploy it to another.

 

Using ant it should be possibel to automate that task completely however for a first try you can easily do it manually using the workbench.

 

Go to: https://workbench.developerforce.com

and login to your source org.

 

Click Migration | Retrieve

 

use a package.xml file on your hard disc with the following content:

 

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>AssignmentRules</name>
    </types>
    <version>27.0</version>
</Package>

This will download the assignment rules meta information as a ZIP file.

 

If you are only using queues in your assignment rules, it's almost done now:

 

Logout from workbench and login again to your target org. Click Migration | Deploy and select the ZIP file on your disc.

 

If you are using users in your assignment rules, the deployment will fail as the usernames in your sandbox and live environment are not identical. In that case just extract the XML file from your ZIP, open it in an editor and delete the sandbox appendix of your usernames Then add the XML back to your ZIP (make sure it is in the right folder within the ZIP) and it should work.

 

 

hth

Ingo

 

 

 

 

 

 

All Answers

RoyGiladRoyGilad

Hi

I found this:

https://success.salesforce.com/ideaView?id=08730000000KktmAAC

 

This answer, from Salesforce Product Manager, in other words states: "Salesforce does not support Assignment rules, use workflows".

 

I find it hard to believe that this is the answer of Salesforce PM, plus the idea is mark as "Existing Feature" which is misleading to believe that there is a solution in the platform.

 

 

How can one deploy Assignment rules to production?

RoyGiladRoyGilad
Hi,
In Meta-data API v. 27 Salesforce added support to Assignment rules, meaning it can be extracted and uploaded using Dataloader of Eclipse with version 27 or up.
RoyGiladRoyGilad
Well...
The extract of the lead Assignment rules using dataloader provided just the name and the ID of the rules.
Still without a solution...
:(
etoeto

The dataloader does not help but you can use ant or workbench to download the assignment rules meta data from one org and deploy it to another.

 

Using ant it should be possibel to automate that task completely however for a first try you can easily do it manually using the workbench.

 

Go to: https://workbench.developerforce.com

and login to your source org.

 

Click Migration | Retrieve

 

use a package.xml file on your hard disc with the following content:

 

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>AssignmentRules</name>
    </types>
    <version>27.0</version>
</Package>

This will download the assignment rules meta information as a ZIP file.

 

If you are only using queues in your assignment rules, it's almost done now:

 

Logout from workbench and login again to your target org. Click Migration | Deploy and select the ZIP file on your disc.

 

If you are using users in your assignment rules, the deployment will fail as the usernames in your sandbox and live environment are not identical. In that case just extract the XML file from your ZIP, open it in an editor and delete the sandbox appendix of your usernames Then add the XML back to your ZIP (make sure it is in the right folder within the ZIP) and it should work.

 

 

hth

Ingo

 

 

 

 

 

 

This was selected as the best answer
RoyGiladRoyGilad
Thank you, the workbench was exactly what I needed!
I have an Admin that is in charge of Assignment rules and the ANT solution must be done by a developer which caused a dependency.

Thank you.
d_jacd_jac

BTW, Metadata deployments maintain user references in the Summer '13 release (for all API versions).

http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_user_references.htm

so you shouldn't have to remove the sandbox appendix in the user names.

AssignmentRules specific info is here

http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_assignmentrule.htm

 

Hope that helps.

 

CourtesyCourtesy
Is there a syntax error in the package.xml content above?  Workbench gives me the following error 
Unescaped '<' not allowed in attributes values
[Line 2 : Column: 16]
Martin Prado 10Martin Prado 10
Courtesy: this is the correct format for that:

 
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>AssignmentRules</name>
    </types>
    <version>27.0</version>
</Package>
Test User 330Test User 330
Can you tell what to do if i want to deploy case assignment rules